eZ Community » Blogs » Thiago Campos Viana » Tip: Installing eZ publish 5 on Ubuntu


Tip: Installing eZ publish 5 on Ubuntu

Tuesday 26 February 2013 9:56:30 pm

  • Currently 5 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

In this blog post I will show how to install eZ publish 5 on Ubuntu.

Download eZ publish 5 ( tar.gz ).

Move the file to /var/www/

Let's start unpacking eZ publish and renaming its directory to ez5:

tar zxf ezpublish5_community_project-2013.1-gpl-full.tar.gz
mv ezpublish5_community_project-2013.1-gpl-full ez5

Now let's create a database (ez5) and an user (ez5) to the database:

mysql -u root -p -e "CREATE DATABASE ez5 CHARACTER SET utf8 COLLATE utf8_unicode_ci;"
mysql -u root -p -e "CREATE USER 'ez5'@'localhost' IDENTIFIED BY 'ez5';"
mysql -u root -p -e "GRANT ALL PRIVILEGES ON ez5.* TO 'ez5'@'localhost' WITH GRANT OPTION;"

Now let's move to the ezpublish 5 dir and create the symlinks:

cd ez5
php ezpublish/console assets:install --symlink web
php ezpublish/console ezpublish:legacy:assets_install --symlink web

Let's create a hostname to ez publish 5. Add the following line to /etc/hosts       ez5

Now let's create /etc/apache2/sites-available/ez5:

 <VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName ez5
 DocumentRoot /var/www/ez5/web
   <Directory /var/www/ez5/web>
        Options FollowSymLinks
        AllowOverride All

Next step - enable this site:

sudo a2ensite ez5
sudo /etc/init.d/apache2 restart

Also we can't forget to create our .htaccess file, just copy the one at ezpublish_legacy/.htaccess_root to web, rename it to .htaccess and add these two lines below "RewriteRule ^var/storage/packages/.* - [L]":

RewriteRule ^index_dev\.php - [L]
RewriteRule ^bundles/.* - [L]

Now open your browser, type http://ez5/ hit enter and you'll see the installation screen, just follow the instructions and finish it. From now you can try more advanced topics like the getting started tutorial. If you find any problem on this getting started tutorial you can try clear your cache (rm -Rf ezpublish/cache/*) or regenerate the symlinks (php ezpublish/console assets:install --symlink web) or check the console list to find the new bundles (php ezpublish/console list).

If you have any problems setting up apache and php on your ubuntu dev machine, you can check my tip about ubuntu setup.

Also check: http://partialcontent.com/code/working-with-ez-publish-5-introduction

Hope you guys appreciate this tip, see you at ezsummit in Cologne.


Don't forget to install PHP XSLT support (sudo apt-get install php5-xsl) 

Thanks Joe Kepley.

Proudly Developed with from