This manual contains information on installation and maintenance operations (backups, updates, etc.) for the CMS Ametys V4. It also contains a number of useful tips.
We recommend that you first read the previous pages of this manual, or theadministration manual for your application, to familiarize yourself with all the concepts described here. Please also read your project's supplementary installation manual, if available, to learn about its specific features: in some cases, some of the information presented here may not be applicable.
This section includes appendices documenting Environment and Data Duplication, and Modifications toURL
This manual has been written for people who wish to administer CMS, 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.
CMS 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.
Default, Ametys uses Derby and the file system, all stored in the directory configured in the data folder of the environment variable AMETYS_CMS_HOME. Ametys also offers the option of using a database to store its main data.
Secondary data can be (depending on your CMS configuration):
They are stored in a SQL database (e.g.MySQL ). The chosen database is visible in the configuration parameters (see CMS administration manual, configuration section).
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 arise: it is therefore advisable to perform these operations when no user is logged in and no automatic work is in progress (by switching off the Tomcat server, for example).
You can perform a nightly backup using a CRON task and a script to automate the task.
To restore data, perform the following steps:
It is very important that everything is restored simultaneously, otherwise application inconsistencies may arise: it is therefore advisable to carry out these operations when no user is logged in and no automatic work is in progress (by switching off the Tomcat server, for example).
It is also advisable to make a backup just before the restore, in case the restoration goes badly.
To update CMS Ametys , follow these steps:
It may also be necessary to carry out other operations, depending on the update supplier's instructions (please refer to the Update Manual).
Installation of a new instance of CMS (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.
If you have followed our installation procedure, you need to use the corresponding services (Apache Tomcat , Apache HTTPD...) for example by running the command "service 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 work (tomcat doit être arrêté) rm -rf /opt/tomcat/current/tomcat/work # Effacer le contenu du répertoire temp (et non le répertoire en lui-même) rm -rf /opt/tomcat/current/temp/*
These are mainly pages generated by the CMS application to be served statically from the SITE application.
Clear site cache (command line)
cd $AMETYS_CMS_HOME rm -rf cache
Cette opération peut être réalisée depuis l'espace d'administration du back-office (<url backoffice>/_admin)
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 $AMETYS _CMS_HOME/logs directory (see the log4j website for more details).
They can be downloaded directly from the administration area (see the dedicated page in the administration manual for more details: Application logs).
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, to avoid wasting disk space.
To prevent the disk from becoming full due to the regular increase in log files (tomcat, CMS...), we recommend deleting unnecessary log files. This operation is available from the cmsadministrator space.
We advise you to consult page 2. Requirements and recommendations
The CMSSITE and Solr are web applications JAVA.
Apart from special projects, the CMS doesn't need a lot of CPU, but it can be interesting to use multiple processors and multi-heart.
The CMS can become memory-hungry depending on the number of users (should be between 4G and 12G for several users).
SITE is not memory-intensive (1G to 2G).
Solr can also be memory-hungry depending on the number of users, especially at launch time when a cache is calculated to be optimal later on. The default configuration is often sufficient (1G, but it may be necessary to increase it to 6G via the environment variable SOLR_HEAP).
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 look in the administration area ( System status page).
In the case of an OutOfMemoryException returned by Java:
Example of memory settings
-Xms2G -Xmx6G
The disk space used by the entire system is difficult to predict. It consists of :