How to Install Couch CMS on Ubuntu 16.04 and Higher
Currently, due to the widespread growth of websites, it is ideal to have the necessary tools to create high impact sites, since this is a channel of attraction for many users.
To create websites on a professional level, we have many tools both free and paid where each offers a series of practical features for development and launch.
But today we will talk about a particular called Couch CMS which apart from being free provides a fully functional and dynamic environment when creating and managing websites.
What is Couch CMS?
Couch CMS has been developed as a free, open source content management system in which no extensive knowledge of PHP is required, which is an obstacle for many users today.
The use of Couch CMS is so simple that it is enough to take any HTML or CSS template and turn it into a CMS enabled in a few minutes.
Couch CMS includes integrated RSS feeds, forms, personalized pages and integration with PayPal.
Now let's see how to install Couch CMS in Ubuntu 17.10.
Step 1: Update Ubuntu
The first step is to update the system by executing the following commands:
sudo apt-get update -y sudo apt-get upgrade -y
Once this process is finished, restart the system to apply the changes.
Step 2: Install LAMPP
Now, we are going to install Apache web server, PHP, and MariaDB in the system, install them all simultaneously by executing the following command:
sudo apt-get install apache2 mariadb-server libapache2-mod-php7.0 php7.0 php7.0-gd php7.0-mbstring php7.0-mysqlnd -y
Note: In case any error is generated that the PHP packages haven't been located, run the following lines:
sudo apt-get install python-software-properties software-properties-common sudo add-apt-repository ppa:ondrej/php sudo apt-get update
Then you can rerun the previous command for the installation of LAMPP.
Once all the packages have been installed, start the Apache and MariaDB service and executing the following commands:
sudo systemctl start apache2 sudo systemctl enable apache2 sudo systemctl start mysql sudo systemctl enable mysql
Step 3: Setup the Database for Couch CMS
By default, MariaDB isn't secure, so you must secure it first, do this executing the installation script mysql_secure_installation:
This script is responsible for establishing a root password, eliminating anonymous users, not allowing the remote root login, and deleting the test database and thus be able to access MariaDB safely, it will be necessary to answer the following questions:
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
Now, we are going to create the database for Couch CMS, for this access MySQL executing the following. There, enter your access credentials.
mysql -u root -p
Now, execute each of the following lines:
CREATE DATABASE couchdb CHARACTER SET utf8 COLLATE utf8_general_ci; GRANT ALL PRIVILEGES ON couchdb.* TO ‘couch’@’localhost’ IDENTIFIED BY ‘password’;
flush privileges; quit
Step 4: Install Couch CMS
First, download the latest version of Couch CMS from the official GIT repository:
sudo wget https://github.com/CouchCMS/CouchCMS/archive/master.zip
Proceed to extract the content of the downloaded file:
Now let's copy the extracted directory to the Apache root directory using the following command:
sudo cp -r CouchCMS-master/couch /var/www/html/
Grant the respective permits:
sudo chown -R www-data:www-data /var/www/html/couch sudo chmod -R 777 /var/www/html/couch
Now let's change the Couch CMS directory and change the name of the file config.example.php to config.php:
cd /var/www/html/couch sudo cp config.example.php config.php
Once done, access the file config.php using your desired editor:
sudo nano config.php
In the expanded file we will make the following modifications highlighted in bold:
// If necessary, define the full URL of your site including the subdomain, if any. // V.IMP: Don't forget the trailing slash! define( 'K_SITE_URL', 'Direccion IP del equipo' ); // Name of the database define( 'K_DB_NAME', 'couchdb' ); // Database username define( 'K_DB_USER', 'couch' ); // Database password define( 'K_DB_PASSWORD', 'password' ); // MySQL hostname (it will usually be 'localhost') define( 'K_DB_HOST', 'localhost' );
Save the changes using the Ctrl + O keys and exit the editor using the Ctrl + X keys.
Enable the rewrite module with the following command:
sudo a2enmod rewrite
Restart the Apache service with the next line:
sudo systemctl restart apache2
Step 5: Access Couch CMS
Now, go to any browser on the local network and execute the following syntax:
There enter the username and password of the administrator, then click on the Install button.
Once the installation is completed correctly, you will see the following:
There click on log in and enter the credentials created again.
This will be the Couch CMS environment:
From here we can start the website administration process in a centralized way.