AMP AMP

How to Install Landing CMS on Linux Mint 20

To Install Landing CMS on Linux Mint 20

Introduction:

Landing CMS is simple and cross-platform for management landing pages. It doesn't use any databases. In this tutorial, we will cover the installation of Landing CMS on Linuxmint 20.

Installation Procedure:

Let check the version of the OS

root@linuxhelp:~# cat /etc/os-release 
NAME="Linux Mint"
VERSION="20 (Ulyana)"
ID=linuxmint
ID_LIKE=ubuntu
PRETTY_NAME="Linux Mint 20"
VERSION_ID="20"
HOME_URL="https://www.linuxmint.com/"
SUPPORT_URL="https://forums.ubuntu.com/"

First, install the Typesetter CMS. Then install LAMP server. Finally install the Apache server

root@linuxhelp:~# apt install apache2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  apache2-bin apache2-data apache2-utils libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap
Suggested packages:
  apache2-doc apache2-suexec-pristine | apache2-suexec-custom
The following NEW packages will be installed:
  apache2 apache2-bin apache2-data apache2-utils libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap
0 upgraded, 8 newly installed, 0 to remove and 363 not upgraded.
Need to get 1,713 kB of archives.
After this operation, 7,494 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu focal/main amd64 libapr1 amd64 1.6.5-1ubuntu1 [91.4 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal/main amd64 libaprutil1 amd64 1.6.1-4ubuntu2 [84.7 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal/main amd64 libaprutil1-dbd-sqlite3 amd64 1.6.1-4ubuntu2 [10.5 kB]
.
.
.
Created symlink /etc/systemd/system/multi-user.target.wants/apache2.service → /lib/systemd/system/apache2.service.
Created symlink /etc/systemd/system/multi-user.target.wants/apache-htcacheclean.service → /lib/systemd/system/apache-htcac
heclean.service.
Processing triggers for ufw (0.36-6) ...
Processing triggers for systemd (245.4-4ubuntu3) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9) ...

Once the Apache service is installed. Now, start the apache2 service by using the following command

root@linuxhelp:~# systemctl start apache2

Now install mariadb server by using the following command

root@linuxhelp:~# apt install mariadb-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
 galera-3 libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl libhtml-template-perl libterm-readkey-perl
  mariadb-client-10.3 mariadb-client-core-10.3 mariadb-common mariadb-server mariadb-server-10.3
  mariadb-server-core-10.3 socat
0 upgraded, 13 newly installed, 0 to remove and 363 not upgraded.
Need to get 19.3 MB of archives.
After this operation, 164 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

.
.
.
Created symlink /etc/systemd/system/mysql.service → /lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/mysqld.service → /lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /lib/systemd/system/mariadb.service.
Setting up mariadb-server (1:10.3.22-1ubuntu1) ...
Processing triggers for systemd (245.4-4ubuntu3) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for doc-base (0.10.9) ...
Processing 1 added doc-base file...

Once the mariadb server is installed. now, create a credentials of mysql server

root@linuxhelp:~# mysql_secure_installation
In order to log into the MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none): 
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorization.
Set root password? [Y/n]  
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] y
 ... Success!
Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] y
 ... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y
 ... Success!
Cleaning up...
All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!

Now start the apache service

root@linuxhelp:~# systemctl start apache2

Now, install PHP and its modules by using the following command

root@linuxhelp:~# apt install php libapache2-mod-php php-mysql
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libapache2-mod-php7.4 php-common php7.4 php7.4-cli php7.4-common php7.4-json php7.4-mysql php7.4-opcache
  php7.4-readline
Suggested packages:
  php-pear
The following NEW packages will be installed:
  libapache2-mod-php libapache2-mod-php7.4 php php-common php-mysql php7.4 php7.4-cli php7.4-common php7.4-json
  php7.4-mysql php7.4-opcache php7.4-readline
0 upgraded, 12 newly installed, 0 to remove and 363 not upgraded.
Need to get 4,144 kB of archives.
After this operation, 18.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu focal/main amd64 php-common all 2:75 [11.9 kB]
.
.
.
Setting up libapache2-mod-php (2:7.4+75) ...
Setting up php (2:7.4+75) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for php7.4-cli (7.4.3-4ubuntu2.4) ...
Processing triggers for libapache2-mod-php7.4 (7.4.3-4ubuntu2.4) ...

Once the PHP is installed. Now, configure the info.php file by using the following command

root@linuxhelp:~# vi /var/www/html/info.php
<?php
Phpinfo();
?>

Once the PHP configuration is completed. Now, restart the apache2 service by using the following command

root@linuxhelp:~# systemctl restart apache2

Now download the Landing CMS package by using the wget command

root@linuxhelp:~# wget https://github.com/Elias-Black/Landing-CMS/archive/master.zip
--2020-11-19 12:30:14--  https://github.com/Elias-Black/Landing-CMS/archive/master.zip
Resolving github.com (github.com)... 13.234.210.38
Connecting to github.com (github.com)|13.234.210.38|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/Elias-Black/Landing-CMS/zip/master [following]
--2020-11-19 12:30:14--  https://codeload.github.com/Elias-Black/Landing-CMS/zip/master
Resolving codeload.github.com (codeload.github.com)... 13.233.43.20
Connecting to codeload.github.com (codeload.github.com)|13.233.43.20|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: ‘master.zip’

master.zip                         [                           <=>                     ]   2.25M   477KB/s    in 5.8s    

2020-11-19 12:30:21 (399 KB/s) - ‘master.zip’ saved [2360796]

Now extract the download package

root@linuxhelp:~# unzip master.zip
Archive:  master.zip
f036d8bfa3795e797ca4201f8ef7178fe9084568
   creating: Landing-CMS-master/
  inflating: Landing-CMS-master/LICENSE  
  inflating: Landing-CMS-master/README.md  
.
.
.
  inflating: Landing-CMS-master/index.php  
  inflating: Landing-CMS-master/install.php  
   creating: Landing-CMS-master/modules/
  inflating: Landing-CMS-master/modules/rand_num.php  
  inflating: Landing-CMS-master/robots.txt

Once the Landing CMS package is downloaded move the Landing directory to the Apache directory

root@linuxhelp:~# mv Landing-CMS-master /var/www/landing

Now set the ownership and permissions of the landing directory

root@linuxhelp:~# chown -R www-data.www-data /var/www/landing/
root@linuxhelp:~# chmod -R 755 /var/www/landing/

Now configure the landing.conf file by using vi command

root@linuxhelp:~# vi /etc/apache2/sites-available/landing.conf

<Virtualhost>
	Servername www.linuxhelp1.com
	Documentroot  /var/www/typesetter
<directory /var/www/typesetter>
Allowoverride all
Allow from all
</directory>
</virtualhost>

Now disable the default site of the Apache

root@linuxhelp:~# a2dissite 000-default.conf
Site 000-default disabled.
To activate the new configuration, you need to run:
  systemctl reload apache2

Now enable the site of Landing CMS

root@linuxhelp:~# a2ensite landing.conf
Enabling site landing.
To activate the new configuration, you need to run:
  systemctl reload apache2

Now enable the rewrite modules of apache2

root@linuxhelp:~# a2enmod rewrite
Enabling module rewrite.

To activate the new configuration, you need to run

root@linuxhelp:~# systemctl restart apache2

switch to the browser and enter ip to check the PHP Switch the browser and enter the hostname and enter the landing CMS welcome page click Go to CMS Enter admin credentials of the landing CMS This the dashboard of landing CMS

With this, the method of installation landing CMS on LinuxMint 20 comes to an end.

FAQ
Q
What is the path to add host entry?
A
The path is /etc/host
Q
What is the command to disable the default sites?
A
The command is # a2dissite (configuration fo]ile name)
Q
What is the command to unzip the file?
A
The command is # unzip (filename)
Q
What is the path of Apache custom virtual host?
A
The path is /etc/apache2/sites-available
Q
How to download the packages using the wget command?
A
The command is # wget [URL]