How To Install PyroCMS on an Ubuntu 14.04 VPS


pyrocms vpsPyroCMS is a lightweight CMS built with the very popular PHP framework CodeIgniter, simple enough for any developer to create custom modules and for any end user to understand how PyroCMS works.
The installation of PyroCMS on an Ubuntu VPS should take about five minutes if you follow the very easy steps described below.


This install guide assumes that Apache, PHP and MySQL are already installed and configured on your Ubuntu based virtual server.
At the time of writing this tutorial, the latest stable version available is PyroCMS 2.2.5 and it requires:

  •     Apache Web Server >= 2.0 compiled with mod_rewrite module;
  •     PHP >= 5.2 with the following PHP extensions enabled: GD Graphics Library version 2.0.x, mcrypt and cURL.
  •     MySQL >= 5.0 installed on your Linux virtual server.
  •     CodeIgniter 2.1.x, jQuery 1.6.x and Lex – these third-party packages are included in each PyroCMS release.

Download the latest stable version of PyroCMS available at https://www.pyrocms.com/ to the server and extract the downloaded archive to the document root of your web server:

cd /tmp/
wget --no-check-certificate https://www.pyrocms.com/downloads/v2.2.5 -O pyrocms.zip
unzip -d /var/www/html/ pyrocms.zip
mv /var/www/html/pyrocms* /var/www/html/pyrocms

Create a new virtual host directive in Apache. For example, create a new Apache configuration file named ‘pyrocms.conf’:

vi /etc/apache2/sites-available/pyrocms.conf

and add the following lines:

<VirtualHost *:80>
   ServerAdmin admin@your-domain.com
   DocumentRoot /var/www/html/pyrocms/
   ServerName your-domain.com
   ServerAlias www.your-domain.com
      <Directory /var/www/html/pyrocms/>
         Options Indexes FollowSymLinks MultiViews
         AllowOverride All
         Order allow,deny
         allow from all
      </Directory>
   ErrorLog /var/log/apache2/your-domain.com-error_log
   CustomLog /var/log/apache2/your-domain.com-access_log common
</VirtualHost>

Then, execute the following command on your virtual server:

ln -s /etc/apache2/sites-available/pyrocms.conf /etc/apache2/sites-enabled/pyrocms.conf

Locate the PHP configuration file using the following command:

php -i | grep php.ini
Configuration File (php.ini) Path => /etc/php5/cli
Loaded Configuration File => /etc/php5/cli/php.ini

Edit the ‘php.ini’ PHP configuration file and add/modify the following lines:

vi /etc/php5/cli/php.ini
magic_quotes_runtime = Off
date.timezone = US/Central

The ‘mcrypt.ini’ file in ‘/etc/php5/conf.d’ needs to be copied or sym-linked to ‘/etc/php5/mods-available’:

cd /etc/php5/mods-available
sudo ln -s ../conf.d/mcrypt.so
sudo php5enmod mcrypt

Activate the mod_rewrite module using:

sudo a2enmod rewrite

Restart the Apache web server for the changes to take effect:

service apache2 restart

Make the document root and the PyroCMS files and directories in it writable by the Apache server which is running as user ‘www-data’ and group ‘www-data’ by executing the following command:

chown www-data:www-data -R /var/www/html/pyrocms/

Create a new MySQL database for PyroCMS using the following commands:

mysql -u root -p
mysql> CREATE DATABASE pyrodb;
mysql> GRANT ALL PRIVILEGES ON pyrodb.* TO 'pyrouser'@'localhost' IDENTIFIED BY 'your-password' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;
mysql> quit

Open http://your-domain.com using a web browser and follow the easy instructions.

That is it. The pyrocms installation is now complete.

You can log in to the PyroCMS administrator back-end using administrator login credentials and start using it.

pyrocms back-end

For security reasons, it is recommended to delete the install directory (‘/var/www/html/pyrocms/installer’) once you are done with the installation process.

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 PyroCMS 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.

Tutorials
Install WordPress with Nginx on openSUSE
Tutorials
Install Glassfish 4 on a Debian 8 VPS
Tutorials
How to install xCache on a CentOS 7 VPS
There are currently no comments.