To create attractive UIs with ** AMP **, you need to understand the basics of the ** AMP ** framework. In this tutorial, you will configure CMS Made Simple.
Alibaba Cloud Tech Share Written by Arslan Ud Din Shafiq.
CMS Made Simple is an open source and free content management system (CMS). It's user-friendly, extensible, well-designed and packed with powerful add-ons and plugins for easy integration.
With CMS Made Simple, you can use the add-and-drop function to arrange and rearrange pages. CMS Made Simple is one of the best choices for developers, designers and end users alike. If you are an end user or editor, you don't have to worry about the appearance, you can easily edit and update the content of the website, and edit the content with the simple editor provided by CMS Made Simple. I can.
CMS Made Simple does not limit the use of off-the-shelf or premium templates and does not require extra money. With a little knowledge of HTML and CSS, developers can simply use the Design Manager to create layouts and other designs. If you already have some design, don't worry, you can put it in the CMS Made Simple as well.
As a developer, I would like to use Alibaba Cloud services to host CMS Made Simple. Alibaba Cloud Elastic Compute (https://www.alibabacloud.com/product/ecs?spm=a2c65.11461447.0.0.3f9a1154gXDurT) (ECS) is flexible and allows you to upgrade your hardware resources whenever traffic increases.
CMS Made Simple does not restrict installation on any particular operating system (OS). You can use your favorite OS, but the installation procedure depends on your OS selection.
This tutorial uses Alibaba Cloud Elastic Compute Service (ECS) with CentOS 7.2 (https://www.alibabacloud.com/blog/how-to-set-up-cms-made-simple-v2-2-lamp-in-centos-7-3_594684?spm=a2c65.11461447.0.0.3f9a1154gXDurT) installed.
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.3f9a1154gXDurT&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.3f9a1154gXDurT). This tutorial uses Alibaba Cloud ECS and CentOS 7. If you don't know how to set up an ECS instance, please refer to this tutorial (https://www.alibabacloud.com/blog/3-ways-to-set-up-a-linux-server-on-alibaba-cloud_572384?spm=a2c65.11461447.0.0.3f9a1154gXDurT).
Set the host name of the server.
You need to access Alibaba Cloud's VNC console or have an SSH client installed on your PC.
# useradd aareez
Note: "aareez" can be any username you like.
# passwd aareez
4, this time add the username to the sudo user group to give root/admin 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
When you execute the above command, the following line will be displayed in the opened file.
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
In the screenshot above, you can see that the username "areeez" is part of "wheel".
# su - aareez
To see which account you logged in from, type the following command and press Enter.
# whoami
Run the following command to update CentOS before proceeding with the package installation.
Note: Remember to log in with sudo privileges from a non-root user to run this command.
# sudo yum -y update
Now you will be prompted to enter your password to confirm. Enter your password, press Enter, and wait until the screen says "Complete!".
This completes the CentOS update. Next is the installation of Apache Web Server. Before installing Apache Web Server, you need to install the nano editor and epel-release.
# sudo yum install nano
You will be prompted to enter your password. Enter your password and press Enter.
Type y and press Enter to continue the installation.
4, Nano editor was installed successfully.
# sudo yum install epel-release
3, Epel-release was installed successfully.
# sudo yum -y install httpd
You may be prompted to enter your password. Enter your password here and press Enter to wait for the update.
3, Now the apache server will run automatically when you start ECS. To do this, run the following command.
# sudo systemctl enable httpd
# sudo systemctl start httpd
# sudo nano /etc/httpd/conf/httpd.conf
Note: The DocumentRoot settings should look like this: You can search the text of an open file by typing the following line with Ctrl + W.
# DocumentRoot "/var/www/html”
Press Ctrl + X to close the opened file.
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, uncomment it, press Ctrl + X, then'Y', and then press Enter.
# sudo nano /etc/httpd/conf/httpd.conf
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>
Press Ctrl + X to save your changes, press Y, and then press Enter. Your changes are now saved.
You need to restart apache for the changes to work properly. To do this, run the following command.
# sudo systemctl restart httpd
If you have a firewall enabled, you must define a rule in the Alibaba Cloud security group on your cloud server to add exceptions for ports 80/tcp and 443/tcp. You can enable these ports when you create an ECS instance, but if you forget to unblock these ports, follow the steps below. By default, these ports are blocked by a firewall.
To do this, follow the steps given in the snapshot.
Click Set Rule.
Click Quick Create Rule.
Add the settings as shown in the screenshot below and click OK.
SELinux should be disabled to avoid permission-related issues with CMS Made Simple. To do this, first check if SELinux is enabled or disabled. Use the following command to check.
# sudo sestatus
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
Modify the open file as follows and save the modified 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:
# sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
# 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.
# sudo yum -y install mariadb-server
Alibaba Cloud AsparaDB for RDS is the best alternative and highly recommended. Alibaba Cloud AsparaDB for RDS frees you from database management and allows you to focus on your business. It is a service that can be used immediately. It provides protection from SQL injection, network attacks, brute force attacks, and many other types of database attacks. It's highly extensible, available, easy to use and safe.
MariaDB Server has been successfully installed.
# sudo systemctl enable mariadb
# sudo systemctl start mariadb
3, Now, execute the command to ensure the security of MariaDB server.
# sudo mysql_secure_installation
The root password is blank by default, so press the Enter button to proceed and select'Y'to select the password.
# sudo mysql -u root -p
The Now command prompt will prompt you to enter the password for the user "root". Enter the password and press Enter to display the MariaDB command prompt.
To create a database for CMS Made Simple and a user for this database, use the following query.
CREATE DATABASE made_db CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'made_db'@'localhost' IDENTIFIED BY 'MadePassword';
GRANT ALL PRIVILEGES ON made_db.* TO 'made_db'@'localhost';
FLUSH PRIVILEGES;
EXIT;
You can rename made_db to any name you like.
# sudo yum -y install unzip
3, Unzip was installed successfully.
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
# sudo wget http://s3.amazonaws.com/cmsms/downloads/14144/cmsms-2.2.7-install.zip
If you get an error with the above command, or if you need to install the latest version of CMS Made Simple, click here (https://www.cmsmadesimple.org/downloads/cmsms/?spm=a2c65.11461447.0.0.3f9a1154X4O8fp) to get the latest version of the link.
# ls -la
4, unzip the compressed zip folder now. To do this, use the following command.
# sudo unzip cms-2.2.7.install.zip
5, change the owner of the file to avoid permission issues. Execute the following command.
# sudo chown -R apache:apache * ./
# sudo systemctl restart httpd
Congratulations. Use your IP address to access the CMS Made Simple.
http://47.254.65.213/cmsms-2.2.7-install.php
Click Next.
After this, the screen will change to the database setting screen. Add the following values as used in the query above.
Host | localhost |
---|---|
Database Name | made_db |
Username | made_db |
Password | MadePassword |
If you want to set a language other than English, select the language from the list. Then proceed to the next.
Click the next button to continue.
Click the Next button to proceed.
9, CMS Made Simple has been successfully installed and ready to use.
http://47.254.65.213/admin/login.php
Recommended Posts