How to Install and Configure October CMS on Alibaba Cloud ECS

Prerequisites

  • A server running on either Ubuntu 18.04 or Debian 9
  • A non root user with Sudo Privileges

Step 1: Set Up Servers

In this tutorial, we shall use the Ubuntu 18.04 or Debian 9 servers for our deployment. Setup your Ubuntu 18.04 or Debian 9 servers Instances on Alibaba Cloud.

Step 2: Installing PHP and its required PHP Modules

October CMS is compatible with PHP 7.0 and above and thus all the modules and PHP version we install should at least meet the above requirement. To install the above packages, use the following command below.

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 3: Installing MySQL Database Server

For production purposes, I recommend using Alibaba Cloud ApsaraDB for RDS for increased security and reliability.

sudo apt-get install mysql-server php7.0-mysql
/usr/bin/mysql_secure_installation
Would you like to setup VALIDATE password plugin? [Y/N] N
Change the root password? [ Y/N ] N
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

Step 4: Create MySQL Database for October CMS

Once the database server has been set up, next, we shall need to create a database for our October CMS. This can only be done in the MySQL console. Enter the following command below to get started.

$ 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
mysql  -u OctoberCMS -p
SHOW DATABASES;
QUIT

Step 5: Install Apache 2 Server

The next step is to install Apache 2 server on your Ubuntu 18.04 or Debian 9, use the following command below.

sudo apt -y install apache2 libapache2-mod-php unzip vim

Step 6: Configure Apache and Install October CMS

Now that you have installed your Database, PHP and Apache 2 server, our last task is to install our October CMS on our instance.

wget http://octobercms.com/download -O octobercms.zip
unzip octobercms.zip
sudo mv install-master /srv/octobercms
sudo chown -R www-data:www-data /srv/octobercms
sudo vim /etc/apache2/sites-enabled/octobercms.conf
<VirtualHost *:80>
DocumentRoot /srv/octobercms/
ServerName yourwebsite.com
ServerAlias www.yourwebsite.com
ServerAdmin admin@yourwebsite.com

<Directory /srv/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>
sudo a2enmod rewrite
sudo systemctl restart apache2

Step 7: Setup October CMS via Web Interface

Navigate to your browser and go to OctoberCMS server domain name
E.g https://yourwebsite.com/install.php

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com