Set up ImpressPages 5.0 with LAMP on CentOS 7.3

ImpressPages is an open source and free CMS. (Model View Controller) Based on ** MVC ** architecture.

Alibaba Cloud Tech Share Written by Arslan Ud Din Shafiq.

ImpressPages is an open source and free content management system (CMS). It is based on the (Model-View-Controller) MVC architecture. ImpressPages is a lightweight, effective and simple CMS that supports multiple languages ​​by default. You can create an interface just by dragging and dropping.

Follow the steps below to install ImpressPages 5.0.

Prerequisites

  1. You need to have Alibaba Cloud Elastic Compute Service (ECS). If you are new to us, please click here (https://account-intl.aliyun.com/register/intl_register.htm?spm=a2c65.11461447.0.0.2d9b7128i4cdHj&biz_params=%7B%22intl%22%3A%22%7B%5C%22referralCode%5C%22%3A%5C%22ffxt3q%5C%22%7D%22%7D) and try Alibaba Cloud's Free Trial (https://www.alibabacloud.com/campaign/free-trial?spm=a2c65.11461447.0.0.2d9b7128i4cdHj). This tutorial uses Alibaba Cloud ECS and CentOS 7.

  2. Set the host name of the server.

  3. Options: Set security groups and enable firewalls to keep your server secure. Some Alibaba Cloud security products are provided free of charge, such as Server Guard (https://www.alibabacloud.com/product/server-guard?spm=a2c65.11461447.0.0.2d9b7128i4cdHj) and Anti-DoS Basic (https://www.alibabacloud.com/product/anti-ddos?spm=a2c65.11461447.0.0.2d9b7128i4cdHj).

Connecting to an ECS instance

  1. Root username via SSH client (eg Putty-Putty is available from https://www.putty.org) or through the VNC console available on the Alibaba Cloud account dashboard. And log in with your password.

Add a user with root privileges

  1. To add a new user with root privileges, use the following command.

# useradd aareez

Here, "aareez" can be replaced with any username.

  1. Set the desired password for the selected user name. In my case, the username was "areez". When you enter the following command, you will be prompted to enter a new password.

# passwd aareez

  1. Now assign a username to the group of sudo users and give them root privileges. To do this, check the/etc/sudoers file to see if the sudoers group is enabled. To do this, run the following command:

# visudo

  1. When you execute the above command, the following line will be displayed in the opened file.

image.png

  1. Execute the following command to add the user name "aareez" to the "wheel" group.

# usermod -aG wheel aareez

After executing the above command, you can check the affiliation of the group by executing the following command.

# groups aareez

  1. Log in with your new username and password. You can switch users with the following command.

# su - aareez

You can see that you are currently logged in from your new account. If you want to check this, you can check it with the following command.

# whoami

image.png

Update CentOS 7 system

  1. Before proceeding with the package installation, please update CentOS with the following command. Remember to log in with sudo privileges from a non-root user to run this command.

# sudo yum -y update

  1. You will be prompted to enter your password. Enter your password here and press Enter to wait for the update.

This completes the CentOS update. The next step is to install Apache Web Server.

Installing Nano Editor

  1. To install Nano Editor, execute the following command.

# sudo yum install nano

Install epel-release

  1. To install epel-release, execute the following command.

# sudo yum install epel-release

Apache web server installation

  1. To install apache web-server, you need to run the following command.

# sudo yum -y install httpd

You will be prompted to enter the password. Enter your password now and press Enter to wait for the update.

  1. After installation, you need to make it run automatically when you start ECS. To do this, run the following command.

# sudo systemctl enable httpd

# sudo systemctl start httpd

  1. To make sure that the DocumentRoot directive points to the correct directory, check the Apache configuration file with the following command.

# sudo nano /etc/httpd/conf/httpd.conf

Note: The DocumentRoot settings are as follows.

# DocumentRoot "/var/www/html”

  1. Run the following command to open 00-base.conf and search for mod_rewrite to see if this module is loaded correctly.

# sudo nano /etc/httpd/conf.modules.d/00-base.conf

If the mod_rewrite module is already loaded, you will see a line similar to the following:

LoadModule rewrite_module modules/mod_rewrite.so

Semicolons are used to comment on lines in any Apache module. If the above line begins with a semicolon (;), remove the semicolon and uncomment it.

16, Now, in order for mod_rewrite to work properly with ImpressPages CMS, you need to edit the Apache settings. To open the file for editing, use the following command.

# sudo nano /etc/httpd/conf/httpd.conf

17, Find the section <Directory "/ var/www/html"> and change the value of AllOverride as follows:

From To
AllowOverride none AllowOverride All

The modified section looks like this:

<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

18, Press Ctrl + X to save your changes, press Y, then press Enter. Your changes are now saved.

  1. You need to restart apache for the changes to work properly. To do this, run the following command.

# sudo systemctl restart httpd

Set up firewalls for HTTP and HTTPS

If you have a firewall enabled, you need to define a rule in the Alibaba Cloud security group on your cloud server and add an exception for ports 80/tcp, 443/tcp. These ports can be enabled when you create an ECS instance. If you forget to unblock these ports, follow these steps: By default, these ports are blocked by a firewall.

To do this, follow the instructions given in the snapshot.

20, Go to the Elastic Compute Service section. Click the More button on the ECS you used for your ImpressPages CMS.

image.png

  1. Click Set Rule.

22, Click Quick Create Rule.

23, Add settings as shown in the screenshot below and click OK.

image.png

Disable SELinux (Security Enhanced Linux)

SELinux should be disabled to avoid permissions-related issues with ImpressPages CMS. To do this, first check if SELinux is enabled or disabled.

  1. To check, use the following command.

# sudo sestatus

image.png

It is disabled by default on Alibaba Cloud ECS. However, if you have previously made changes to ECS, follow this step. If the status is disabled, skip this step. Otherwise, use the following command to open the file.

# sudo nano /etc/selinux/config

  1. Make the following changes to the open file and save the changed file.
From To
SELINUX=enforcing SELINUX=disabled

Press Ctrl + X, press Y, press Enter to save your changes, and close the open file.

After disabling SELinux, you need to restart ECS. To restart ECS, follow these steps:

Install PHP 7.1

26, To install PHP 7.1 on CentOS, you need to add an external repository. To do this, run the following command.

# sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

  1. After adding the repository, install PHP 7.1 with the modules needed by ImpressPages CMS. Execute the following command.

# sudo yum -y install php71w php71w-gd php71w-mbstring php71w-mysql php71w-xml php71w-common php71w-pdo

If the PHP module is installed successfully, the following screen will be displayed.

image.png

MariaDB (MySQL) server installation

  1. As an alternative to the MySQL server, CentOS uses the MariaDB server by default. To install MariaDB, use the following command.

# sudo yum -y install mariadb-server

Alibaba Cloud Aspara DB for RDS is the best alternative. We recommend using this.

  1. After a successful installation, enable the MariaDB server to start automatically when the system reboots. To do this, use the following command:

# sudo systemctl enable mariadb

# sudo systemctl start mariadb

30, Now, run the command to ensure the security of the MariaDB server.

# sudo mysql_secure_installation

The root password is blank by default, but press the Enter button to proceed and select "Y" to select the password.

Creating a database

  1. Log in as the root user using the MariaDB shell and run the following command.

# sudo mysql -u root -p

  1. The command prompt will prompt you to enter the password for user'root'. When you enter your password and press Enter, you will be prompted at the MariaDB command prompt.

33, ImpressPages To create a database for the CMS and a user for this database, use the following query.

CREATE DATABASE im_db CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'im_db'@'localhost' IDENTIFIED BY 'SecurePassword';
GRANT ALL PRIVILEGES ON im_db.* TO 'im_db'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Here you can rename im_db to any name you like.

Unzip installation

34, You need the unzip tool to unzip any zip folder. To do this, use the following command.

# sudo yum -y install unzip

35, then type y and press Enter.

ImpressPages CMS file installation

36, go to cd/var/www/html /.

Note: If you get an error like "No such directory or file", create an html directory. To do this, go to cd/var/www, run the following command to create an html directory, type cd html and press enter.

# sudo mkdir html

37, Now use the following command to get the ImpressPages CMS package for installation.

# sudo wget http://download.impresspages.org/ImpressPages_5_0_3.zip

If you get an error with the above command, or if you need to install the latest version, click here (https://www.impresspages.org/download?spm=a2c65.11461447.0.0.2d9b7128i4cdHj) to get the latest version link.

  1. To list the files in the current directory, use the following command.

# ls -la

39, Unzip the compressed zip folder now. To do this, use the following command.

# sudo unzip ImpressPages_5_0_3.zip

40, now use the command to move the installed directory to/var/www/html.

# sudo mv ImpressPages/* ImpressPages/.htaccess /var/www/html

  1. Change the owner of the file to avoid permission issues. Execute the following command.

# sudo chown -R apache:apache * .htaccess

  1. After performing the above steps, restart Apache with the command.

# sudo systemctl restart httpd

Congratulations. You can now access your ImpressPages CMS via your IP address.

Completed ImpressPages CMS installation

43, To access the ImpressPages CMS, use the ECS IP address instead of 47.254.66.175, enter the following address in your browser's address box and press enter.

http://47.254.66.175/index.php

image.png

44, you will be redirected to the website settings page, enter your website name, admin email address and time zone.

Web name The name of your website
Administrator email address Your email address
Time zone あなたのTime zone

Press "Next".

45, This will open the system check page, press Next.

46, after this you will be redirected to the database settings page. Add the following values ​​as used in the query above.

host localhost
Database name im_db
username im_db
password SecurePassword

image.png

Then press the Next button.

47, this will automatically redirect you to the amine panel. If you are not redirected automatically, click the link below to add your ECS IP address.

http://47.254.66.175/admin.php

48, If you still can't access the admin screen, there may be a problem with your .htaccess file. To do this, open .htaccess in your editor with the following command:

# sudo nano .htaccess

You will be prompted for the user's password. Enter your password and press Enter.

49, try uncommenting the line below.

Options -Indexes
Options -MultiViews

image.png

Press Ctrl + X, press Y, and then press Enter.

50, restart the apache server

# sudo systemctl restart httpd

image.png

Thank you for waiting .... The tutorial is over. If you have any questions or problems, please write them in the comments. Thank you very much.

image.png

Recommended Posts

Set up ImpressPages 5.0 with LAMP on CentOS 7.3
Set up Gitolite on CentOS 7
Set up Docker Registry locally on CentOS 7
Set up a CentOS virtual server with Vagrant
Set up GitLab with docker
Steps to set up Postfix and Dovecot on CentOS 8.3
Steps to set up a VNC server on CentOS 8.3
Set up ansible-playbook on Ubuntu 20.04
Set up Django on Ubuntu 16.04 with PostgreSQL and Gunicorn on ECS
WordPress with Docker Compose on CentOS 8
Personal tips on working with CentOS servers
Set up Metabase service on Windows Server 2012
Minimal steps to set up a Ruby environment with rbenv on Ubuntu 20.04
Notes on what to do when EC2 is set up with t2.micro
Install NextCloud on CentOS 7 with Alibaba Cloud ECS
Gachi beginners set up containers on Kubernetes? Until···
Set up an SSH server on WSL2 Ubuntu 20.04
OpenVPN on CentOS 8
Install GitLab on CentOS 8 with no internet connection
Install CMS Made Simple v2.2.2 on LAMP on CentOS 7.3
I want to hit the API with Rails on multiple docker-composes set up locally
Create a user with an empty password on CentOS7
Set referrer limits on google vision api with hocalhost
Maven on CentOS 7 tutorial
Docker installation on CentOS 6
Use perltidy on CentOS 8
Install Golang on CentOS 8
Try OpenLiteSpeed on CentOS8
Install Neo4j 4.1.3 on centOS
Tomcat v8 on CentOS7
Install Vertica 10.0 on CentOS 6.10
Zabbix 5 installation on CentOS 8
Use mod_auth_cas on CentOS 8
Use CentOS with LXD
Install PostgreSQL 12 on Centos8
Install nginx on centOS7
Install Python 3 on CentOS 7
Install kuromoji on CentOS7
Build Growai with Centos7
Use bat on Centos.
Jetty v8 on CentOS7
OpenJDK installation on CentOS 7
Install Mattermost on CentOS 7
Install PostGIS 2.5.5 on CentOS7
Install jpndistrict on CentOS 7
Install Redmine 4.1.1 on CentOS 7
Smokeping Install on CentOS7
Install PostgreSQL 13 on CentOS 7.5
Note: Install nginx from official repositories with dnf on CentOS 8
Build a CentOS 8 virtual environment on your Mac with VirtualBox
Set up a MineCraft Paper server on Ubuntu 20.04.1 LTS ② Update
[Vagrant] Prepare LAMP development environment with Vagrant (centos + apache + MySQL + PHP)
How to set up a proxy with authentication in Feign