GCN Package – RedHat Enterprise Linux

1 Installation

1.1 Download GCN

Download and extract the GCN .tar.gz archive. Set the environment variable PACKAGEDIR to use the commands in this guide:


  cd /var/tmp
  tar xfvz contentnode-package-5.20.0.tar.gz
  export PACKAGEDIR=/var/tmp/package

1.2 MySQL Server Installation

Download and install the latest compatible Red Hat Enterprise Linux 6 / Oracle Linux 6 – MySQL 5.6.x package


  # You may have to remove existing mysql 5.1 libs
  yum remove mysql-libs
  rpm -i MySQL-client-5.6*x86_64.rpm
  rpm -i MySQL-server-5.6*x86_64.rpm
  rpm -i MySQL-shared-compat-5.6*x86_64.rpm
  /etc/init.d/mysql start
  # connect to the mysql and change your rootpw
  mysql -u root -p -h localhost -P 3306
  # SET PASSWORD = PASSWORD('YOUR_NEW_ROOTPW');
  # DROP DATABASE test;

  # Add custom mysql settings to increase performance and set encoding
  mkdir -p /etc/mysql/conf.d

  cp ${PACKAGEDIR}/dist/mysql/gentics_custom.cnf /etc/mysql/conf.d
  echo '!includedir /etc/mysql/conf.d/' >> /usr/my.cnf

  # Restart the Mysql Server
  /etc/init.d/mysql restart

1.3 Apache Webserver Installation


  # Install various dependencies
  yum install httpd php php-cli php-mysql php-gd php-posix php-ldap php-imap sed curl wget ImageMagick mysql sudo
  # Enable the httpd
  chkconfig httpd on

  # Change configuration order to enable correct handling of php extensions
  mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/015-php.conf

  # Add vhost configuration to /etc/httpd/conf.d/020-contentnode.conf
  cp ${PACKAGEDIR}/dist/rhel/020-contentnode.conf /etc/httpd/conf.d/

  # Set custom settings for php
  cp ${PACKAGEDIR}/dist/php/gtx_gcn_custom.ini /etc/php.d/
  # Set your timezone in the gtx_gcn_custom.ini (default: Europe/Vienna)

  # Add optional packages and install php-mbstring
  yum-config-manager --enable rhel-6-server-optional-rpms
  yum update
  yum install php-mbstring

1.4 Configure SELinux

Currently SELinux is not fully supported. Please disable SELinux on your server. The features autoupdate and import/export will not work properly when selinux is enabled.

Edit the /etc/sysconfig/selinux file and set the SELINUX flag.


  # Disable SELinux
  SELINUX=disabled

The following settings are not functional since SELinux is not supported. This section gets updated once SELinux is supported.


  # Enable cms internal httpd http connections
  yum -y install policycoreutils-python
  semanage port -a -t http_port_t -p tcp 42889

  # Allow the httpd to write into the specified directories
  chcon -R -t httpd_sys_content_t /Node/node
  chcon -R -t httpd_sys_content_t /Node/tmp

1.5 Configure Firewall

Allow external access to port 80 for http


  # Add firewall rule to enable external access to the httpd server.
  vi /etc/sysconfig/iptables
  # -A INPUT -p tcp -m state --state NEW --dport 80 -j ACCEPT
  service iptables restart

1.6 Package Setup


  # Move package into place - This step must be omitted when doing a migration
  mv ${PACKAGEDIR}/Node /opt
  ln -s /opt/Node/ /Node

1.7 Java setup

Download the official Java SE Development Kit 8 rpm.


  rpm -i jdk-8u25-linux-x64.rpm
  ln -s /usr/java/default /Node/java

Instead of creating the symlink in the above step, you can also correctly configure the variable JAVA_HOME to point to a system-wide installation of Java.

1.8 Filesystem permission setup


  # Creation of mandatory groups and permissions
  groupadd node
  useradd -d /Node -g node node
  usermod -a -G node apache
  usermod -G apache node
  /Node/dist_setperm.sh

  # Add this sudo rule to your sudoers file. This allows the apache to execute processes with the node user.
  echo "Defaults:apache !requiretty" > /etc/sudoers.d/gtx_contentnode
  echo "apache  ALL=(node)NOPASSWD: ALL" >> /etc/sudoers.d/gtx_contentnode
  chmod 0440 /etc/sudoers.d/gtx_contentnode

  # Restart your apache
  /etc/init.d/httpd restart

1.9 Database setup and package configuration


  # Setup the database
  echo "CREATE DATABASE node_utf8" | mysql -u root
  echo "GRANT ALL PRIVILEGES ON node_utf8.* TO 'node_cms'@'localhost' identified by 'YOUR_PASSWORD'" | mysql -u root
  mysql -u root node_utf8 < ${PACKAGEDIR}/dumps/node_utf8.sql

  echo "CREATE DATABASE contentrepository" | mysql -u root
  echo "GRANT ALL PRIVILEGES ON contentrepository.* TO 'node_cr'@'localhost' identified by 'YOUR_PASSWORD'" | mysql -u root
  mysql -u root contentrepository < ${PACKAGEDIR}/dumps/contentrepository.sql

  # Add your license key to /Node/etc/tomcat/gentics/license.key
  echo "1111-2222-3333-4444-5555-6666-7777-8888" > /Node/etc/tomcat/gentics/license.key

  # Configure database settings
  vi /Node/etc/conf.d/node.db.conf
  # Example
  # $SETTINGS["server"] = "localhost:3306:/var/lib/mysql/mysql.sock";
  # $SETTINGS["login"] = "node_cms";
  # $SETTINGS["pw"] = "YOUR_PASSWORD";

  # Start the Tomcat
  /Node/bin/nodectl start

  # Add cronjob task for node user
  crontab -e -u node
  # * * * * *         /Node/bin/scheduler.sh >> /Node/node/log/scheduler.log 2>&1

You maybe also need to configure SSL properties in the $SETTINGS[“jdbcparameters”] setting. Read the MySQL SSL documentation for more information.

1.10 Finalizing

Please also check the final recommendations and suggestions for additional information.

2 Migrating to the new package (introduced with 5.16.0)

This section will list a step by step guide to migrate your Gentics Content.Node installation to the new GCN package structure introduced in 5.16.0. After this migration, GCN will use the system distribution Apache and PHP.

Instead of migrating you can also do a new GCN 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 GCN package inside /Node, running on port 42006. The minimum MySQL server version should be 5.5.

2.1 Backup

Create a backup of your package installation and MySQL database (/Node directory)


  sudo -u node php /Node/.node/setup-database.php
  mysqldump --max_allowed_packet=512M -u root -h localhost -P 42006 -p contentrepository > /Node/etc/dumps/pre-update-cr.sql
  /Node/bin/nodectl stop
  cp -ra /Node /Node.pre-update

2.2 Update Gentics Content.Node

Update your Gentics Content.Node installation to 5.16.0 or newer.

2.3 Distribution update

Make sure your distribution is updated at least to the earliest supported version.

2.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

2.5 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 GCN 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 Content.Node installation on the same system as GCN is running on.

It is advised to update the database settings (/etc/mysql) and restart the server before starting the MySQL migration.

See MySQL Server Installation for the MySQL Server installation steps

2.6 Database migration


  # Create SQL Dump and delete old mysql installation
  mysqldump --max_allowed_packet=512M -u root -h 127.0.0.1 -P 42006 -p node_utf8 > /Node/tmp/node_utf8-postupdate.sql
  mysqldump --max_allowed_packet=512M -u root -h 127.0.0.1 -P 42006 -p contentrepository > /Node/tmp/cr-postupdate.sql
  /Node/bin/nodectl stop
  rm -rf /Node/mysql*

  # Update MySQL Server configuration
  cp ${PACKAGE}/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.

2.7 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/httpd/httpd*
  rm -rf /Node/var/httpd/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)

2.8 Package Apache webserver migration

Install and configure the Apache webserver according to the installation steps.

2.9 Additional migration steps


  # Add new apache vhosts inclusion files from the package
  cp -ra ${PACKAGEDIR}/Node/etc/apache /Node/etc

2.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.


  cp ${PACKAGEDIR}/Node/dist_setperm.sh /Node/