Discuz部署笔记
一、部署教程
参考腾讯云手动搭建 Discuz! 论坛文档。https://cloud.tencent.com/document/product/213/8043#.E6.93.8D.E4.BD.9C.E6.AD.A5.E9.AA.A4
二、可能遇到的问题
2.1 部署完成之后,安装Discuz时,出现目录不存在、文件不可写

出现这种问题,可能的原因:
a、文件没有给够权限,可以通过chmod -R 777 /var/www/html/给权限。
b、对于Centos系统来说的,selinux的安全问题。
- 查看SELinux状态:getenforce
- 临时设置SeLinux:setenforce 0
- 永久修改Selinux为disabled,vim /etc/selinux/config,修改SELINUX=enforcing为SELINUX=disabled
2.2 函数依赖性检查不通过
a、mysql_connect()不支持,安装php-xml即可
- sudo yum install php-xml
- service php-fpm restart
b、xml_parser_create()不支持,安装php-mysql
- 安装时可能会遇到:No match for argument: php-mysql 。
[root@localhost ~]# yum -y install php-mysqlLast metadata expiration check: 2:31:26 ago on Fri 19 Mar 2021 11:53:32 AM CST.No match for argument: php-mysqlError: Unable to find a match: php-mysql
- 查看一下,安装名称是否正确,
[root@localhost ~]# yum search php-mysqlLoaded plugins: fastestmirror, langpacksLoading mirror speeds from cached hostfile * base: mirrors.163.com * extras: mirrors.163.com * updates: mirrors.ustc.edu.cn================ N/S matched: php-mysql ===================php-mysqlnd.x86_64 : A module for PHP applications that use MySQL databases
- 是名字错误,yum install php-mysqlnd,完美解决。
2.3 如果 /etc/httpd/conf/httpd.conf 中 Listen设置为Listen localhost:80,就只能通过127.0.0.1才能访问 ,设置为Listen 0.0.0.0:80或者Listen 80即可。