There is a new version of this tutorial available for Ubuntu 18.04 (Bionic Beaver).

How to Install OctoberCMS on Ubuntu 16.04 LTS

This tutorial exists for these OS versions

On this page

  1. Prerequisites
  2. Getting Started
  3. Install LAMP SERVER
  4. Configure MariaDB
  5. Install OctoberCMS
  6. Access OctoberCMS

OctoberCMS is a free, open source and self hosted content management system written in PHP and based on the Laravel framework. OctoberCMS allows you to create your own blog or website without any programming language. It supports various databases like, SQLite, MySQL and PostgreSQL.

OctoberCMS offers lot's of features, some of them are listed below:

  • Comes with built in the powerful Ajax framework.
  • Provides a file manager with CDN support and image cropping
  • Light weight and user friendly administrative interface.
  • Uses a flat file database for the front end structure.

In this tutorial, we will explain how to install and configure OctoberCMS on Ubuntu 16.04 server.

Prerequisites

  • A server running Ubuntu 16.04.
  • A non-root user with sudo privileges.

Getting Started

Before starting, it is recommended to update your system with the latest stable version. You can do this with the following command:

sudo apt-get update -y
sudo apt-get upgrade -y

Once your system is updated, restart the system to apply all the changes.

Install LAMP SERVER

OctoberCMS runs on Apache web server. So you will need to install LAMP server to your system. First, install Apache web server with the following command:

sudo apt-get install apache2 libapache2-mod-php7.0 -y

Next, start the Apache service and enable it to start on boot with the following command:

sudo systemctl start apache2
sudo systemctl enable apache2

Next, install MariaDB, PHP and other PHP modules with the following command:

sudo apt-get install mariadb-server php7.0 php7.0 php7.0-mysql php7.0-curl php7.0-gd php7.0-json php7.0-opcache php7.0-xml mcrypt php7.0-mcrypt wget unzip -y

Once all the packages are installed, start MariaDB service and enable it to start on boot time with the following command:

sudo systemctl start mysql
sudo systemctl enable mysql

Configure MariaDB

By default, MariaDB is not secure. So you will need to secure it first. You can secure it by using the mysql_secure_installation script.

sudo mysql_secure_installation

This script will set root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB as shown below:

Set root password? [Y/n] y
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y

Once MariaDB is secured, create a database for OctoberCMS.

First, log in to the MariaDB console with the following command:

mysql -u root -p

You will be prompt for a password, enter your root password and create a database for OctoberCMS:

MariaDB [(none)]> create database octobercmsdb character set utf8;

Next, create a user for OctoberCMS and grantall privileges to the OctoberCMS with the following command:

MariaDB [(none)]> GRANT ALL PRIVILEGES ON octobercmsdb.* TO 'user'@'localhost' IDENTIFIED BY 'password';

Next, flush the privileges with the following command:

MariaDB [(none)]> flush privileges;

Finally, exit from the MariaDB console using the following command:

MariaDB [(none)]> quit

Install OctoberCMS

First, download the latest stable version of the OctoberCMS from OctoberCMS official website with the following command:

wget http://octobercms.com/download -O octobercms.zip

Once the download is completed, extract the downloaded archieve to the apache root directory using the following command:

unzip octobercms.zip -d /var/www/html/octobercms

Next, give proper permisions for the OctoberCMS directory:

sudo chown -R www-data:www-data /var/www/html/octobercms/
sudo chmod -R 755 /var/www/html/

Next, you will need to create an apache virtual host directive for OctoberCMS. To do so, create a new configuration file octobercms.conf inside /etc/apache2/sites-available/ directory:

sudo nano /etc/apache2/sites-available/octobercms.conf

Add the following lines:

<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html/octobercms/
ServerName www.example.com
<Directory /var/www/html/octobercms/>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/octobercms-error_log
CustomLog /var/log/apache2/octobercms-access_log common
</VirtualHost>

Save and close the file when you are finished, then enable virtual host directive with the following command:

sudo a2ensite octobercms

Next, enable Apache mod rewrite module and restart apache web server service with the following command:

sudo a2enmod rewrite
sudo systemctl restart apache2

Access OctoberCMS

By default, OctoberCMS runs on Apache port 80. Open your web browser and type the URL http://example.com. You will be redirected to the following page:

System check

License agreement

Here, select the Agree and Continue button to start the installation procedure. You should see the following page:

Database settings

Here, provide database username, password and database name, then click on the Continue button. You should see the following page:

Administrator login

Here, provide admin user details like, admin username, password and admin email id, then click on the Continue button. You should see the following page:

Getting started woth octoberCMS

Here, click on start from scratch button to start the installation. You should see the following page:

OctoberCMS successfully installed

Next, click on the website URL. You should see the OctoberCMS login page as below:

Login page

Enter your admin username and password, then click on the Login button. You should see the OctoberCMS dashboard as shown below:

OctoberCMS dashboard

Share this page:

0 Comment(s)