Différences

Cette page vous donne les différences entre la révision choisie et la version actuelle de la page.

public:install_a_txm_portal [2015/04/08 09:55]
slh@ens-lyon.fr
public:install_a_txm_portal [2017/02/08 10:55] (version actuelle)
slh@ens-lyon.fr
Ligne 29: Ligne 29:
  * using a binary distribution provided by the Apache Web site   * using a binary distribution provided by the Apache Web site
-  * using a repository package (for Tomcat 6, the useful Debian packages are: tomcat6, tomcat6-admin)+  * using a repository package (for Tomcat 6, the useful Debian packages are: tomcat6 and tomcat6-admin that contains the tomcat Web manager)
==== Installation directories ==== ==== Installation directories ====
Ligne 117: Ligne 117:
-Run the TXM desktop to complete the installation process, the TXM local directories should be created under:+  * Run the TXM desktop version just installed to complete its installation process, the TXM local directories should be created under:
<code> <code>
/home/<user>/TXM /home/<user>/TXM
</code> </code>
-If your Linux system does not include a desktop environment, you need to enable X11 forwarding (-X option with ssh) to an X11 server on a client machine (e.g.: XQuartz on the Mac OS X, Cygwin/X on Microsoft Windows).+If your server does not include a desktop environment (headless server configuration), you need to enable X11 forwarding or tunneling (with -X option in [[http://manpages.ubuntu.com/manpages/lucid/man1/ssh.1.html|ssh]]) between the server and the X11 server (e.g.: X11 on Linux, XQuartz on Mac OS X, Xming or Cygwin/X on MS Windows) of the client machine. TXM Graphical User Interface will then be displayed and interactive on the client machine screen.
Make sure that the subdirectories are accessible for read & write rights to the tomcat6 group: Make sure that the subdirectories are accessible for read & write rights to the tomcat6 group:
Ligne 144: Ligne 144:
log_directory=/usr/share/tomcat6/.TXMWEB/txm/logs/ log_directory=/usr/share/tomcat6/.TXMWEB/txm/logs/
</code> </code>
 +
 +<note tip>You can copy all the corresponding binaries and libraries paths set in the "install.prefs" file of the TXM desktop installation directory.</note>
Then, replace the <user> with your login: Then, replace the <user> with your login:
Ligne 218: Ligne 220:
If an error message such as “TBX: not initialized” or “Could not initialize Toolbox” appears, check the Tomcat logs for further diagnostic information. If an error message such as “TBX: not initialized” or “Could not initialize Toolbox” appears, check the Tomcat logs for further diagnostic information.
 +
 +==== JVM memory configuration ====
 +
 +By default the allocated memory of the JVM is 128MB. If you have some Java Heap Space exceptions in tomcat logs when using the portal you can increase the memory for tomcat service by editing the file /etc/init.d/tomcat6 and adding this line:
 +
 +<code>
 +JAVA_OPTS="-Djava.awt.headless=true -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=1024m"
 +</code>
 +
 +as first line of the catalina_sh() function, before this line:
 +
 +<code>
 +JAVA_OPTS="$(echo $JAVA_OPTS | sed 's/\"/\\\"/g')"
 +</code>
 +
 +After restarting the portal with:
 +
 +
 +<code>
 +sudo service tomcat6 restart
 +</code>
 +
 +you can check that the JVM arguments has been modified in the Tomcat manager, in the tab "Server status".
 +
 +
 +==== Limited permission ====
 +
 +According to your user account you may need to change permissions of some directories to edit the files described in this tutorial, you can change the permissions with, for example:
 +
 +<code>
 +sudo chown -hR <user> /var/lib/tomcat6
 +</code>
 +
 +Don't forget to restore the permissions after having edited the files or the portal won't run:
 +
 +<code>
 +sudo chown -hR tomcat6 /var/lib/tomcat6
 +</code>
 +
 +
 +===== Accessing through a VPN =====
 +
 +In some contexts (often) you need to enter a VPN before connecting to the server:
 +  * connect to the VPN with your system tools (typically a standard OpenVPN), eg. Linux: Réseau > Connexions VPN > <VPN name>
 +  * or launch a specific VPN client from command line, eg. Linux: %%sudo ./fortisslvpn.sh%%
 +    * set gateway, login, password
 +
 +===== Working through SSH =====
 +
 +Connecting to server:
 +
 +<code>
 +ssh -X <username>@<server IP>
 +</code>
 +
 +eg.:
 +
 +<code>
 +ssh -X txm-user@xxx.20.53.62
 +</code>
 +
 +Starting XFCE:
 +
 +<code>
 +startxfce4
 +</code>
 +
 +Copying a file from client to server:
 +
 +<code>
 +scp <file> <username>@<server IP>:<destination>
 +</code>
 +
 +Example to copy a TXM binary corpora to server:
 +
 +<code>
 +scp /home/user/CORPORA1.zip user@xxx.20.53.62:/home/user
 +</code>
 +
 +Copying a directory, by adding "-rp" options:
 +
 +Example to update some facs edition HTML files from a VMWare shared directory:
 +
 +<code>
 +scp -rp /mnt/hgfs/___shared_for_vm/facs/ user@xxx.20.53.62:/usr/share/tomcat6/.TXMWEB/txm/corpora/CORPUS1/HTML/CORPUS1/
 +</code>
 +
 +See also rsync command that manage the version of the files and only copy the files if they have changed.
 +
 +
 +===== Directories description =====
 +
 +The tomcat application directory:
 +<code>
 +/usr/share/tomcat6/
 +</code>
 +
 +This directory also contains the TXM user directory with corpora, etc. and portal configuration files:
 +<code>
 +/usr/share/tomcat6/.TXMWEB
 +/usr/share/tomcat6/.TXMWEB/bfm/txmweb.conf            // main portal configuration file
 +/usr/share/tomcat6/.TXMWEB/bfm/textometrie.properties // toolbox configuration file
 +</code>
 +
 +The tomcat published space accessible through HTTP network:
 +<code>
 +/var/lib/tomcat6/webapps/
 +</code>
 +
 +The tomcat configuration directory:
 +<code>
 +/etc/tomcat6/
 +</code>
 +
 +The logs directory:
 +<code>
 +/var/log/tomcat6/
 +</code>
public/install_a_txm_portal.1428479759.txt.gz · Dernière modification: 2015/04/08 09:55 par slh@ens-lyon.fr