Install eZ Publish Community Project on a CentOS 7 VPS with Nginx and PHP-FPM

install-ez-publish-community-project-on-a-centos-7-vps-with-nginx-and-php-fpmIn this tutorial, we will show you how to install eZ Publish Community edition on a CentOS 7 VPS with Nginx, MariaDB and PHP-FPM. eZ Publish Community edition is an open source enterprise PHP content management system build on top of Symfony framework. This guide should work on other Linux VPS systems as well but was tested and written for a CentOS7 VPS.  

Update the system and install necessary packages.

root@vps:~# yum -y update
root@vps:~# yum install wget

Install MariaDB and create a database.

To install MariaDB server run the following command:

root@vps:~# yum install mariadb-server mariadb

To start the service and enable it at the boot time run:

root@vps:~# systemctl start mariadb.service
root@vps:~# systemctl enable mariadb.service

It is very important to secure your MariaDB server, run the following script before creating and populating the databases.


Once you are finished with the step above, login as a MariaDB root and create an new database and user:

root@vps:~# mysql -uroot -p
MariaDB [(none)]>> create database ezpublish;
MariaDB [(none)]>> GRANT ALL PRIVILEGES ON ezpublish .* TO 'ezpublish '@'localhost' IDENTIFIED BY 'ezpublishPassword';
MariaDB [(none)]>> flush privileges;
MariaDB [(none)]>> \q;

Create a root directory for your web site and extract eZ Publish

root@vps:~# mkdir -p /var/www/html/
root@vps:~# cd /var/www/html/
root@vps:~# wget
root@vps:~# tar -vxjf ezpublish5_community_project-2014.11.1-gpl-full.tar.bz2
root@vps:~# mv ezpublish5_community_project-2014.11.1-gpl-full/* .
root@vps:~# rm -rf ezpublish5_community_project-2014.11.1-gpl-full

Install and configure PHP and Nginx

Installing PHP and Nginx is pretty easy, just run the following command:

root@vps:~# yum install nginx php-fpm php-cli php-mysqlnd php-mbstring php-gd php-curl php-pdo php-xml
root@vps:~# systemctl start php-fpm.service
root@vps:~# systemctl enable php-fpm.service
root@vps:~# systemctl start nginx.service 
root@vps:~# systemctl enable nginx.service

We need to make some changes in the php.ini, open the file and set the memory_limit to 256M and date.timezone to your timezone.

root@vps:~# vim /etc/php.ini
memory_limit = 256M
date.timezone = America/Chicago

To change PHP-FPM to listen on a unix socket, open the default www pool

root@vps:~# vim /etc/php-fpm.d/www.conf

and change from

listen =


listen = /var/run/php-fpm/php-fpm.socket

and restart the service for changes to take effect

root@vps:~# systemctl restart php-fpm

Create a php session directory and change the ownership to apache (the user under which PHP runs).

root@vps:~# mkdir /var/lib/php/session
root@vps:~# chown apache:apache /var/lib/php/session

Copy the /var/www/html/ directory in your /etc/nginx/ directory.

cp /var/www/html/ /etc/nginx/

Copy the example nginx configuration /var/www/html/ into /etc/nginx/sites-available/

cp /var/www/html/ /etc/nginx/conf.d/

and edit the nginx configuration file to suit your needs. Test the Nginx configuration and restart the server by running the following commands:

root@vps:~# nginx -t

root@vps:~#  systemctl restart nginx

Set the correct permissions

root@vps:~# chown -R apache:apache /var/www/html/

That’s it. Now open your browser, type the address and follow the installation wizard. For more information, please check out the official eZ Publish Community Project website.

Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to set this up for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

3 thoughts on “Install eZ Publish Community Project on a CentOS 7 VPS with Nginx and PHP-FPM”

  1. Hi

    ez_params.d at this location /var/www/html/ does not exist ! how create it ?

    Same problem with sites-available/ in the following command :
    cp /var/www/html/ /etc/nginx/conf.d/


Leave a Comment

To prove you are human please solve the following *