Skip to content

Installation: Ubuntu & Apache

In this tutorial you will learn how to install imperia CMS on an Apache web server 2.4 and on an Ubuntu 18.04 server.

Prerequisites#

The following steps must be completed before you can follow the instructions:

  • You need access to a Ubuntu 18.04 server.

  • Make sure that a sudo user is available on your server: The steps in this tutorial are performed with a non-root user named "otto" with sudo privileges. How to create a user with sudo privileges is explained in the Ubuntu guide.

  • The Apache web server should already be installed and configured. In the Ubuntu Guide, you will learn how to install the Apache web server.

Download imperia CMS and prepare installation#

Step 1: Download installation package#

The installation package can be downloaded from imperia's Support page.

It is a Tar.gz archive file, which may have a file name like: imperia-11.0.0.tar.gz

Step 2: Transfer installation package to server#

Copy this file to the server where you want to install imperia CMS. It is a good idea to copy the file to /tmp, as the installation package is no longer required after installation.

How exactly you transfer the installation package to the Ubuntu server is up to you. One possibility is the command line tool scp:

scp ~/Downloads/imperia-11.0.0.tar.gz otto@ubuntuserver:/tmp

Step 3: Extract installation package#

Connect via ssh to the server you would like to install imperia CMS on, e.g. with the command line tool ssh:

ssh otto@ubuntuserver

Navigate to the directory to which you previously copied the installation package:

cd /tmp

Unpack the installation file:

sudo -u www-data tar xzf imperia-11.0.0.tar.gz 

Note

Here you unpack the installation package as www-data so that you can execute the included installation script as www-data.

Step 4: Set up root directory for imperia CMS#

Next, create a directory for imperia CMS on the server. This directory is the root directory of imperia CMS.

sudo mkdir -p /var/www/imperia/dev

Note

You can select any directory here. In this tutorial /var/www/imperia/dev is used as root directory.

Now transfer the directory rights to the user www-data:

sudo chown www-data:www-data /var/www/imperia/dev

This is necessary for the web server user to be able to write here.

Step 5: Install installation requirements#

Before you can install imperia CMS on your server, some software dependencies have to be installed.

Start by updating the local package index to take the latest changes into account:

sudo apt-get update

With this command you simply install the software packages from the Ubuntu repository:

sudo apt-get install -y libdbd-sqlite3-perl perlmagick

In this way, you install the lightweight SQLite database including the associated Perl interface and the image processing software ImageMagick as well as the associated Perl interface.

Install imperia CMS#

Step 1: Run installation script#

Install imperia CMS by running the Perl installation script as user www-data:

sudo -u www-data perl /tmp/imperia-11.0.0/install.pl -s /var/www/imperia/dev/site

Note

The above command assumes that your installation files are in the /tmp directory and that you are running imperia 11.0.0.

Step 2: Select editorial system#

In the dialog you are first asked whether you want to install an editorial system (develop) or a target system (live):

Server type (develop/live) to be installed [develop]:

Since an editorial system is to be installed here, confirm the preselection develop with ENTER.

Step 3: Specify the site directory#

Then enter the path for the site directory. The software will be installed in this directory and the template and user data can also be found here.

Absolute path to your site directory [/var/www/imperia/dev/site]:

The root directory is extended by the path /site by default. You can leave this preselection as it is and confirm with ENTER.

Step 4: Specify the HTDOCS directory#

Next the path for the htdocs directory should be specified. This directory contains the staging website and some system data.

Absolute path to your web server document root [/var/www/imperia/dev/htdocs]:

The root directory is extended by the path /htdocs by default. You can leave this preselection as it is and confirm with ENTER.

Step 5: Specify CGI directory#

Then the path for the CGI directory should be specified. This directory contains CGI scripts and is not actually needed for a minimal installation. If you are considering using imperia CMS's full-text search, you should still set it up.

Absolute path to your web server CGI directory [/var/www/imperia/dev/cgi-bin]:

Since this manual installs imperia CMS under mod_perl, no CGI directory is required. Therefore enter none and confirm with ENTER to skip the setup.

Step 6: Check and confirm#

Once all the questions have been answered, the installation script lists all the details again and asks you to start the installation.

Operating system type                     :  'Unix' (linux)
Server type to be installed               :  'develop'
Absolute path to CGI-BIN directory        :  none
Absolute path to SITE-DIR directory       :  '/var/www/imperia/dev/site'
Absolute path to DOCUMENT-ROOT directory  :  '/var/www/imperia/dev/htdocs'

Do you want to start the installation (Yes|no)? 

Check the list and confirm the preselection (Yes) with ENTER.

If you want to correct an error, enter "no" and repeat from step 2.

After you have confirmed the entries, imperia will be installed in the directory you specified.

Step 7: Memorize superuser password#

A superuser password is generated at the end of the installation process. Make a note of it, you will need it later.

Example password from an installation process:

**************************************************************************
**************************************************************************
** The superuser password for this installation is:                     **
**                                                                      **
**    NlMTe2Ds1K                                                        **
**                                                                      **
** You can change it to your taste once you have logged in.             **
**************************************************************************
**************************************************************************

Note

Search the site/logs/install.log file for "superuser password" if you missed the output. Remember to change the password once you are logged in. The corresponding username is "superuser".

Configure the web server#

Step 1: Install mod_perl#

mod_perl is a module for the Apache web server that integrates a Perl interpreter into the web server. Fortunately, it is located in the default Ubuntu repository.

sudo apt-get install -y libapache2-mod-perl2

Step 2: Create and configure Vhost#

Create a virtual host file for the imperia editorial system.

sudo vi /etc/apache2/sites-available/imperia-dev.conf

Insert the following instructions into the vHost file.

listen 2504


<VirtualHost *:2504>
    ServerAdmin admin@imperiaCMSwebsite.de
    ServerName imperiaCMSwebsite.de
    ServerAlias www.imperiaCMSwebsite.de

    DocumentRoot /var/www/imperia/dev/htdocs
    ScriptAlias /cgi-bin /var/www/imperia/dev/cgi-bin

    AddDefaultCharset UTF-8

    <Directory /var/www/imperia/dev>
        Options +Indexes +Includes
        AllowOverride all
                AddType text/html .shtml
                AddOutputFilter INCLUDES .html .shtml
                Options +IncludesNOEXEC
        Order allow,deny
                Allow from all
    </Directory>

    <Directory /var/www/imperia/dev/cgi-bin>
        Options ExecCGI
    </Directory>

    <Directory /var/www/imperia/dev/htdocs/imperia/images>
        Options +Indexes
        IndexOptions FancyIndexing
    </Directory>

    PerlOptions +Parent
    PerlModule Apache2::RequestRec
    PerlModule Apache2::compat


    <Perl>
        unshift @INC, '/var/www/imperia/dev/site/modules/core';
        unshift @INC, '/var/www/imperia/dev/site/modules/collection';
        unshift @INC, '/var/www/imperia/dev/site/modules/fallback';
        $ENV{IMPERIA_BASE_DIR} = "/var/www/imperia/dev"; 
    </Perl>


    <Location ~ "/imp($|/)">
        SetHandler modperl
        PerlResponseHandler Imperia::Core::Backends::ModPerl20
    </Location>

    ErrorLog /var/www/imperia/dev/site/logs/error.log
    CustomLog /var/www/imperia/dev/site/logs/access.log common

</VirtualHost>

Step 4: Activate Vhost file#

Activate your virtual host file by running the following command in your terminal:

sudo a2ensite imperia-dev.conf

Restart the Apache web server to make the changes work:

sudo service apache2 restart

Login to imperia CMS#

Step 1: Call imperia CMS in your browser#

imperia CMS now runs under the IP of the server and under the port that you configured in the Apache web server configuration file.

Example URL

http://159.69.60.4:2504/imp/

Step 2: Login to imperia CMS#

Log in with the name superuser and the noted password.

Name: superuser
Passwort: NlMTe2Ds1K

How do you proceed from here?#

If imperia CMS is now running and can be accessed via your browser, you can now log in as a superuser and start with the administration of the system. Continue here:

Administration documentation

In this tutorial you have only installed the editorial system. However, since imperia CMS is a staging system, you also need to install a target system. This relationship is described in the operating concept:

Operating concept of imperia