How to install October CMS on a CentOS 7 VPS
RoseHosting is proud to be an Official OctoberCMS Partner –
October CMS is a free content management software based on the Laravel PHP Framework, with the best back-end user interface ever seen in a CMS.
In this tutorial, we will show you the steps needed to install October CMS on a CentOS 7 VPS.
At the time of writing this tutorial, the latest stable version of October CMS is October CMS build 347 and it requires:
- PHP 5.5.9 or higher, compiled with cURL, PDO, OpenSSL, Mbstring ZipArchive and GD PHP Library enabled.
- Apache Web Server 2.0 or higher compiled with mod_rewrite module;
- MySQL, MariaDB, PostgreSQL or SQLite.
This install guide assumes that Apache and MySQL (or MariaDB) are already installed and configured on your virtual server.
CentOS 7 comes with PHP 5.4.16 version installed via yum, not PHP 5.5 or higher. In order to install PHP 5.5.9 or higher, add the EPEL and Webtatic EL yum repositories information to yum:
wget https://mirror.webtatic.com/yum/el7/epel-release.rpm rpm -Uvh epel-release.rpm wget https://mirror.webtatic.com/yum/el7/webtatic-release.rpm rpm -Uvh webtatic-release.rpm
Remove php 5.4 version and install php 5.6
yum remove php-common yum install php56w php56w-opcache php56w-cli php56w-common php56w-gd php56w-mbstring php56w-mysql php56w-pdo unzip
Restart Apache for the changes to take effect:
systemctl restart httpd.service
Download the latest version of October CMS available at ‘http://octobercms.com/download’ to a directory on the server and extract it using the following commands:
cd /opt/ wget http://octobercms.com/download -O octobercms.zip unzip octobercms.zip -d /var/www/html/octobercms/
Create a new MySQL database for October CMS on your server:
mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 2 Server version: 5.5.47-MariaDB MariaDB Server Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> create database octobercmsdb; Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> GRANT ALL PRIVILEGES ON octobercmsdb.* TO 'octobercms'@'localhost' IDENTIFIED BY 'Y0uR-Passw0rD'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> flush privileges; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> quit Bye
Create a new virtual host directive in Apache. For example, edit your Apache configuration file (‘/etc/httpd/conf/httpd.conf’ by default) and un-comment the following line:
Then, add the following lines at the end:
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/html/octobercms/install-master/ ServerName yourdomain.com ServerAlias www.yourdomain.com <Directory /var/www/html/octobercms/install-master/> DirectoryIndex index.php Options FollowSymLinks AllowOverride All Require all granted </Directory> ErrorLog logs/yourdomain.com-error_log CustomLog logs/yourdomain.com-access_log common </VirtualHost>
Run the following command to set proper permissions:
chown apache:apache -R /var/www/html/octobercms/
Restart the Apache service for the changes to take effect:
systemctl restart httpd.service
If all requirements are met, click ‘Agree & Continue’ and on the next page, enter MySQL database information:
Database Type: MySQL
MySQL Host: localhost
MySQL Port: 3306
Database Name: octobercmsdb
MySQL Login: octobercms
MySQL Password: Y0uR-Passw0rD
Click ‘Administrator’ and enter admin login credentials, then click ‘Continue. If you want to install October without any plugins or themes, click ‘Start from scratch’. Our recommendation is to click ‘Start from a theme’, select a theme and click ‘Install’. You can easily customize it later via admin back-end.
For security reasons you should delete the installation files, the install.php script and the install_files directory.
rm -rf /var/www/html/octobercms/install-master/install_files/ rm -rf /var/www/html/octobercms/install-master/install.php
Add the following cron entry to your server in order for scheduled tasks to operate correctly:
* * * * * php /var/www/html/octobercms/install-master/artisan schedule:run >> /dev/null 2>&1
Editing the crontab is commonly performed with the command ‘crontab -e’.
Log into the administration area at http://yourdomain.com/backend and customize your website according to your needs.
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 October CMS 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.