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.

[email protected]:~# yum -y update
[email protected]:~# yum install wget

Install MariaDB and create a database.

To install MariaDB server run the following command:

[email protected]:~# yum install mariadb-server mariadb

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

[email protected]:~# systemctl start mariadb.service
[email protected]:~# 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:

[email protected]:~# 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

[email protected]:~# mkdir -p /var/www/html/
[email protected]:~# cd /var/www/html/
[email protected]:~# wget
[email protected]:~# tar -vxjf ezpublish5_community_project-2014.11.1-gpl-full.tar.bz2
[email protected]:~# mv ezpublish5_community_project-2014.11.1-gpl-full/* .
[email protected]:~# 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:

[email protected]:~# yum install nginx php-fpm php-cli php-mysqlnd php-mbstring php-gd php-curl php-pdo php-xml
[email protected]:~# systemctl start php-fpm.service
[email protected]:~# systemctl enable php-fpm.service
[email protected]:~# systemctl start nginx.service 
[email protected]:~# 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.

[email protected]:~# 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

[email protected]:~# 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

[email protected]:~# systemctl restart php-fpm

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

[email protected]:~# mkdir /var/lib/php/session
[email protected]:~# 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:

[email protected]:~# nginx -t

[email protected]:~#  systemctl restart nginx

Set the correct permissions

[email protected]:~# 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/

    • Change ‘’ with your domain name and follow the instructions closely.

Leave a Comment

To prove you are human please solve the following *