This manual contains information on installation and maintenance operations (backups, updates, etc.) forAmetys ODF . It also contains a number of useful tips.
We recommend that you first read the installation manual(demo or serverversion ) for your application, to familiarize yourself with all the concepts described here. Please also read the additional installation manual for your project, if available, to learn about its specific features: in some cases, some of the information presented here may not be applicable.
This manual has been written for people who wish to administer Ametys ODF , i.e. carry out maintenance operations such as backups, updates, etc...
If you need help, or if you'd like to share your suggestions, criticisms or praise, don't hesitate to ask for help on the forums. You can also help us improve this documentation by adding your own comments.
Ametys manages two types of data.
The main data concerns content, metadata, attachments, page organization, workflow and so on. They are managed byAPI JCR 2.0 (JSR 238).
The Apache JackRabbit implementation(http://jackrabbit.apache.org) is used because physical storage can be achieved in different ways: file system, embedded database (DERBY), classic database (MySQL), ...
To find out about all the implementations and how to configure them, you can consult the site of JackRabbit.
The Repository configuration file JackRabbit is WEB-INF/param/repository.xml.
By default, Ametys uses Derby and the file system, all stored in the configured directory (see configuration page).
Secondary data can be (depending on your application configuration) :
They are stored in a database SQL (MySQL for example). The chosen database is visible in the configuration parameters (see the configuration page).
To save data, it is necessary to save all data types simultaneously. The following steps are required:
It is very important that everything is saved simultaneously, otherwise application inconsistencies may occur: it is therefore advisable to perform these operations when no user is logged in and no automatic work is in progress (by switching off tomcat , for example).
It's a good idea to make a backup every night, using a cron job for example.
To restore data, perform the following steps:
It is very important that everything is restored simultaneously, otherwise application inconsistencies may occur: it is therefore advisable to perform these operations when no user is logged in and no automatic jobs are running.
It is also advisable to make a backup just before the restore, in case the restoration goes badly.
To update Ametys ODF , follow these steps:
Other operations may also be required, depending on the update supplier's instructions: SQL scripts, for example (please refer to the Migration Manual).
Installation of a new instance of the application (without data) is immediately carried out with the most recent version, and does not require any update.
Before executing an update, it is important to check the available disk space. For a 70 MB application, for example, you need 150 MB of available space, because once the 70 MB file has been downloaded, it will be unzipped to form the application.
Downloaded zips and old versions are kept on disk: if after installing the new version you need to go back to the previous version, you need to shut down the services and switch the symbolic links back to the old directory.
It's rarely necessary to keep more than 2 old versions, so you can delete old directories (and zip files) to save disk space. Please note! Logs are not retained during an update. |
If you have followed our installation procedure, you need to use the corresponding services (Apache Tomcat , Apache HTTPD...) for example by running the command "/etc/init.d/tomcat start".
Otherwise, the start, stop and restart processes depend on your installation and servlet engine. For example, on Tomcatyou'll probably need to run the startup and shutdown scripts in the bin directory.
Sometimes, the shutdown call is not completed correctly. After a few seconds, check that the server has really stopped, by looking at the processes still running. |
You'll find the JavaScript and CSS files already served.
Empty the tomcat
# Effacer le répertoire workrm –rf /usr/local/tomcat/work# Effacer le contenu du répertoire temp (et non le répertoire en lui-même)rm –rf /usr/local/tomcat/temp/* |
These are mainly pages generated by the CMS application to be served statically from the SITE application.
Empty site cache
cd /home/cms/Ametys_CMS/datarm –rf cache |
ps waux | grep tomcat |
Several tomcat may be running on the same machine. When the command is returned, you can see how many tomcat are running, as well as their "identity".
This command can be used to ensure that a stopped tomcat has actually stopped.
ping <mon_dns> |
Si un serveur http est configuré : wget <mon_url> et vérifier que la page a bien été écrite.
Il arrive parfois qu’un serveur ait des problèmes d’accès aux autres machines réseaux, cela permet de vérifier que les serveurs ont bien accès entre eux.
Functional errors are generally contained in application logs. These logs are configured via the WEB-INF/log4j file .xml and stored in the WEB-INF/logs directory (see the log4j website for details).
They can be downloaded directly from the administration area (see the dedicated page in the administration manual for details).
Apache Tomcat errors are stored in the Tomcat/logs directory. The catalina.out file contains console information (including startup information). Tomcat also uses log4j.
These logs must be monitored and deleted regularly, so as not to fill up disk space.
In order to prevent a full disk, which could result from the regular growth of log files (tomcat, CMS...), we recommend deleting unnecessary log files. This operation is available from theadministrator area.
The ODF back-office and front-office applications are web applications JAVA.
Apart from special projects, Ametys ODF doesn't need a lot of CPU, but it can be interesting to use multiple processors and multi-heart.
The back-office can become memory-hungry depending on the number of users (should be between 512MB and 1GB for several users).
The front-office is not memory-hungry when it is mainly static: in this case, Tomcat is only used during searches or when generating other dynamic pages.
At startup, the -Xms and -Xmx options specify the minimum and maximum memory allocated. Sun's JVM takes the minimum space and, whenever necessary, increases the space without exceeding the maximum size; however, it never returns the memory to the system: so it's important to consider that this memory is not shareable. If you want to know how memory is actually used by the JVM, you can have a look at the administration area).
In the case of an OutOfMemoryException returned by Java, this can come from 2 types of memory:
Example of memory settings
-Xms256m -Xmx1024m -XX:MaxPermSize=256M |
For more details on JVM configuration, please refer to the JDK6/Virtual Machine documentation. |
The disk space used by the entire system is difficult to predict. It consists of :