LAMP+Discuz搭建论坛

安装 PHP
yum –y install php*
配置 php
vi /etc/php.ini
修改
date.timezone = PRC
新增禁用的函数,需要使用时再放开
disable_functions = passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini _alter,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_s erver,escapeshellcmd,dll,popen,disk_free_space,checkdnsrr,checkdnsrr,getservbyname,gets ervbyport,disk_total_space,posix_ctermid,posix_get_last_error,posix_getcwd,posix_getegid, posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin, posix_getpgid,posix_getpgrp,posix_getpid,posix_getppid,posix_getpwnam,posix_getpwuid, posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid, posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_strerror,posix_tim es,posix_ttyname,posix_uname
支持php短标签
short_open_tag = On
设置表示允许访问当前目录(即PHP脚本文件所在之目录)和/tmp/目录,可以防止php木马跨站,如果改了之后安装程序有问题,可以注销此行,或者直接写上程序的目录
open_basedir = .:/tmp/
重启服务
systemctl restart mysql.service
systemctl restart httpd.service
systemctl restart php-fpm
进行php页面测试
在客户端浏览器输入服务器IP地址,可以看到相关的配置信息
cd /var/www/html
vi index.php

<?php phpinfo(); ?>

安装 discuz
yum -y install wget
wget http://download.comsenz.com/DiscuzX/3.2/Discuz_X3.2_SC_UTF8.zip 
yum -y install unzip
unzip Discuz_X3.2_SC_UTF8.zip
将 upload 目录转移到web请求目录下
cp -R ./upload /var/www/html
进去upload给予几个目录权限访问
chown apache:apache -R /var/www/html/upload
cd /var/www/html/upload
chmod -R 777 data
chmod -R 777 uc_client
chmod -R 777 uc_server
打开浏览器开始安装论坛
http://192.168.1.160/upload/forum.php

http://www.discuz.net/forum.php

猜你喜欢

转载自blog.csdn.net/qq_41906344/article/details/82933089