一、安装LAMP环境:
# yum -y install httpd MysqL-server PHP-MysqL PHP
程序包名称及版本:
httpd:2.2.15
MysqL-server:5.1.73
PHP-MysqL(PHP连接MysqL时需要用到的驱动):5.3.3
PHP:5.3.3
httpd配置文件:
Ø 主配置文件:/etc/httpd/conf/httpd.conf
辅助配置文件:/etc/httpd/conf.d/*.conf
httpd与组合时需要用到的配置文件:/etc/httpd/conf.d/PHP.conf
组合时需要用到的模块文件:/usr/lib64/httpd/modules/libPHP5.so
二、测试LAMP环境:
# service httpd start
# ss -tnl | grep :80
# service MysqLd start
# ss -tnl | grep :3306
# MysqL_secure_installation
# MysqL -uroot -p
# vim /var/www/html/index.PHP
<?PHP
$conn = MysqL_connect("127.0.0.1","root","123456");
if ($conn)
echo "Success";
else
echo "Failure";
MysqL_close();
PHPinfo();
?>
浏览器中输入192.168.1.193:
# service MysqLd stop
说明通信正常
三、安装配置Discuz:
Discuz是腾讯旗下Comsenz公司推出的以社区为基础的专业建站平台,帮助网站实现一站式服务,让论坛(BBS)、个人空间(SNS)、门户(Portal)、群组(Group)、应用开放平台(Open Platform)充分融合于一体,帮助网站实现一站式服务。下载地址http://www.discuz.net/forum-10-1.html,此处以Discuz_X3.4_SC_UTF8.zip为例。
# yum -y install unzip
# unzip -q Discuz_X3.4_SC_UTF8.zip
# cp -r upload/ /var/www/html
# cd /var/www/html/upload
# chmod -R 777 config/ data/ uc_client/ uc_server/
# vim config/config_global_default.PHP
# vim config/config_ucenter_default.PHP
# MysqL -uroot -p
MysqL> create database discuzdb;
MysqL> grant all on discuzdb.* to 'discuzuser'@'%' identified by "123456";
MysqL> create database ucenterdb;
MysqL> grant all on ucenterdb.* to 'discuzuser'@'%' identified by "123456";
MysqL> flush privileges;
MysqL> exit
discuzuser -p
MysqL> show databases;
192.168.1.193/upload/install/
点击“我同意”:
检查安装环境,全部通过后,点击“下一步”:
选择“全新安装Discuz! X(含UCenter Server)”,点击“下一步”:
点击“您的论坛已完成安装,点此访问”:
右上角可以使用admin账号登录:
# rm -rf install/index.PHP
论坛登录地址http://192.168.1.193/upload/
原文链接:https://www.f2er.com/centos/375196.html