1 Database server
A local Debian MariaDB or MySQL server will automatically be installed and configured during Gentics CMS package installation. However, you can also use a custom MariaDB / MySQL server installation. Please note that some custom my.cnf mysqld setting must be applied. Please check the admin installation guide
2 Installation
The package will automatically perform the following actions:
- Installing thirdparty dependencies like Apache webserver and PHP.
- Creation of the node_utf8 cms database
- Setup of a dummy site configuration in your apache webserver
- Install Gentics CMS
2.1 With local MariaDB (recommended)
apt install ./contentnode-package_5.29.0.deb
2.2 Without installing MariaDB
apt install --no-install-recommends ./contentnode-package_5.29.0.deb
This package can only be used for the initial installation, update only via the integrated Autoupdate!
A password for the node CMS user will be generated automatically. See: How can i set the password of the node CMS user?
2.3 Final recommdentations
Please also check the final recommendations and suggestions for additional information.
3 Migrating to the new package (introduced with 5.16.0)
This guide was written for Debian Jessie and is probably different for newer Debian versions.
This section will list a step by step guide to migrate your Gentics CMS installation to the new Gentics CMS package structure introduced in 5.16.0. After this migration, Gentics CMS will use the system distribution Apache and PHP.
Instead of migrating you can also do a new Gentics CMS installation and then move the database, the /Node/node/content/dbfiles and the node configuration, however this way is not documented at the moment.
The MySQL steps are only necessary if you are still using the MySQL-server from the old Gentics CMS package inside /Node, running on port 42006. The minimum MySQL server version should be 5.5.
3.1 Backup
Create a backup of your package installation and MySQL database (/Node directory)
mysqldump --max_allowed_packet=512M -u root -h 127.0.0.1 -P 42006 -p node_utf8 > /Node/tmp/pre-update-node_utf8.sql mysqldump --max_allowed_packet=512M -u root -h 127.0.0.1 -P 42006 -p contentrepository > /Node/tmp/pre-update-cr.sql /Node/bin/nodectl stop cp -ra /Node /Node.pre-update
3.2 Update Gentics CMS
Update your Gentics CMS installation to 5.16.0 or newer.
3.3 Distribution update
Make sure your distribution is updated at least to the earliest supported version.
3.4 Download contentnode-package
- Download the latest package .tar.gz file (see: Downloads) for the version you want to update to.
- Extract the file in a temporary location (e.g: /var/tmp/).
We’ll use some files form the archive to augment the existing installation.
cd /var/tmp tar xfvz contentnode-package-5.16.0.tar.gz export PACKAGEDIR=/var/tmp/package
3.5 Distribution preparations
Install various tools and services that are needed for the migration.
apt-get install less vim curl tar sed psmisc file pwgen cron php5 php5-mysql apache2 mysql-client-5.5 php5-curl php5-gd php5-imagick php-apc php5-imap php5-ldap locales libapache2-mod-php5 imagemagick
3.6 Package MySQL migration
Please note that the package MySQL Server will no longer be supported. Install the MySQL database server according to the system specific installation. Dump your MySQL databases and migrate the data to the distribution MySQL Server. The Gentics CMS database user is stored in various stored procedured and triggers.
Please remove these procedures and triggers when the username and or the used connection ip / hostname changes because those elements contain a reference to the previously used login.
We highly recommend to host the MySQL Server for the Gentics CMS installation on the same system as Gentics CMS is running on.
It is advised to update the database settings (/etc/mysql) and restart the server before starting the MySQL migration.
apt-get install mysql-server-5.5
3.7 Database migration
# Create SQL Dump and delete old mysql installation mysqldump --max_allowed_packet=512M -u root -h localhost -P 42006 -p node_utf8 > /Node/tmp/node_utf8-postupdate.sql mysqldump --max_allowed_packet=512M -u root -h localhost -P 42006 -p contentrepository > /Node/tmp/cr-postupdate.sql /Node/bin/nodectl stop rm -rf /Node/mysql* # Update MySQL Server configuration cp ${PACKAGEDIR}/dist/mysql/gentics_custom.cnf /etc/mysql/conf.d/ /etc/init.d/mysql restart # Create the desired users and insert the data mysql> create database node_utf8; mysql> create database contentrepository; mysql> grant all privileges on node_utf8.* to 'node_cms'@'%' identified by 'pass'; mysql> grant all privileges on contentrepository.* to 'node_cr'@'%' identified by 'pass'; mysql> flush privileges; mysql -u root -p node_utf8 < /Node/tmp/node_utf8-postupdate.sql mysql -u root -p contentrepository < /Node/tmp/cr-postupdate.sql # Update your mysql settings in your /Node/etc/node.conf (or /Node/etc/conf.d/node.db.conf) vi /Node/etc/node.conf
Please keep in mind that it might be needed to update the Content.Repository connection settings within the Gentics CMS administration area. Those settings must be updated otherwise the publishing process will fail.
3.8 Package directory migration
The following folders and files are no longer needed and can be removed.
rm -rf /Node/apache rm -rf /Node/httpd-2.2.22 rm -rf /Node/var/httpd/cgi-bin rm /Node/etc/my.cnf rm -rf /Node/etc/httpd rm /Node/etc/httpd.custom.conf rm -rf /Node/etc/mysql rm -rf /Node/etc/php rm -rf /Node/var/http/httpd* rm -rf /Node/var/http/mysql
Sanitize the /Node/bin directory.
cd /Node/bin rm -rf /Node/bin/* cp ${PACKAGEDIR}/Node/bin/nodectl . cp ${PACKAGEDIR}/Node/bin/env.sh . cp ${PACKAGEDIR}/Node/bin/scheduler.sh . cp ${PACKAGEDIR}/Node/bin/java.sh .
Please update your scheduler tasks if needed since some might use the /Node/bin/ tools (eg.: rsync)
Sanitize the /Node/lib directory.
rm -rf /Node/lib cp -ra ${PACKAGEDIR}/Node/lib /Node/lib
Customize the node.conf file.
mkdir -p /Node/etc/conf.d mv /Node/etc/node.conf /Node/etc/node.main.conf cp ${PACKAGEDIR}/Node/etc/node.conf /Node/etc/node.conf
From now on the node.conf should never be edited directly. Instead custom files should be added to the conf.d directory. The files should be grouped by functionality or feature. (e.g: conf.d/node.alohaeditor.conf, conf.d/features.conf, conf.d/node.db.conf)
3.9 Package Apache webserver migration
Install and configure the Apache webserver.
# Copy contentnode site to apache sites directory cp -a ${PACKAGEDIR}/dist/debian/contentnode /etc/apache2/sites-available # Edit the site configuration and update the cms hostname vi /etc/apache2/sites-available/contentnode # Disable the default site and enable contentnode site a2dissite default a2ensite contentnode # Add new apache vhosts inclusion files from the package. # These files are being included by the apache2 contentnode site configuration. cp -ra ${PACKAGEDIR}/Node/etc/apache /Node/etc # Install the custom php configuration cp ${PACKAGEDIR}/dist/php/gtx_gcn_custom.ini /etc/php5/mods-available/gtx_gcn_custom.ini ln -s /etc/php5/mods-available/gtx_gcn_custom.ini /etc/php5/cli/conf.d/gtx_gcn_custom.ini ln -s /etc/php5/mods-available/gtx_gcn_custom.ini /etc/php5/apache2/conf.d/gtx_gcn_custom.ini # Enable various needed php modules a2enmod dav dav_fs dav_lock rewrite proxy_ajp # Reload the apache configuration after the additional steps have been completed service apache2 restart
3.10 System changes
Remove the node_public group from the system. This group will no longer be used. When not removed the system will not be able to function correctly after the migration has been performed.
# Add sudo settings echo "www-data ALL=(node)NOPASSWD: ALL" > /etc/sudoers.d/gtx_contentnode chmod 440 /etc/sudoers.d/gtx_contentnode # Set permissions usermod -a -G node www-data usermod -G www-data node cp ${PACKAGEDIR}/Node/dist_setperm.sh /Node/ /Node/dist_setperm.sh service apache2 restart