Discuz:开源论坛代码服务社区。
一基础环境: [root@192 ~]# systemctl stop firewalld(临时关闭防火墙)
[root@192 ~]# setenforce 0(临时关闭SELINUX,注意这是零,1是开启)
二安装LAMP:[root@192 ~]# yum -y install httpd mariadb-server mariadb php php-mysql gd php-gd(注意这里的mariadb是mysql的替代,内存小一点)
[root@192 ~]# systemctl start httpd mariadb(开启网站和数据库服务)
三安装discuz:1.导入discuz网站代码wget http://download.comsenz.com/DiscuzX/2.5/Discuz_X2.5_SC_UTF8.zip
[root@apache ~]# mkdir -p /webroot/discuz
[root@apache ~]# yum install -y unzip(下载zip)
[root@apache ~]#unzip Discuz_X2.5_SC_UTF8.zip
[root@apache ~]#cp -rf upload/* /webroot/discuz/
[root@apache ~]#chown -R apache.apache /webroot/discuz/ (授权)
2. Apache 配置虚拟主机
[root@apache ~]# vim /etc/httpd/conf.d/discuz.conf
<VirtualHost *:80>
ServerName www.discuz.com
DocumentRoot /webroot/discuz
</VirtualHost>
<Directory "/webroot/discuz">
Require all granted
</Directory>
[root@apache ~]# systemctl restart httpd
3. 准备数据库
[root@localhost discuz]# mysql
MariaDB [(none)]> create database discuz ;
(切记创建数据库要再敲一遍,可以检查是否创建成功)
4. 安装discuz [任何client]
客户端测试时,添加域名解析
[root@localhost ~]# vim /etc/hosts
服务器ip www.discuz.com