How to Install PageKit CMS on Ubuntu 18.04 LTS

PageKit is a free, open source and lightweight CMS that can be used to create beautiful websites. Pagekit comes with a clean and intuitive interface that allows you to focus on what matters most, managing your content. It provides a configurable dashboard that shows all the statistics related to your site at one place. You can easily manage the pages, menus, and widgets using Pagekits' drag and drop control panel. Pagekit does not require any special hardware requirements. It can be installed on servers with a small amount of RAM.

In this tutorial, we will learn how to install PageKit CMS with Apache web server on Ubuntu 18.04 LTS.

Requirements

  • A server running Ubuntu 18.04.
  • A non-root user with sudo privileges.

Getting Started

Before starting, you will need to update your system with the latest version. You can do this by running the following command:

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

Once your system is updated, restart the system to apply the changes.

Install Apache, MariaDB and PHP

PageKit runs on the web server, written in PHP language and use MariaDB to store their data. So, you will need to install Apache web server, MariaDB server, PHP and other PHP libraries to your server. You can install all of them by just running the following command:

sudo apt-get install apache2 mariadb-server php7.2 libapache2-mod-php7.2 php7.2-common php7.2-sqlite php7.2-curl php7.2-intl php7.2-mbstring php7.2-xmlrpc php7.2-mysql php7.2-gd php7.2-xml php7.2-cli php7.2-zip wget unzip -y

After installing all the required packages, you will need to edit php.ini file and make some changes:

sudo nano /etc/php/7.2/apache2/php.ini

Make the following changes:

memory_limit = 300M
allow_url_fopen = On
upload_max_filesize = 200M
max_execution_time = 400
date.timezone = Asia/Kolkata

Save and close the file. Then, restart Apache and MariaDB service and enable them to start on boot time by running the following command:

sudo systemctl restart apache2
sudo systemctl restart mariadb
sudo systemctl enable apache2
sudo systemctl enable mariadb

Configure MariaDB for PageKit

By default, MariaDB is not hardened. So you will need to secure it first. You can secure it by running the following command:

sudo mysql_secure_installation

This command will set a root password, remove the anonymous user, disallow remote root login, and remove the test database as shown below:

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

Once the MariaDB is secured, log in to MariaDB shell:

mysql -u root -p

Enter your root password when prompt. Then, create a database and user for PageKit with the following command:

MariaDB [(none)]> CREATE DATABASE pagekitdb;
MariaDB [(none)]> CREATE USER pagekit;

Next, grant privileges to the PageKit database with the following command:

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

Next, flush the privileges with the following command:

MariaDB [(none)]> FLUSH PRIVILEGES;

Next, exit from the MariaDB console with the following command:

MariaDB [(none)]> exit

Download PageKit

First, you will need to download the latest version of PageKit CMS from their official website. You can download it with the following command:

wget https://pagekit.com/api/download/latest -O pagekit.zip

Once the download is completed, unzip the downloaded file to the Apache web root directory with the following command:

sudo unzip pagekit.zip -d /var/www/html/pagekit

Next, give proper permissions to the pagekit directory with the following command:

sudo chown -R www-data:www-data /var/www/html/pagekit/
sudo chmod -R 777 /var/www/html/pagekit/

Next, you can proceed to configure Apache for PageKit.

Configure Apache for PageKit

Next, you will need to create an Apache virtual host file for PageKit CMS. You can do this by creating pagekit.conf file as shown below:

sudo nano /etc/apache2/sites-available/pagekit.conf

Add the following lines:

<VirtualHost *:80>
     ServerAdmin [email protected]
     DocumentRoot /var/www/html/pagekit
     ServerName example.com

     <Directory /var/www/html/pagekit/>
          Options FollowSymlinks
          AllowOverride All
          Require all granted
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/pagekit_error.log
     CustomLog ${APACHE_LOG_DIR}/pagekit_access.log combined

</VirtualHost>

Save and close the file. Then, enable PageKit virtual host file with the following command:

sudo a2ensite pagekit

Next, enable Apache rewrite module and restart Apache web server to apply all the changes:

sudo a2enmod rewrite
sudo systemctl restart apache2

Access PageKit CMS

PageKit CMS is now installed and configured. It's time to access PageKit web installer wizard.

Open your web browser and type the URL http://example.com. You will be redirected to the following page:

PageKit Installer

Now, click on the Arrow button. You should see the following page:

Choose Language

Here, select your language and click on the NEXT button. You should see the following page:

Connect Database

Here, provide your database name, database username and password. Then, click on the NEXT button. You should see the following page:

Setup site in PageKit

Here, provide your site title, admin username and password. Then, click on the INSTALL button. You should see the following page:

Log in

Now, provide your admin login details and click on the LOGIN button. You should see the PageKit CMS default dashboard in the following page:

PageKit Dashboard

Congratulations! you have successfully installed PageKit CMS on Ubuntu 18.04 server. I hope you can now easily edit the website to create a modern looking website for your business. Feel free to ask me if you have any questions.

Share this page:

0 Comment(s)