How To Install Pluck 4.7.9 CMS on Centos 7.6 using LAMP Stack

Installation of Pluck CMS 4.7.9 On CentOS 7.6

Introduction

Pluck CMS is a small and simple content management system, written in php.With pluck,it makes ease for everyone to manage their own website without knowledge of programming languages.It stores all the pages right on your websites which makes even more portable.This video covers the tutorial of Pluck CMS 4.7.9 On Centos 7.6

Requirements:

Apache 2.2+

PHP 7.2

MariaDB 5.5

Centos 7.6

Check the version of Centos 7

[root@linuxhelp ~]# lsb_release -d
Description:	CentOS Linux release 7.6.1810 (Core)

Install the Apache And MariaDB server

[root@linuxhelp ~]# yum install httpd mariadb-server -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.myfahim.com
 * extras: centos.myfahim.com
 * updates: centos.myfahim.com
base                                                                                                                  | 3.6 kB  00:00:00     
extras                                                                                                                | 3.4 kB  00:00:00     
updates                                                                                                               | 3.4 kB  00:00:00     
(1/2): extras/7/x86_64/primary_db                                                                                     | 187 kB  00:00:00     
(2/2): updates/7/x86_64/primary_db                                                                                    | 3.4 MB  00:00:07     
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-88.el7.centos will be installed
--> Processing Dependency: httpd-tools = 2.4.6-88.el7.centos for package: httpd-2.4.6-88.el7.centos.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.4.6-88.el7.centos.x86_64
--> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.4.6-88.el7.centos.x86_64
.
.
.
.
.
Installed:
  httpd.x86_64 0:2.4.6-88.el7.centos                                  mariadb-server.x86_64 1:5.5.60-1.el7_5                             
Dependency Installed:
  apr.x86_64 0:1.4.8-3.el7_4.1                 apr-util.x86_64 0:1.5.2-6.el7                httpd-tools.x86_64 0:2.4.6-88.el7.centos         
  mariadb.x86_64 1:5.5.60-1.el7_5              perl-DBD-MySQL.x86_64 0:4.023-6.el7          perl-DBI.x86_64 0:1.627-4.el7                    
  perl-Net-Daemon.noarch 0:0.48-5.el7          perl-PlRPC.noarch 0:0.2020-14.el7

Enable And start the service of Apache And MariaDB Server

[root@linuxhelp ~]# systemctl enable httpd mariadb
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
[root@linuxhelp ~]# systemctl start httpd mariadb

Check the status of Apache And MariaDB

[root@linuxhelp ~]# systemctl status httpd mariadb
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2019-04-02 08:47:48 IST; 12s ago
● mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2019-04-02 08:47:52 IST; 9s ago

Secure the MariaDb through the below installation

[root@linuxhelp ~]# mysql_secure_installation 
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!
In order to log into 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 authorisation.
Set root password? [Y/n] y
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!

Log in to the database with root password and configure MariaDB for Pluck CMS

[root@linuxhelp ~]# mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 5.5.60-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)
MariaDB [(none)]> create database pluck;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| pluck              |
+--------------------+
4 rows in set (0.00 sec)
MariaDB [(none)]> use pluck;
Database changed
MariaDB [pluck]> create user user@localhost identified by 'linuxc';
Query OK, 0 rows affected (0.01 sec)
MariaDB [pluck]> grant all on pluck.* to user@localhost;
Query OK, 0 rows affected (0.00 sec)
MariaDB [pluck]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
MariaDB [pluck]> exit
Bye

To install php, It is essential to Install php modules with any of the third party repositories Install epel-release repository

[root@linuxhelp ~]# yum install epel-release yum-utils -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.myfahim.com
 * extras: centos.myfahim.com
 * updates: centos.myfahim.com
Package yum-utils-1.1.31-50.el7.noarch already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution
.
.
.
.
.
. Running transaction
  Installing : epel-release-7-11.noarch                                                                                                  1/1 
  Verifying  : epel-release-7-11.noarch                                                                                                  1/1 
Installed:
  epel-release.noarch 0:7-11                                                                                                                 

Download and Install webtatic repository

[root@linuxhelp ~]# wget https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
--2019-04-02 08:51:37--  https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
Resolving mirror.webtatic.com (mirror.webtatic.com)... 46.101.64.32
Connecting to mirror.webtatic.com (mirror.webtatic.com)|46.101.64.32|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 13152 (13K) [application/x-redhat-package-manager]
Saving to: ‘webtatic-release.rpm’
100%[===================================================================================================>] 13,152      --.-K/s   in 0s      
2019-04-02 08:51:38 (289 MB/s) - ‘webtatic-release.rpm’ saved [13152/13152]
[root@linuxhelp ~]# ll
total 24
-rw-------. 1 root root  2097 Dec  9  2017 anaconda-ks.cfg
drwxr-xr-x. 2 root root     6 Dec 12  2017 Desktop
drwxr-xr-x. 2 root root     6 Dec 12  2017 Documents
drwxr-xr-x. 2 root root     6 Dec 12  2017 Downloads
-rw-r--r--. 1 root root  2128 Dec 12  2017 initial-setup-ks.cfg
drwxr-xr-x. 2 root root     6 Dec 12  2017 Music
drwxr-xr-x. 2 root root     6 Dec 12  2017 Pictures
drwxr-xr-x. 2 root root     6 Dec 12  2017 Public
drwxr-xr-x. 2 root root     6 Dec 12  2017 Templates
drwxr-xr-x. 2 root root     6 Dec 12  2017 Videos
-rw-r--r--  1 root root 13152 Oct  9  2014 webtatic-release.rpm
[root@linuxhelp ~]# rpm -Uvh webtatic-release.rpm 
warning: webtatic-release.rpm: Header V4 RSA/SHA1 Signature, key ID 62e74ca5: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:webtatic-release-7-3             ################################# [100%]

Download And Install remi-release repository

[root@linuxhelp ~]# wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm
--2019-04-02 08:52:42--  http://rpms.remirepo.net/enterprise/remi-release-7.rpm
Resolving rpms.remirepo.net (rpms.remirepo.net)... 195.154.241.117, 2001:bc8:33a1:100::1
Connecting to rpms.remirepo.net (rpms.remirepo.net)|195.154.241.117|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 16004 (16K) [application/x-rpm]
Saving to: ‘remi-release-7.rpm’
100%[===================================================================================================>] 16,004      --.-K/s   in 0s      
2019-04-02 08:52:43 (41.8 MB/s) - ‘remi-release-7.rpm’ saved [16004/16004]
[root@linuxhelp ~]# ll
total 40
-rw-------. 1 root root  2097 Dec  9  2017 anaconda-ks.cfg
drwxr-xr-x. 2 root root     6 Dec 12  2017 Desktop
drwxr-xr-x. 2 root root     6 Dec 12  2017 Documents
drwxr-xr-x. 2 root root     6 Dec 12  2017 Downloads
-rw-r--r--. 1 root root  2128 Dec 12  2017 initial-setup-ks.cfg
drwxr-xr-x. 2 root root     6 Dec 12  2017 Music
drwxr-xr-x. 2 root root     6 Dec 12  2017 Pictures
drwxr-xr-x. 2 root root     6 Dec 12  2017 Public
-rw-r--r--  1 root root 16004 Mar  8 13:10 remi-release-7.rpm
drwxr-xr-x. 2 root root     6 Dec 12  2017 Templates
drwxr-xr-x. 2 root root     6 Dec 12  2017 Videos
-rw-r--r--  1 root root 13152 Oct  9  2014 webtatic-release.rpm
[root@linuxhelp ~]# rpm -Uvh remi-release-7.rpm 
warning: remi-release-7.rpm: Header V4 DSA/SHA1 Signature, key ID 00f97f56: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:remi-release-7.6-2.el7.remi      ################################# [100%]

Enable the remi repo with php72 version

[root@linuxhelp ~]# yum-config-manager --enable remi-php72
Loaded plugins: fastestmirror, langpacks
============================================================= repo: remi-php72 ==============================================================
[remi-php72]
async = True
bandwidth = 0
base_persistdir = /var/lib/yum/repos/x86_64/7
baseurl = 
cache = 0
cachedir = /var/cache/yum/x86_64/7/remi-php72
check_config_file_age = True
compare_providers_priority = 80
cost = 1000
.
.
.
.
skip_if_unavailable = False
ssl_check_cert_permissions = True
sslcacert = 
sslclientcert = 
sslclientkey = 
sslverify = True
throttle = 0
timeout = 30.0
ui_id = remi-php72
ui_repoid_vars = releasever,
   basearch
username =

Install the php modules that are required for Pluck CMS

[root@linuxhelp ~]# yum install php php-gd php-pdo php-mysql php-mbstring php-mcrypt php-simplexml php-pecl-zip -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.myfahim.com
 * epel: ftp.jaist.ac.jp
 * extras: centos.myfahim.com
 * remi-php72: fr2.rpmfind.net
 * remi-safe: fr2.rpmfind.net
 * updates: centos.myfahim.com
 * webtatic: uk.repo.webtatic.com
remi-php72                                                                                                            | 3.0 kB  00:00:00     
remi-php72/primary_db                                                                                                 | 220 kB  00:00:08     
Package php-mysql is obsoleted by php-mysqlnd, trying to install php-mysqlnd-7.2.16-1.el7.remi.x86_64 instead
Package php-mcrypt is obsoleted by php-pecl-mcrypt, trying to install php-pecl-mcrypt-1.0.2-2.el7.remi.7.2.x86_64 instead
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:7.2.16-1.el7.remi will be installed
.
.
.
.
.
Installed:
  php.x86_64 0:7.2.16-1.el7.remi                   php-gd.x86_64 0:7.2.16-1.el7.remi       php-mbstring.x86_64 0:7.2.16-1.el7.remi           
  php-mysqlnd.x86_64 0:7.2.16-1.el7.remi           php-pdo.x86_64 0:7.2.16-1.el7.remi      php-pecl-mcrypt.x86_64 0:1.0.2-2.el7.remi.7.2     
  php-pecl-zip.x86_64 0:1.15.4-1.el7.remi.7.2      php-xml.x86_64 0:7.2.16-1.el7.remi     
Dependency Installed:
  gd-last.x86_64 0:2.2.5-8.el7.remi               libargon2.x86_64 0:20161029-2.el7             libmcrypt.x86_64 0:2.5.8-13.el7             
  libwebp7.x86_64 0:1.0.2-1.el7.remi              libzip5.x86_64 0:1.5.2-1.el7.remi             php-cli.x86_64 0:7.2.16-1.el7.remi          
  php-common.x86_64 0:7.2.16-1.el7.remi           php-json.x86_64 0:7.2.16-1.el7.remi
Complete!

Check the version of php

[root@linuxhelp ~]# php -v
PHP 7.2.16 (cli) (built: Mar  5 2019 14:45:10) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

Check the modules of php

[root@linuxhelp ~]# php -m
[PHP Modules]
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
libxml
mbstring
mcrypt
mysqli
mysqlnd
.
.
.
.
.
xml
xmlreader
xmlwriter
xsl
zip
zlib
[Zend Modules]

Download and extract the Pluck CMS zip file under the Document root directory of Apache

[root@linuxhelp ~]# cd /var/www
[root@linuxhelp www]# wget  https://github.com/pluck-cms/pluck/archive/4.7.9-dev1.zip
--2019-04-02 08:59:01--  https://github.com/pluck-cms/pluck/archive/4.7.9-dev1.zip
Resolving github.com (github.com)... 192.30.253.113, 192.30.253.112
Connecting to github.com (github.com)|192.30.253.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/pluck-cms/pluck/zip/4.7.9-dev1 [following]
--2019-04-02 08:59:02--  https://codeload.github.com/pluck-cms/pluck/zip/4.7.9-dev1
Resolving codeload.github.com (codeload.github.com)... 192.30.253.120, 192.30.253.121
Connecting to codeload.github.com (codeload.github.com)|192.30.253.120|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: ‘4.7.9-dev1.zip’
    [                    <=>                                                                             ] 1,614,971    326KB/s   in 5.3s   
2019-04-02 08:59:08 (299 KB/s) - ‘4.7.9-dev1.zip’ saved [1614971]
[root@linuxhelp www]# ll
total 1580
-rw-r--r-- 1 root root 1614971 Apr  2 08:59 4.7.9-dev1.zip
drwxr-xr-x 2 root root       6 Nov  5 07:17 cgi-bin
drwxr-xr-x 2 root root       6 Nov  5 07:17 html
[root@linuxhelp www]# unzip 4.7.9-dev1.zip 
Archive:  4.7.9-dev1.zip
ca6bc74dd0913554e35b3e1a613bfcc23ce34797
   creating: pluck-4.7.9-dev1/
  inflating: pluck-4.7.9-dev1/README.md  
  inflating: pluck-4.7.9-dev1/admin.php  
   creating: pluck-4.7.9-dev1/data/
   creating: pluck-4.7.9-dev1/data/image/
  inflating: pluck-4.7.9-dev1/data/image/AUTHORS  
 extracting: pluck-4.7.9-dev1/data/image/add.png  
 extracting: pluck-4.7.9-dev1/data/image/add_small.png  
.
.
.
.
creating: pluck-4.7.9-dev1/images/
  inflating: pluck-4.7.9-dev1/images/.htaccess  
  inflating: pluck-4.7.9-dev1/index.php  
  inflating: pluck-4.7.9-dev1/install.php  
  inflating: pluck-4.7.9-dev1/login.php  
  inflating: pluck-4.7.9-dev1/requirements.php  
  inflating: pluck-4.7.9-dev1/robots.txt  
[root@linuxhelp www]# ll
total 1580
-rw-r--r-- 1 root root 1614971 Apr  2 08:59 4.7.9-dev1.zip
drwxr-xr-x 2 root root       6 Nov  5 07:17 cgi-bin
drwxr-xr-x 2 root root       6 Nov  5 07:17 html
drwxr-xr-x 6 root root     186 Sep  5  2018 pluck-4.7.9-dev1

Rename the directory that has created while extracting

[root@linuxhelp www]# mv pluck-4.7.9-dev1/ pluck
[root@linuxhelp www]# ll
total 1580
-rw-r--r-- 1 root root 1614971 Apr  2 08:59 4.7.9-dev1.zip
drwxr-xr-x 2 root root       6 Nov  5 07:17 cgi-bin
drwxr-xr-x 2 root root       6 Nov  5 07:17 html
drwxr-xr-x 6 root root     186 Sep  5  2018 pluck

Assign writable permissions to the pluck CMS

[root@linuxhelp www]# chmod -R 775 pluck/
[root@linuxhelp pluck]# ll
total 36
-rwxrwxr-x 1 root root 8113 Sep  5  2018 admin.php
drwxrwxr-x 8 root root  171 Sep  5  2018 data
drwxrwxr-x 2 root root   84 Sep  5  2018 docs
drwxrwxr-x 2 root root   23 Sep  5  2018 files
drwxrwxr-x 2 root root   23 Sep  5  2018 images
-rwxrwxr-x 1 root root 3406 Sep  5  2018 index.php
-rwxrwxr-x 1 root root 7649 Sep  5  2018 install.php
-rwxrwxr-x 1 root root 3832 Sep  5  2018 login.php
-rwxrwxr-x 1 root root 1788 Sep  5  2018 README.md
-rwxrwxr-x 1 root root 3862 Sep  5  2018 requirements.php
-rwxrwxr-x 1 root root   47 Sep  5  2018 robots.txt
[root@linuxhelp pluck]# chmod 777 images data files data/trash data/modules data/themes data/themes/default data/themes/olddata-style data/settings data/settings/langpref.php

Create a Customized configuration file for pluck CMS 4.7.9

[root@linuxhelp pluck]# vim /etc/httpd/conf.d/pluck.conf
<Virtualhost *:80>
servername www.linuxhelp1.com
documentroot /var/www/pluck/
<directory /var/www/pluck/>
allowoverride all
allow from all
</directory>
</virtualhost>

Test the configuration of apache

[root@linuxhelp pluck]# httpd -t
Syntax OK

Restart the service of Apache

[root@linuxhelp pluck]# systemctl restart httpd

Open the browser and type the server name that we set in the customized configuration file Start the Installation in the welcome page and click proceed Enter the general information about the title of the homepage and save. Thus we have installed the Pluck CMS and have chosen to take a look at the website. Click admin and enter the login password to view the homepage. Installation of Pluck CMS 4.7.9 On CentOS 7.6 comes to end

FAQ
Q
Is it possible to create a contact form in Pluck CMS 4.7.9
A
yes,you can create a contact form in pluck CMS 4.7.9.
Q
Is there any feature to showcase my images in pluck CMS 4.7.9
A
you can create gallery and album to showcase your images.
Q
What is the latest version of pluck CMS
A
The latest version of pluck cms is 4.7.9
Q
Is it posssible to create many pages in the pluck CMS 4.7.9?
A
you can create unlimited pages in the pluck cms 4.7.9
Q
What are the php modules required for Pluck CMS?
A
php-gd php-pdo php-mysql php-simplexml php-mbstring php-pecl-zip php-intl php-mcrypt are the modules required for Pluck CMS.