Install Zenario with Apache, PHP and MariaDB on CentOS 7
In this article we will install Zenario on a CentOS 7 VPS with Apache, PHP and MariaDB.
To run Zenario on your server you have to install the following requirements
- Apache Server version 2
- PHP version 5.3 or later
- MySQL version 5.0 or later
- An empty MySQL database to install to
- The GD, libCurl, libJPEG and libPNG libraries, and multibyte support in PHP
- Apache mod_rewrite support for .htaccess files (optional but highly recommended)
Log in to your server via SSH as user root
and run the following command to update all packages on your server
yum -y update
Zenario needs an SQL database to store the information. Run the following command to install MariaDB database server
yum install mariadb mariadb-server
Start the MariaDB database server and enable it to start at the boot time
systemctl start mariadb systemctl enable mariadb
In order to secure MariaDB and set the MariaDB root password we will run the ‘mysql_secure_installation’ script.
Now, log in to the MariaDB server using the ‘root’ user and create new database end user.
mysql -u root -p CREATE DATABASE zenario; CREATE USER 'zenariouser'@'localhost' IDENTIFIED BY 'PASSWORD'; GRANT ALL PRIVILEGES ON `zenario`.* TO 'zenariouser'@'localhost'; FLUSH PRIVILEGES;
Do not forget to replace ‘PASSWORD’ with an actual strong password.
Next, we will install Apache web server
yum install httpd
Same as we did with MariaDB, start the Apache web server and add it to automatically start on the system start-up
systemctl start httpd systemctl enable httpd
Execute the following command to install PHP among with few PHP modules
yum install php php-gd php-common
Go to Zenario’s official website and download the latest stable release of the software. At the moment of writing this article it is version 7.0.6.
Unpack the zip archive in the document root directory of your server
unzip zenario-probusiness-7.0.6b.zip -d /var/www/html/
Rename the directory
mv zenario-probusiness-7.0.6b/ zenario
All files have to be readable by the web server, so we need to set the proper ownership
chown -R apache:apache /var/www/html/zenario
We need to create two directories, ‘backup’ and ‘docstore’ outside of the document root directory.
mkdir /var/www/backup mkdir /var/www/docstore
and change the ownership of the directories
chown apache:apache /var/www/backup chown apache:apache /var/www/docstore
Next, create Apache virtual host for your domain. Create ‘/etc/httpd/conf.d/vhosts.conf’ directory with the following content
vim /etc/httpd/conf.d/vhosts.conf IncludeOptional vhosts.d/*.conf
and create the virtual host
mkdir /etc/httpd/vhosts.d/ vim /etc/httpd/vhosts.d/yourdomain.com.conf <VirtualHost YOUR_SERVER_IP:80> ServerAdmin [email protected] DocumentRoot "/var/www/html/zenario/" ServerName yourdomain.com ServerAlias www.yourdomain.com ErrorLog "/var/log/httpd/yourdomain.com-error_log" CustomLog "/var/log/httpd/yourdomain.com-access_log" combined <Directory "/var/www/html/zenario/"> DirectoryIndex index.html index.php Options FollowSymLinks AllowOverride All Require all granted </Directory> </VirtualHost>
Restart the web server for the changes to take effect.
systemctl restart httpd
Finally, open a web browser and access http://yourdomain.com to run the Zenario installer and finish the installation. More information about Zenario you can find at their official documentation.
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 install Zenario 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.