Skip to main content


Task-driven tutorials and recipes for PageSeeder

How to configure CentOS/Amazon Linux for Berlioz

Skills requiredBasic Linux knowledge
Time required (minutes)30
Intended audienceDeveloper / Systems Administrator


The purpose of this tutorial is to outline the steps required to prepare an installation of CentOS or Amazon Linux for PageSeeder and Berlioz. By the end of this tutorial you will have a working installation of PageSeeder and Jetty that can be used as a base for other PageSeeder and Berlioz tutorials.

For developers that prefer the convenience of EC2 AMIs, a pre-configured AMI containing PageSeeder is available - search for ami-fdbf989e in public images. t2.medium is the smallest recommended instance size for running both Berlioz and PageSeeder. Once an instance has been instantiated, install Berlioz by following the tutorial from step 3 onwards.


  • For a native install, a working install of CentOS 6-7, Amazon Linux, or another Red Hat-based distribution.
  • For a virtual install, any operating system supported by Vagrant.


This tutorial is written for Linux distributions based on, or derived from, Red Hat Enterprise Linux and Vagrant for Windows. Developers using Mac OS X and Linux can also use Vagrant, but in the interests of clarity, this tutorial is focused on Windows.

Install Vagrant on Windows

Installing Vagrant requires administrator privileges on the host system.

Download the latest version of Vagrant from the following URL: 

Once downloaded, double-click the MSI file to begin the installation. Accept the defaults, or change them as required. When the setup wizard is complete, click Finish and if prompted, restart Windows.

Configuring Vagrant

Once installed, initialise Vagrant in a working folder, and install a Vagrant box. Boxes are pre-built images that eliminate the need to manually install an Operating System. For this tutorial, the Vagrant box is built from CentOS 7.

Select a directory to use as a working folder, for example:


Open a command prompt, and enter the following:

> mkdir C:\Vagrant\Berlioz
> cd C:\Vagrant\Berlioz
> vagrant init centos/7
> vagrant box add centos/7

If the folder was successfully initialised, you should see the following message:

A `Vagrantfile` has been placed in this directory. You are now ready
to `vagrant up` your first virtual environment! Please read the comments
in the Vagrantfile as well as documentation on `` for more
information on using Vagrant.

to start the container, run

vagrant up

after the machine has booted, to enter the container, run

vagrant ssh

when the following shell prompt:

[vagrant@localhost ~]#

By default, Vagrant will synchronises the working folder with the


This lets you to add files to the box without the need to use external tools. For troubleshooting, refer to the Vagrant documentation, found at the following link: 

Install Java

Once CentOS 7 is installed virtually or natively, Java can be installed using the following command:

# sudo yum install -y java-1.8.0-openjdk

Use the following command to ensure that the OpenJDK 1.8.0 is the default Java:

# sudo alternatives --config java

When presented with a list of options, select the number appropriate for the version of Java installed and press <Enter>

Install Jetty

Unlike Java, a Jetty package is not available through standard distro repositories so it must be manually downloaded and installed.

As of the time of writing, the latest version of Jetty tested for PageSeeder and Berlioz is 9.2.14. For the Jetty home folder and Jetty base use these respective folders: 


Enter the following commands to create the folder structure and download Jetty:

Create folder structure

# sudo mkdir -p /opt/jetty/base/logs
# cd /opt/jetty

Download Jetty

# sudo curl -O
# sudo tar zxvf jetty-distribution-9.2.14.v20151106.tar.gz
# sudo ln -s jetty-distribution-9.2.14.v20151106 default

Create Jetty user

# sudo useradd --home-dir /opt/jetty jetty

Create Jetty defaults

# sudo cat <<EOF > /etc/default/jetty
JAVA_OPTIONS="-Dberlioz.mode=live -Xdebug -Xrunjdwp:transport=dt_socket,address=6006,server=y,suspend=n"

Fix permissions

# sudo chown -R jetty:jetty /opt/jetty

Install Jetty as a service

# sudo ln -s /opt/jetty/default/bin/ /etc/init.d/jetty
# sudo chkconfig jetty on
# sudo service jetty start

Install Berlioz

The Berlioz base can be downloaded from the Github repository: 

Once the repository has been cloned, build the project in an appropriate development environment. The default folder for Berlioz installations is:


Install PageSeeder (optional)

Java and MySQL Server are prerequisites for installing PageSeeder. 

MySQL 5.7 is currently unsupported, and may result in unexpected application behaviour. MySQL 5.6 has been well tested and is the recommended version for new installations. MariaDB, a database that is binary compatible with MySQL and is available through the EPEL repository, will also work.

Install PageSeeder with the following commands:

# sudo yum install -y mysql-server
# sudo rpm -Uvh
# sudo yum install -y pageseeder
# cd ~
# curl -O
# tar zxvf mysql-connector-java-5.1.36.tar.gz
# sudo service pageseeder config

For further instructions on configuring PageSeeder, see New installation.

Created on , last edited on

Available tutorials