Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Install ImpressPages 4 on a CentOS 7 Virtual Server

In this tutorial, we will show you how to install ImpressPages 4 on a CentOS 7 Virtual Server with Nginx, MariaDB and PHP-FPM. ImpressPages is an open-source PHP framework which is easy to learn and helps you to create beautiful websites with quality content. This guide should work on other Linux VPS systems as well but was tested and written for a CentOS 7 VPS.

Update the system and install necessary packages.

root@vps:~# yum -y update
root@vps:~# yum install unzip wget

Install MariaDB and create a database.

To install MariaDB server run the following command:

root@vps:~# yum install mariadb-server mariadb

To start the service and enable it at the boot time run:

root@vps:~# systemctl start mariadb.service
root@vps:~# systemctl enable mariadb.service

It is very important to secure your MariaDB server, run the following script before creating and populating the databases.

mysql_secure_installation

Once you are finished with the step above, login as a MariaDB root and create an new database and user:

root@vps:~# mysql -uroot -p
MariaDB [(none)]>> create database impresspages;
MariaDB [(none)]>> GRANT ALL PRIVILEGES ON impresspages.* TO 'impresspages'@'localhost' IDENTIFIED BY 'impresspagesPassword';
MariaDB [(none)]>> flush privileges;
MariaDB [(none)]>> \q;

Create a root directory for your web site and install impresspages

root@vps:~# mkdir -p /var/www/html/yourSite.com/
root@vps:~# cd /var/www/html/yourSite.com/
root@vps:~# wget http://download.impresspages.org/ImpressPages_4_6_5.zip
root@vps:~# unzip ImpressPages_4_6_5.zip
root@vps:~# mv ImpressPages/* .
root@vps:~# rm -rf ImpressPages*

Install and configure PHP and Nginx

Installing PHP and Nginx is pretty easy, just run the following command:

root@vps:~# yum install nginx php-fpm php-cli php-mysqlnd php-mbstring php-gd php-curl php-pdo
root@vps:~# systemctl start php-fpm.service
root@vps:~# systemctl enable php-fpm.service
root@vps:~# systemctl start nginx.service 
root@vps:~# systemctl enable nginx.service

To change PHP-FPM to listen on a unix socket, open the default www pool

root@vps:~# vim /etc/php-fpm.d/www.conf

and change from

listen = 127.0.0.1:9000

to

listen = /var/run/php-fpm/php-fpm.socket

and restart the service for changes to take effect

root@vps:~# systemctl restart php-fpm

Create a php session directory and change the ownership to apache (the user under which PHP runs).

root@vps:~# mkdir /var/lib/php/session
root@vps:~# chown apache:apache /var/lib/php/session

Create a new Nginx server block with the following content:

root@vps:~# cat > /etc/nginx/conf.d/yourSite.com.conf
server {
    server_name yourSite.com;
    listen 80;
    root /var/www/html/yourSite.com;
    access_log /var/log/nginx/yourSite.com-access.log;
    error_log /var/log/nginx/yourSite.com-error.log;
    index index.php;
 
    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~* \.(?:ico|css|js|gif|jpe?g|png|ttf|woff)$ {
        access_log off;
        expires 30d;
        add_header Pragma public;
        add_header Cache-Control "public, mustrevalidate, proxy-revalidate";
    }
 
    location ~ \.php$ {
        fastcgi_index index.php;
        fastcgi_split_path_info ^(.+\.php)(.*)$;
        fastcgi_keep_conn on;
        include /etc/nginx/fastcgi_params;
        fastcgi_pass unix:/var/run/php-fpm/php-fpm.socket;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
 
    location ~ /\.ht {
        deny all;
    }

}
EOF

Test the Nginx configuration and restart the server by running the following commands:

root@vps:~# nginx -t

root@vps:~#  systemctl restart nginx

Set the correct permissions

root@vps:~# chown -R apache:apache /var/www/html/yourSite.com/

That’s it. Now open your browser, type the address and follow the installation wizard.

For more information, please check out the official ImpressPages website.


PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.



This post first appeared on Virtual-Server.org Virtual Server, please read the originial post: here

Share the post

Install ImpressPages 4 on a CentOS 7 Virtual Server

×

Subscribe to Virtual-server.org Virtual Server

Get updates delivered right to your inbox!

Thank you for your subscription

×