阿里云服务器LAMP+DZ论坛

准备环境
首先购买阿里云服务器
阿里云上添加端口
阿里云服务器LAMP+DZ论坛插图
1,关闭防火墙

[root@iZ2ze0og9utae2lidl4qoyZ ~]# systemctl stop firewalld

2,安装lamp相关插件

[root@iZ2ze0og9utae2lidl4qoyZ ~]# yum -y install httpd maridb maridb-server php php-devel php-mysql php-gd

3,启动httpd

[root@iZ2ze0og9utae2lidl4qoyZ ~]# systemctl start httpd
[root@iZ2ze0og9utae2lidl4qoyZ ~]# systemctl enable httpd

4,检查httpd状态

[root@iZ2ze0og9utae2lidl4qoyZ ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2020-05-31 20:34:09 CST; 1min 46s ago
     Docs: man:httpd(8)
           man:apachectl(8)
 Main PID: 1138 (httpd)
   Status: "Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec"
   CGroup: /system.slice/httpd.service
           ├─1138 /usr/sbin/httpd -DFOREGROUND
           ├─1140 /usr/sbin/httpd -DFOREGROUND
           ├─1141 /usr/sbin/httpd -DFOREGROUND
           ├─1142 /usr/sbin/httpd -DFOREGROUND
           ├─1143 /usr/sbin/httpd -DFOREGROUND
           └─1144 /usr/sbin/httpd -DFOREGROUND

May 31 20:34:09 iZ2ze0og9utae2lidl4qoyZ systemd[1]: Starting The Apache HTTP Server...
May 31 20:34:09 iZ2ze0og9utae2lidl4qoyZ httpd[1138]: AH00558: httpd: Could not reliably determine the s...age
May 31 20:34:09 iZ2ze0og9utae2lidl4qoyZ systemd[1]: Started The Apache HTTP Server.
Hint: Some lines were ellipsized, use -l to show in full.
[root@iZ2ze0og9utae2lidl4qoyZ ~]#

5,浏览器访问
阿里云服务器LAMP+DZ论坛插图(1)
6,修改httpd配置文件

[root@iZ2ze0og9utae2lidl4qoyZ ~]# vim /etc/httpd/conf/httpd.conf

阿里云服务器LAMP+DZ论坛插图(2)
阿里云服务器LAMP+DZ论坛插图(3)
7,编写php文件

[root@iZ2ze0og9utae2lidl4qoyZ ~]# vim /var/www/html/index.php
[root@iZ2ze0og9utae2lidl4qoyZ ~]# cat /var/www/html/index.php 
<?php
	phpinfo();
?>
[root@iZ2ze0og9utae2lidl4qoyZ ~]#

8,重启httpd,查看是否有php页面

[root@iZ2ze0og9utae2lidl4qoyZ ~]# systemctl restart httpd

阿里云服务器LAMP+DZ论坛插图(4)
9,启动mysql

[root@iZ2ze0og9utae2lidl4qoyZ ~]# systemctl restart mariadb

10,上传DZ论坛

[root@iZ2ze0og9utae2lidl4qoyZ ~]# cd /var/www/html/
[root@iZ2ze0og9utae2lidl4qoyZ html]# ls
Discuz_X3.2_SC_UTF8.zip  index.php
[root@iZ2ze0og9utae2lidl4qoyZ html]#

11,安装unzip插件

[root@iZ2ze0og9utae2lidl4qoyZ html]# yum -y install unzip

12,解压unzip

[root@iZ2ze0og9utae2lidl4qoyZ html]# unzip Discuz_X3.2_SC_UTF8.zip

阿里云服务器LAMP+DZ论坛插图(5)
13,赋权

[root@iZ2ze0og9utae2lidl4qoyZ html]# chmod -R 777 /var/www/html/

14,重启httpd

[root@iZ2ze0og9utae2lidl4qoyZ ~]# systemctl restart httpd

15,在浏览器上登录DZ论坛
阿里云服务器LAMP+DZ论坛插图(6)
阿里云服务器LAMP+DZ论坛插图(7)
阿里云服务器LAMP+DZ论坛插图(8)
阿里云服务器LAMP+DZ论坛插图(9)
阿里云服务器LAMP+DZ论坛插图(10)

没有账号? 忘记密码?

社交账号快速登录