Build Dedecms website in LNMP environment under CentOS7

Note content: LNMP environment under CentOS7 to build Dedecms website

Date of Note: 2017-12-03


< br>

Prerequisites for building a Dedecms website:


< br>

Check whether each service in the LNMP environment has been started and the process is normal##


  1. Check whether the Nginx service process has been started and whether it is listening on port 80:

ps aux |grep nginx
netstat -lntp |grep nginx

  1. Check whether selinux is closed, whether port 80 of the firewall is open, or whether the firewall rules are cleared:
[ root@localhost ~]# getenforce selinux
Disabled
[ root@localhost ~]# iptables -nvL

The commands for opening port 80 and closing selinux are as follows:

[ root@localhost ~]# setenforce 0  #Temporary closure
[ root@localhost ~]# vim /etc/selinux/config  #Permanently close SELINUX=Enforcing changed to SELINUX=disabled
[ root@localhost ~]# firewall-cmd --zone=public--add-port=80/tcp --permanent  #Open port 80
  1. Check whether the process of php-fpm service has been started:

ps aux |grep php-fpm

  1. Check whether Nginx can parse php normally. First find your Nginx default site directory. Here is my Nginx default site directory is /data/wwwroot/default/, then you change the Nginx default access page file to index.php :
[ root@localhost ~]# cd /data/wwwroot/default[root@localhost /data/wwwroot/default]# mv index.html index.php
[ root@localhost /data/wwwroot/default]# vim index.php

The edited content is as follows:

<? php
 phpinfo();?>

Then use the browser to visit, and the php configuration information page is displayed, which means it can be parsed normally:

  1. Check whether mysql can be logged in and used normally:

mysql -uroot -p'12345'

< br>

Start downloading and configuring Dedecms


Download Dedecms:

After ensuring that the services in the above LNMP environment are normal, download the compressed package of Dedecms on the official website. The download address of the official website is as follows:

http://www.dedecms.com/products/dedecms/downloads/

What I downloaded here is the UTF8 version of 5.7:

[ root@localhost ~]# cd /usr/local/src/[root@localhost /usr/local/src]# wget http://updatenew.dedecms.com/base-v57/package/DedeCMS-V5.7-UTF8-SP2.tar.gz

After downloading, unzip, you can see the following directories:

[ root@localhost /usr/local/src]# tar -zxvf DedeCMS-V5.7-UTF8-SP2.tar.gz
[ root@localhost /usr/local/src]# ls
DedeCMS-V5.7-UTF8-SP2
[ root@localhost /usr/local/src/DedeCMS-V5.7-UTF8-SP2]# ls
docs  uploads
[ root@localhost /usr/local/src/DedeCMS-V5.7-UTF8-SP2]#

< br>

Configure database user:

Then configure the MySQL database, create a user and a library for DedeCMS, because it is more dangerous to use the root user directly. Of course, it doesn't matter if you just do experiments, you can ignore the configuration in this step and use the root user directly.

  1. Log in to MySQL:

mysql -uroot -p'12345'

  1. Create a library:

CREATE DATABASE dedeCMS;

  1. Create a user and only give this user the right to log in locally:

CREATE USER DedeCMS@localhost IDENTIFIED BY '123456';

If you want to be more secure, you can use MySQL's built-in password function to MD5 encrypt the user's password when creating a user:

CREATE USER DedeCMS@localhost IDENTIFIED BY PASSWORD('123456');

Or further nested encryption:

CREATE USER DedeCMS@localhost IDENTIFIED BY PASSWORD(PASSWORD('123456'));

  1. Grant DedeCMS users all rights to dedeCMS library operations:

GRANT ALL ON dedeCMS.* TO DedeCMS;

  1. Exit MySQL after completing the above operations:

exit

< br>

Install Dedecms:

First delete the default file in the nginx default site directory, which is the page file we just used to test and parse the php, and then copy all the files in the unzipped uploads directory to the nginx default site directory:

[ root@localhost /usr/local/src/DedeCMS-V5.7-UTF8-SP2]# rm -f /data/wwwroot/default/index.php
[ root@localhost /usr/local/src/DedeCMS-V5.7-UTF8-SP2]# mv ./uploads/* /data/wwwroot/default/
[ root@localhost /usr/local/src/DedeCMS-V5.7-UTF8-SP2]# cd !$
cd /data/wwwroot/default/
[ root@localhost /data/wwwroot/default]# ls
a     dede    favicon.ico  include    install  member  robots.txt  tags.php  uploads
data  images  index.php    m          plus     special templets
[ root@localhost /data/wwwroot/default]#

After completing the above operations, use the browser to visit: http://192.168.77.130/install/index.php (change the IP address to your machine's IP address), and then configure Dedecms on the page step by step:

Then the following interface may appear due to insufficient permissions:

In this case, just give permissions to these directories:

[ root@localhost /data/wwwroot/default]# chmod 777 ./[root@localhost /data/wwwroot/default]# chmod 777 a/[root@localhost /data/wwwroot/default]# chmod 777 special/[root@localhost /data/wwwroot/default]# chmod 777 uploads/

Just refresh the page after granting permissions:

Set database information and administrator password:

Website information settings:

The installation is complete:

website homepage:

Visit http://192.168.77.130/dede/ to log in to the background of the website:

< br>

**So far, the construction of DedeCMS is complete. If you want to build a complete website, you need to do a lot of configuration, because everyone’s needs are different, and the specific configuration is based on the template configuration or secondary development according to the needs. This is not an overview, but if you have any questions during the construction process, please send a private message. **

Recommended Posts

Build Dedecms website in LNMP environment under CentOS7
Build Discuz Forum in LNMP Environment under CentOS7
CentOS6.7 build LNMP environment
Centos7.6 build LNMP environment
CentOS 7 build LNMP environment
Build docker environment under Centos6.5
Centos build lnmp
[PHP] Build a PHP operating environment under CentOS
Build LEMP (Linux+Nginx+MySQL+PHP) environment under CentOS 8.1 (detailed tutorial)
Build Hadoop in CentOS
Build a basic environment for Java development under Centos7
Build OpenV** Server under CentOS7
Build zabbix monitoring zabbix4.2 in CentOS7.6
Build OpenLDAP server under CentOS7
Build zabbix monitoring zabbix4.2 in CentOS7.6
Build a PXC cluster under CentOS8
Build an FTP server under centos7
Build Nginx environment on Linux (CentOS)
Build Yum private warehouse in Centos7.3
FFmpeg environment deployment record under centos7
PPTP environment deployment record under Centos
Tomcat configuration JMX in centos 6.5 environment
Build the C++ compilation environment under ubuntu
Steps to build LNMP environment on ubuntu 20.04
Python and scrapy deployment in centos environment
Build a python development environment under Ubuntu
Install Docker CE in yum under CentOS 7
How to quickly build Nginx server under CentOS
Centos6.5 compile and install LNMP architecture web environment
How to build a LAMP environment on centos7.2
CentOS7 build jenkins
Centos7 build python3.8.5+scrapy+gerapy
Use Rancher to build a K8s cluster under CentOS7
Tutorial for deploying nginx+uwsgi in django project under Centos8
Install PHP in yum under CentOS, configure php-fpm service
SFTP dual-machine high availability environment deployment record under Centos
Environment configuration of JDK, mysql and tomcat under Centos7
Compile and install Lnmp shell script under Linux centos
Rapid deployment of Kubernetes (k8s) cluster in CentOS7 environment
Resolve the problems encountered in the linux environment under ubuntu