Getting your server ready for Couch CMS using a LAMP server

Couch CMS Prerequisites:

  1. A registered domain name and a VPS.
  2. You should set up your server’s hostname.
  1. To create a new user account, use the following command:
# adduser aareez
  1. Now assign the username to sudo user’s group to give administrative privileges. For this, we will check /etc/sudoers file and see whether sudoers group is enabled or not. For this purpose, we will execute the following command.
# visudo
  1. After executing the above command, a file will be opened, find the following lines in the opened file.
  1. Now you will add your username “aareez” to the “sudo” group by executing the following command:
# adduser aareez sudo
# groups aareez
  1. Now, log in by using your new username and password. OR Use the following command to switch user:
# su – aareez
# whoami

Update your Ubuntu 16.04 System:

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

Install Apache Web Server:

# sudo apt-get -y install apache2
# sudo systemctl enable apache2
# sudo systemctl start apache2
# sudo nano /etc/apache2/sites-enabled/000-default.conf
# DocumentRoot /var/www/html
# sudo a2enmod rewrite
# sudo systemctl restart apache2

Install PHP 7.0

# sudo apt-get -y install php php-gd php-mbstring php-common php-mysql libapache2-mod-php php-curl

Install MariaDB (MySQL) Server

# sudo apt-get -y install mysql-server

Install unzip:

# sudo yum -y install unzip
# sudo systemctl enable mysql
# sudo systemctl start mysql
# sudo mysql_secure_installation

Domain Configuration:

  1. Login to your Alibaba Cloud account and click on Alibaba Cloud DNS (available in left sidebar of your dashboard). After this click button Add Domain Name.
  2. You will see a popup form. Now, type your complete domain name with TLD e.g. in my case and click Confirm button.
  3. Now your domain has been added in Alibaba Cloud DNS. Next step is to configure domain. Click on Configure, right below the Add Domain Name button.
  4. If you bought domain from Alibaba Cloud, your all nameservers would be configured already. If you bought it from some other registrar, Alibaba Cloud DNS configuration page will detect it and provide your information for changing nameservers.
  5. Now add A record and its value will be IP address of your ECS instance.
  6. You can skip this step, if you have bought domain from Alibaba Cloud. If you have bought domain from Godaddy, follow the steps below:
  7. Open all domains list and click Manage DNS next to that domain.
  8. Click Change button.
  9. Select Custom option from dropdown list and type nameservers provided in instructions given by Alibaba Cloud.
  10. If you have domain registered at Namecheap, follow the steps below:
  11. Open your domains list and click manage button next to your domain name.
  12. Select Custom DNS from drop down list, add nameservers instructed by Alibaba Cloud and click tick button to save them.
  13. Now go back to Alibaba Cloud DNS page and click Add Record button to add records, after adding save them. To get records details, you can use

Create virtual host:

# sudo nano /etc/apache2/sites-available/
# sudo systemctl restart apache2

Install Git:

# sudo apt-get install git

Let’s Encrypt SSL Configuration:

# sudo systemctl stop apache2
#sudo apt-get install -y software-properties-common
# sudo add-apt-repository ppa:certbot/certbot
# sudo apt-get update
# sudo apt-get install python-certbot-apache
# sudo certbot --apache -d -d
# sudo nano /etc/apache2/sites-available/

Create database:

# sudo mysql -u root -p

Install Couch CMS files:

# sudo a2dissite *default
# sudo a2ensite
# sudo service apache2 restart
  1. To begin installation of Couch CMS, navigate to directory cd /var/www/html/ because in Apache Server, we use this as web-directory.
# sudo mkdir html
# sudo wget
# ls -la
# sudo unzip
# sudo mv ./CouchCMS-2.0/* /var/www/html
# sudo chown -R www-data:www-data *
# sudo systemctl restart apache2
# sudo mv ./couch/config.example.php ./couch/config.php
# sudo nano /var/www/html/couch/config.php

Complete the installation of Couch CMS:



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
Arslan ud Din Shafiq

Arslan ud Din Shafiq

Chief Executive Officer at WebSoft America Inc., Software Engineer, Books Author | | |