AMP AMP

How to install Pagekit on CentOS 7

To install Pagekit on CentOS 7

Pagekit is a free and open source content management system. It is written in PHP and uses MySQL or SQLite database for storing the data. Pagekit provides easy to use drag and drop control panel to manage the pages, menus, and widgets. It has a configurable dashboard which shows all the statistics related to your site at one place. It also provides an in-built blog feature so that you can share the blog posts right away. This tutorial covers the installation procedure of Pagekit on CentOS 7.


Pre-Requisite
LAMP Stack
- Apache
- MariaDB
- PHP 7

Execute the following commands to install PHP in the target system,

# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
# yum -y install php71w php71w-openssl php71w-mysql php71w-cli php71w-mbstring php71w-dom php71w-json php71w-session php71w-ctype php71w-tokenizer php71w-simplexml php71w-pcre php71w-zip php71w-pdo php71w-curl php71w-iconv php71wxml php71w-apc

Installation procedure

To proceed with the installation procedure, download the latest stable version of Pagekit using wget command followed by the download link.

[root@linuxhelp ~]# wget http://pagekit.com/api/download/latest -O pagekit.zip
--2017-10-25 12:26:55--  http://pagekit.com/api/download/latest
Resolving pagekit.com (pagekit.com)... 213.160.72.26, 2a00:17d8:100::191
Connecting to pagekit.com (pagekit.com)|213.160.72.26|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://pagekit.com/api/download/latest [following]
--2017-10-25 12:26:56--  https://pagekit.com/api/download/latest
Connecting to pagekit.com (pagekit.com)|213.160.72.26|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github.com/pagekit/pagekit/releases/download/1.0.13/pagekit-1.0.13.zip [following]
--2017-10-25 12:26:56--  https://github.com/pagekit/pagekit/releases/download/1.0.13/pagekit-1.0.13.zip
Resolving github.com (github.com)... 192.30.255.112, 192.30.255.113
Connecting to github.com (github.com)|192.30.255.112|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/17486281/3132d080-8e6a-11e7-87d2-0185b3cd5f83?X-Amz-Algorithm=AWS4-HMAC-SHA256& X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20171025%2Fus-east-1%2Fs3%2Faws4_request& X-Amz-Date=20171025T065734Z& X-Amz-Expires=300& X-Amz-Signature=3d499dcfc005b8cbbb33c5445300d0b1ec43579d21a78f51dfa5c99eef33bb8b& X-Amz-SignedHeaders=host& actor_id=0& response-content-disposition=attachment%3B%20filename%3Dpagekit-1.0.13.zip& response-content-type=application%2Foctet-stream [following]
--2017-10-25 12:26:57--  https://github-production-release-asset-2e65be.s3.amazonaws.com/17486281/3132d080-8e6a-11e7-87d2-0185b3cd5f83?X-Amz-Algorithm=AWS4-HMAC-SHA256& X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20171025%2Fus-east-1%2Fs3%2Faws4_request& X-Amz-Date=20171025T065734Z& X-Amz-Expires=300& X-Amz-Signature=3d499dcfc005b8cbbb33c5445300d0b1ec43579d21a78f51dfa5c99eef33bb8b& X-Amz-SignedHeaders=host& actor_id=0& response-content-disposition=attachment%3B%20filename%3Dpagekit-1.0.13.zip& response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 54.231.81.136
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|54.231.81.136|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8308716 (7.9M) [application/octet-stream]
Saving to: ‘ pagekit.zip’ 

100%[======================================> ] 8,308,716    332KB/s   in 21s    

2017-10-25 12:27:19 (391 KB/s) - ‘ pagekit.zip’  saved [8308716/8308716]

Extract the downloaded package in Apache document root by running the unzip command.

[root@linuxhelp ~]# unzip pagekit.zip -d /var/www/html/
Archive:  pagekit.zip
  inflating: /var/www/html/app/assets/codemirror/codemirror.css  
  inflating: /var/www/html/app/assets/codemirror/codemirror.js  
  inflating: /var/www/html/app/assets/codemirror/hint.css  
  inflating: /var/www/html/app/assets/jquery/bower.json  
  inflating: /var/www/html/app/assets/jquery/dist/jquery.min.js  
  inflating: /var/www/html/app/assets/jquery/MIT-LICENSE.txt  
  inflating: /var/www/html/app/assets/js-md5/bower.json  
  inflating: /var/www/html/app/assets/js-md5/js/md5.js  
.
.
.
inflating: /var/www/html/webpack.config.js  
 extracting: /var/www/html/.bowerrc  
  inflating: /var/www/html/.htaccess  
   creating: /var/www/html/tmp/
   creating: /var/www/html/tmp/cache/
   creating: /var/www/html/tmp/temp/
   creating: /var/www/html/tmp/logs/
   creating: /var/www/html/tmp/sessions/
   creating: /var/www/html/tmp/packages/

Enter into the HTML location and list the files in the given directory.

[root@linuxhelp ~]# cd /var/www/html/
[root@linuxhelp html]# ls -l
total 172
drwxr-xr-x 8 root root     89 Oct 25 12:34 app
-rw-rw-rw- 1 root root    962 Apr  1  2016 autoload.php
-rw-rw-rw- 1 root root    316 Aug 31 16:19 bower.json
-rw-rw-rw- 1 root root  11917 Aug 31 16:31 CHANGELOG.md
-rw-rw-rw- 1 root root   1570 Aug 31 16:19 composer.json
-rw-rw-rw- 1 root root 111543 Aug 31 16:19 composer.lock
-rw-rw-rw- 1 root root   4235 Jun 29  2016 gulpfile.js
-rw-rw-rw- 1 root root   1063 Apr  1  2016 index.php
-rw-rw-rw- 1 root root   1051 Apr  1  2016 LICENSE
-rw-rw-rw- 1 root root    864 Jul  1  2016 package.json
drwxr-xr-x 4 root root     93 Oct 25 12:34 packages
-rw-rw-rw- 1 root root    155 Apr  1  2016 pagekit
-rw-rw-rw- 1 root root   2669 Apr  1  2016 phpunit.xml.dist
-rw-rw-rw- 1 root root   2271 Aug 31 16:31 README.md
drwxr-xr-x 2 root root     81 Oct 25 12:34 storage
drwxrwxrwx 7 root root     70 Aug 31 16:32 tmp
-rw-rw-rw- 1 root root    499 Jul  1  2016 webpack.config.js 

Create an Apache configuration file named pagekit.conf and enter the following content in the file. Save and exit the file.

[root@linuxhelp html]# vim /etc/httpd/conf.d/pagekit.conf

< VirtualHost *:80> 
DocumentRoot " /var/www/html" 
ServerName www.linuxhelp1.com
< Directory " /var/www/html/" > 
DirectoryIndex index.php
Options FollowSymLinks
AllowOverride All
Require all granted
< /Directory> 
< /VirtualHost> 

Restart the Apache service.

[root@linuxhelp html]# systemctl restart httpd

Provide the appropriate owner permission and file execution permission by executing the following commands.

[root@linuxhelp html]# chown -R apache:apache /var/www/html/
[root@linuxhelp html]# chmod -R 775 /var/www/html/

Switch over to the browser and enter the URL as http://< yourdomain> /installer. The Pagekit installer appears on the screen.

Choose the required language and click Next option.

Create a new database by entering the following details.

Create a new site by entering the following details as shown below and click INSTALL option.

The installation is complete and now the login page of the Pagekit appears on the screen.

Enter the login page of Pagekit and click Login.

The dashboard of the Pagekit appears on the screen.

Thus we conclude the installation procedure of Pagekit on CentOS 7.

FAQ
Q
Wait, magic? What magic?
A
It's a bit complicated - but in short, the PageKite back-end configures DNS for your server and establishes communication with our global pool of front-end relays. These relays have public IP addresses and are visible on the global Internet, which makes it possible for them to accept incoming requests on your server's behalf. These requests get forwarded (proxied) over the tunnel to your server, and any replies travel back the same way.
Q
Where is my configuration file?
A
The location of your configuration file depends on your operating system and how you are using PageKite:
On any unix-based system (including the Mac and all Linux distributions), your configuration file will be created in your home directory and named .pagekite.rc (note the leading dot).
Q
what are the system requirements?
A
Refer the following requirements,
Apache 2.2+ or nginx
MySQL Server 5.1+ or SQLite 3
PHP Version 5.5.9+
Q
Where is the source?
A
The PageKite Open Source home-page is here: http://pagekite.org/

Our primary source repository is on GitHub, however the code there may at times be unstable if we are in the middle of making important changes.
Q
How does it work?
A
PageKite creates a connection between your localhost server and the public Internet. Your local server gets a public name (something.pagekite.me) which anyone can connect to using a normal web browser.