Cheap VPS & Xen Server


Residential Proxy Network - Hourly & Monthly Packages

Installing The eZ Publish CMS On An Ubuntu 7.10 Server


eZ Publish is one of the most well known and widespread web content management systems. Because its setup is not trivial, this tutorial shows how to install it on an Ubuntu 7.10 (Gutsy Gibbon) server.

I do not issue any guarantee that this will work for you!

 

1 Preliminary Note

My Ubuntu 7.10 server has the hostname server1.example.com and the IP address 192.168.0.100 in this tutorial. I’m using Ubuntu’s default Apache document root /var/www here – if you’ve set up a vhost with a different document root you’ll have to adjust the paths where appropriate.

The requirements for an eZ Publish installation are listed here; I’ll show how to fulfill these requirements and finally install eZ Publish.

Make sure that you are logged in as root (type in

sudo su

to become root), because we must run all the steps from this tutorial as the root user.

 

2 Installing MySQL 5.0

To install MySQL 5.0, we simply run:

apt-get install mysql-server mysql-client

You will be asked to provide a password for the MySQL root user – this password is valid for the user root@localhost as well as root@server1.example.com, so we don’t have to specify a MySQL root password manually later on (as was the case with previous Ubuntu versions):

New password for the MySQL “root” user: <– yourrootsqlpassword

 

3 Installing Apache2

eZ Publish works with Apache 1.3 and Apache 2. If we use Apache 2, we must install the prefork variant as follows:

apt-get install apache2 apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert

 

4 Installing PHP5

eZ Publish depends on a lot of PHP extensions/functions (see the requirements page), e.g. MySQL, zlib, DOM, session support, PCRE support, GD2 support, CLI support, mbstring, exif, curl, etc. which we can install as follows:

apt-get install libapache2-mod-php5 php5 php5-common php5-gd php5-curl php5-dev php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-mysql php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-cli imagemagick

You will be asked the following question:

Continue installing libc-client without Maildir support? <– Yes

Now we have to enable some Apache modules (SSL, rewrite, suexec, and include):

a2enmod ssl
a2enmod rewrite
a2enmod suexec
a2enmod include

Reload the Apache configuration:

/etc/init.d/apache2 force-reload

Now open the php.ini

vi /etc/php5/apache2/php.ini

… and make sure that PHP has enough memory to run eZ Publish. It needs at least 64MB (the more the better), so you should have something like this in your php.ini:

[...]
memory_limit = 128M      ; Maximum amount of memory a script may consume (128MB)
[...]

In the same file, we need to specify the correct timezone for the server (you can find a list of all timezones here: http://de3.php.net/timezones), e.g. like this:

[...]
[Date]
; Defines the default timezone used by the date functions
date.timezone = Europe/Berlin
[...]

Afterwards we restart Apache:

/etc/init.d/apache2 restart

Next create the following file…

vi /var/www/info.php

<?php
phpinfo();
?>

… and call it in a browser (e.g. http://192.168.0.100/info.php). In the output you should now find all required PHP extensions:

1

2

3

4

5

6

7

8

9

10

11

12

5 Installing eZ Components

eZ Components is a PHP components library needed by eZ Publish. We can install it as follows:

pear channel-discover components.ez.no

pear install -a ezc/eZComponents

6 Preparing MySQL

Now we create a database for eZ Publish (we name the database ezpublish) and a database user (which we name ezpublish as well). First, log in to MySQL:

mysql –host=localhost –port=3306 -u root -p

On the MySQL shell, run the following commands:

CREATE DATABASE ezpublish CHARACTER SET utf8;
GRANT ALL ON ezpublish.* TO ezpublish@localhost IDENTIFIED BY ‘ezpublishsqlpassword’;
FLUSH PRIVILEGES;

Make sure that you replace ezpublishsqlpassword with a password of your choice.

Then type

quit

to leave the MySQL shell.

 

7 Installing eZ Publish

Next we download eZ Publish from http://ez.no/content/download, e.g. like this:

cd /tmp
wget http://ez.no/content/download/218812/1467959/file/ezpublish-4.0.0-gpl.tar.gz

Then we uncompress eZ Publish:

tar zxvf ezpublish-4.0.0-gpl.tar.gz -C /var/www

This creates the directory ezpublish-4.0.0 in /var/www which we rename to ezpublish:

mv /var/www/ezpublish-4.0.0 /var/www/ezpublish

(If you don’t want to use eZ Publish in a subdirectory of /var/www, you can copy the contents of the ezpublish directory to /var/www:

cd /var/www/ezpublish
cp -pfr * ../
cd ../
rm -fr ezpublish

)

Now we can run eZ Publish’s web based installer. Call http://192.168.0.100/ezpublish/ in a browser, and the installer should come up.

Select the installation language:

13

On the second page the installer checks your system. If the installer tells you to make some changes, you should execute them on the shell:

14

For example, I had to do the following changes:

cd /var/www/ezpublish
chmod -R ug+rwx design extension settings settings/override settings/siteaccess settings/siteaccess/admin var var/cache var/storage
chown -R www-data:www-data design extension settings settings/override settings/siteaccess settings/siteaccess/admin var var/cache var/storage

cd /var/www/ezpublish
mkdir -p var/cache/codepages \
var/cache/content \
var/cache/ini \
var/cache/override \
var/cache/template \
var/cache/template/process \
var/cache/template/tree \
var/cache/texttoimage \
var/cache/translation \
var/log \
var/storage/original \
var/storage/reference \
var/storage/variations

Then refresh the page in your browser. In my case, it told me to also run these commands:

cd /var/www/ezpublish
chmod -R ug+rwx var/cache/codepages var/cache/content var/cache/ini var/cache/override var/cache/template var/cache/template/process var/cache/template/tree var/cache/texttoimage var/cache/translation var/log var/storage/original var/storage/reference var/storage/variations
chown -R www-data:www-data var/cache/codepages var/cache/content var/cache/ini var/cache/override var/cache/template var/cache/template/process var/cache/template/tree var/cache/texttoimage var/cache/translation var/log var/storage/original var/storage/reference var/storage/variations

Refresh the page until the system chekc is ok, then click on Next >.

On the next page you must specify the method to send out mail. If you have Postfix, Sendmail, Exim, or any other MTA installed, you can use the first option, otherwise specify a mail server that can be used to send mail:

15

On the next page I chose MySQL

16

… and then I typed in the MySQL settings:

17

Select the required languages that eZ Publish should support:

18

Select the default layout for your web site (this can be changed later on):

19

20

The site package I’ve chosen supports English (United Kingdom) and French (France), however, only English (American) was installed, so I had to map English (United Kingdom) to English (American) and skip French:

21

The site package I’ve chosen supports English (United Kingdom) and French (France), however, only English (American) was installed, so I had to map English (United Kingdom) to English (American) and skip French:

21

Select URL as the site access method:

22

You can accept the default settings on the following page:

23

Then type in the details for the site administrator:

24

Then type in the details for the site administrator:

24

If you see something like this…

25

… you should run the given command, e.g.:

cd /var/www/ezpublish
cp .htaccess_root .htaccess

Now you can choose if you want to send details about your eZ Publish installation to eZ Systems or not:

26

That’s it, your eZ Publish installation is now finished:

27

  • eZ Publish: http://ez.no/ezpublish
  • Ubuntu: http://www.ubuntu.com

 

Comments

comments