| 1 | |
|---|
| 2 | How to install the TNTBase Debian package |
|---|
| 3 | Prerequisites |
|---|
| 4 | |
|---|
| 5 | * You should have Java of version 1.6 or later installed on your machine. The system variable JAVA_HOME should be set and point to the directory with JRE/JDK. |
|---|
| 6 | * You should have Tomcat installed on your system. TNTBase has been tested with Tomcat 6.0. But it also works with 5.5 or 5.0. For successful installation of TNTBase you should set CATALINA_HOME system variable pointing to the root directory of the Tomcat installation. |
|---|
| 7 | * Install Apache Ant and put Tomcat's catalina-ant.jar library to the ant lib directory. Typically, it is /usr/share/ant/lib. This is needed for deployment of Java web applications via ant tasks. |
|---|
| 8 | |
|---|
| 9 | Notes |
|---|
| 10 | |
|---|
| 11 | * TNTBase comes with Apache HTTP Server 2.2. WARNING: One should not use apache installed from Debian packages, since it is linked against libdb4.6, but TNTBase uses libdb4.8 |
|---|
| 12 | |
|---|
| 13 | Installation |
|---|
| 14 | |
|---|
| 15 | * Run dpkg -i tntbase-0.1.deb. It will unpack all necessary files. For successful installation be sure that you have CATALINA_HOME and JAVA_HOME system variables set. |
|---|
| 16 | |
|---|
| 17 | * After installing a package be sure that /usr/local/lib directory is in LD_LIBRARY_PATH. Otherwise, a TNTBase web application will fail during deployment. |
|---|
| 18 | |
|---|
| 19 | * Edit tomcat-users.xml file to add a user with a role manager. E.g. |
|---|
| 20 | |
|---|
| 21 | <user username="manager" password="secret" roles="tomcat,admin,manager"/> |
|---|
| 22 | |
|---|
| 23 | * Run Tomcat and Apache http Server, if they are not yet running. Run Tomcat as www-data, but not as root. This is very important. But if you have some permissions problems, run chown -R www-data:www-data /var/www/tntbase |
|---|
| 24 | The very common problem is when SVN returns "Could not open the requested SVN filesystem". |
|---|
| 25 | |
|---|
| 26 | Adding a TNTBase repository |
|---|
| 27 | |
|---|
| 28 | * A /var/www/tntbase/bin/init-tntbase-repository script is responsible for creating all environment for a TNTBase repository. But first of all, you have to configure the /var/www/tntbase/conf/deploy.properties file. It tells init-tntbase-repository script how to deploy web-applications. The fields are pretty self-explanatory: |
|---|
| 29 | |
|---|
| 30 | manager.url=http://localhost:8080/manager --- the url of a Tomcat manager |
|---|
| 31 | manager.username=manager --- a user name with the ''manager'' role. You should have set it up in Section "Installation". |
|---|
| 32 | manager.password=secret --- a password for a manager user |
|---|
| 33 | |
|---|
| 34 | * Run init-tntbase-repository script. Usage: init-tntbase-repository <name> <svn_user> <svn_password> <default_namespace> where: |
|---|
| 35 | o <name> is the name of your TNTBase repository. It will be accessible by two urls: |
|---|
| 36 | + http://<your_host>/repos/<name> - an SVN interface |
|---|
| 37 | + http://<your_host>/tntbase/<name> - an entry point for other TNTBase services |
|---|
| 38 | o <svn_user> and <svn_password> - an SVN user that will have access to the TNTBase repository. Note that this user will be used internally by TNTBase as well. So do not remove this user in any case. dav_svn.passwd and dav_svn.authz files are located in /usr/local/apache2 directory (if there is Apache that came from TNTBase package). |
|---|
| 39 | |
|---|
| 40 | * <default_namespace> - Here you can provide a default namespace for the XQuery context. E.g. if your documents are in http://ns.org namespace, then you can provide this namespace to the script, and later on use the empty prefix for querying documents with this namesapce without explicitly binding your namespace to the empty prefix. |
|---|
| 41 | |
|---|
| 42 | * Configure access to your repositories in /usr/local/apache2/dav_svn.authz file. This is a usual authz file for SVN repositories hosted in Apache. For more information follow this link. |
|---|
| 43 | |
|---|
| 44 | Note: If you have error messages like: "The call failed on the server; see server log for details" or "Resource null not found!", be sure that you have some content in your TNTBase repository. In future nicer and more self-explanatory warnings will be added. |
|---|
| 45 | |
|---|
| 46 | *Futher tuning |
|---|
| 47 | |
|---|
| 48 | * You might want to set up Tomcat so that it will put TNTBase web applications for your repositories into /var/www/tntbase/webapps, and logs of those applicatios to /var/www/tntbase/webapps. |
|---|
| 49 | |
|---|
| 50 | *United authentication |
|---|
| 51 | |
|---|
| 52 | You might want to have both TNTBase interface on the same url. It is done via integrating mod_jk into the Apache Server. The configuration files should redirect requests like http://<your_host>/tntbase/<repository> to Tomcat. Setting this up is not integrated yet into scripts of the TNTBase package. |
|---|