October is an open source, powerful, and modular Content Management System (CMS) and that aims at making your development workflow simple and fast. October CMS has been designed from scratch to solve problems that exist in other content management systems.
In this tutorial, I’ll cover how to install October CMS on Ubuntu 22.04|20.04|18.04 Linux system. But first, let’s list all October CMS dependencies.
- Apache/Nginx web server
- MySQL/MariaDB/PostgreSQL database server
This article will guide you through the installation of PHP and required extensions, Apache Web Server and MariaDB/MySQL Database server. So follow steps below to setup October CMS on Ubuntu 22.04|20.04|18.04.
Step 1: Install PHP and required PHP extensions
The PHP version required by October CMS is version 7.0 or higher which is satisfied by PHP available on Ubuntu 18.04+.
sudo apt update sudo apt install -y php php-cli php-mysql php-zip php-json php-gd php-mbstring php-curl php-xml php-pear php-bcmath php-pdo openssl
Step 2: Install MySQL/MariaDB database server
I recommend using MariaDB database server since it is a fully open source, but you’re free to use MySQL Database server as well.
sudo apt install mariadb-server
Once the database server is installed, login to the mysql console to create a database for October
$ sudo mysql -u root -p CREATE USER 'october'@'localhost' IDENTIFIED BY 'StrongPassword'; CREATE DATABASE october; GRANT ALL ON october.* TO 'october'@'localhost' WITH GRANT OPTION; FLUSH PRIVILEGES; QUIT
Test connection to Database
$ sudo mysql -u october -p'StrongPassword' Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 10 Server version: 10.5.12-MariaDB-0+deb11u1 Debian 11 Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> SHOW DATABASES; +--------------------+ | Database | +--------------------+ | information_schema | | october | +--------------------+ 2 rows in set (0.001 sec) MariaDB [(none)]> QUIT
Step 3: Install Apache2 Web Server
Now that you have Database and PHP installed, the remaining dependency is Apache2 web server. Run the following command to install Apache2 on Ubuntu.
sudo apt -y install apache2 libapache2-mod-php unzip vim
The configuration of Apache for October CMS will appear under the next section.
Step 4: Install October CMS and Configure Apache
The last step is the installation of October CMS and configuring Apache web server.
wget http://octobercms.com/download -O octobercms.zip unzip octobercms.zip sudo mv install-master /var/www/octobercms
Then set the correct permissions for
sudo chown -R www-data:www-data /var/www/octobercms
Create Apache configuration file for October CMS.
sudo vim /etc/apache2/sites-enabled/octobercms.conf
Add and modify domain name in the contents below:
<VirtualHost *:80> DocumentRoot /var/www/octobercms ServerName cms.example.com ServerAlias www.cms.example.com ServerAdmin [email protected] <Directory /var/www/octobercms/> Options +FollowSymlinks AllowOverride All Require all granted </Directory> ErrorLog /var/log/apache2/octobercms-error.log CustomLog /var/log/apache2/octobercms-access.log combined </VirtualHost>
Enable Apache2 rewrite module
sudo a2enmod rewrite sudo systemctl restart apache2
Step 5: Access October CMS Web Interface
Now open your browser and browse to your October CMS server domain name
1. Ensure all checks return a pass and Accept License Agreement.
2. Fill database connection details
3. Specify details for Admin user then click Continue
4. Finish your site set up by choosing “Start from a theme”, then install the selected theme.
Your website is located at this URL:
http://example.com and Administration Area is on
Use Provided links to access Backend Administration Area. The logins are as created during installation.
Step 6: Setting up the scheduler
For scheduled tasks to operate correctly, you should add the following Cron entry to your server. Edit crontab:
sudo crontab -e
And add the following line at the end
* * * * * php /var/www/octobercms/artisan schedule:run >> /dev/null 2>&1
Enjoy your newly installed October CMS on Ubuntu 22.04|20.04|18.04.