前言
本文目的为搭建动态网站,以discuz为例;会涉及到安装LAMP环境
步骤
安装LAMP环境
yum -y install httpd mariadb-server php php-mysql gd php-gd
启动httpd,mariadb
systemctl start httpd mariadb
设置开机自启
systemctl enable httpd mariadb
准备网站源码
下载 
1.下载解压文件:yum -y install unzip 2.解压: unzip Discuz_X2.5_SC_UTF8.zip 3.将解压得到的upload(网页代码存放处)的全部内容都复制到我们建的网站文件下/webroot/discuz:cp -rf upload/* /webroot/discuz/ 4.ls -l 网站源码文件: 可知全部是root权限才能使用源码文件,我们需要让apache能使用才可以
chown -R apache.apache /webroot/discuz/

编辑网站配置文件
vim /etc/httpd/conf.d/discuz.conf
<VirtualHost *:80>
ServerName www.discuz.com
DocumentRoot /webroot/discuz
</VirtualHost>
<Directory "/webroot/discuz">
Require all granted
</Directory>
重启httpd
systemctl restart httpd
添加数据库

解析
vim /etc/hosts
ip + www.discuz
测试
  
|