My HP

31st January, 2017 | Tutorials |

How to Install and Configure Backdrop CMS on Ubuntu 16.04

Want your very own server? Get our 1GB memory, Xeon V4, 25GB SSD VPS for £10.00 / month.

Get a Cloud Server

Backdrop is a free, open source and fully featured content management system that can be used to create blogs, image galleries, social networks and many more.

Backdrop allows non technical users to easily build attractive and professional websites.

In this tutorial, we will learn how to install Backdrop CMS on Ubuntu 16.04 server.

Prerequisites

Update the System

First, update your system to the latest stable version by running the following command:

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

Once your system is up to date, you can proceed to the next step.

Install LAMP Stack

Before starting, you will need to install Nginx, MariaDB, PHP7 and other required PHP modules on your system.

You can install them by running the following command:

sudo apt-get install nginx mariadb-server php7.0 php7.0-cli php7.0-fpm php7.0-mbstring php7.0-mysql php7.0-gd php7.0-mcrypt php7.0-imap uw-mailutils libgd-tools libmcrypt-dev mcrypt php-pear libgd-dev

Once installation is complete, start nginx and mariadb service and enable them to start at boot with the following command:

sudo systemctl start nginx sudo systemctl start mysql sudo systemctl enable nginx sudo systemctl enable mysql

Once you are done, you can proceed to the next step.

Configure MariaDB for Backdrop

By default MariaDB installation is not secured, so you will need to secure it first.

You can secure it by running the mysql_secure_installation script.

sudo mysql_secure_installation

Answer all the questions as shown below:

Enter current password for root (enter for none):
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

Next, login to MariaDB console and create a database for the Backdrop:

mysql -u root -p

Enter your MariaDB root password and hit enter. Once you are logged in to your database, you will need to create a database for Backdrop:

Run the following command to create a database:

MariaDB [(none)]> CREATE DATABASE backdropdb;

Next, create a new database user and provide the appropriate privileges to your database user over the database you have created.

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

Next, run the following command to immediately apply the changes on the database privileges:

MariaDB [(none)]> FLUSH PRIVILEGES;

Next, exit from the Mysql with the following command:

MariaDB [(none)]> \q

Once your database is configured, you can proceed to the next step.

Install Backdrop

You can download the latest stable version of the Backdrop from it's official website or GitHub repository.

Run the following command to download the Backdrop from GitHub:

wget https://github.com/backdrop/backdrop/releases/download/1.6.0/backdrop.zip

Once the download is complete, extract the downloaded file with the unzip command:

unzip backdrop.zip

Next, move the extracted directory to the Nginx web root directory:

mv backdrop /var/www/html/

Next, change the owner of the backdrop directory:

sudo chown -R www-data:www-data /var/www/html/backdrop

Once you are done, you can proceed to the next step.

Configure Nginx for Backdrop

Next, you will need to create a new Nginx virtual host configuration file for Backdrop.

You can do this with the following command:

sudo nano /etc/nginx/conf.d/backdrop.conf

Add the following lines:

server {
listen 80;
server_name 192.168.15.110;
root /var/www/html/backdrop/;
index index.php;
access_log /var/log/nginx/backdrop-access.log;
error_log /var/log/nginx/backdrop-error.log;
charset en_us.UTF-8;

location / { error_page 404 = @backdrop; } location @backdrop { rewrite ^(.*)$ /index.php?q=$1 last; }

location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } }

Save and close the file when you are finished, then delete the default Nginx configuration file with the following command:

sudo rm -rf /etc/nginx/conf.d/default.conf

Next, you will need to make some changes in www.conf file and php.ini file:

sudo nano /etc/php/7.0/fpm/pool.d/www.conf

Change the line from

listen = /run/php/php7.0-fpm.sock

to

listen = 127.0.0.1:9000;

Save the file, then open php.ini file:

sudo nano /etc/php/7.0/cli/php.ini

Change the following lines as shown below:

max_execution_time = 300
max_input_time = 300
memory_limit = 128M
post_max_size = 32M
upload_max_filesize = 32M

Save the file, and test Nginx configuration for any syntax errors with the following command:

sudo nginx -t

If everything is ok, you should see the following output:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Finally, restart php7.0-fpm and Nginx services with the following command:

sudo systemctl restart nginx sudo systemctl restart php7.0-fpm

Once you are done, you can proceed to the next step.

Access Backdrop Web Interface

Once everything is set up properly. It's time to access Backdrop web interface.

Open your favourite web browser and type the URL http://192.168.15.110, you should see the following page:

HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/861005622.png" alt="" />

Choose English language and click on SAVE AND CONTINUE button, you should see the following page:

HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/1218649477.png" alt="" />

Here, fill in database information like database name, username and password, then click on SAVE AND CONTINUE button. You should see the following page:

HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/430606786.png" alt="" />

Once installation is complete, fill in the site information like site name, Username, Password, Email address, and Time Zone, then click on SAVE AND CONTINUE button, you should see the following page:

HP_NO_IMG/data/uploads/users/7ecb43a5-b365-4ebf-93d5-f3b632f29f33/221520753.png" alt="" />

Conclusion

Congratulations! You have successfully installed Backdrop CMS on Ubuntu 16.04 server. You can now easily create your own online shoping cart and host on Public domain.

Feel free to comment me if you have any questions.

Want your very own server? Get our 1GB memory, Xeon V4, 25GB SSD VPS for £10.00 / month.

Get a Cloud Server

Comments