Linux系统配置及服务管理_第17章 网站服务(2)
动态站点
LAMP:linux系统-网站程序apache-数据库mysql-PHP中间件
1.部署论坛系统discuz
Logo:
开源论坛代码服务社区
一、基础环境
[[email protected] ~]# sed -ri '/^SELINUX=/cSELINUX=disabled' /etc/selinux/config 永久关闭selinux
[[email protected] ~]# setenforce 0 临时关闭selinux
[[email protected] ~]# systemctl stop firewalld.service 停止防火墙
[[email protected] ~]# systemctl disable firewalld.service 开机禁用防火墙
二、安装LAMP
[[email protected] ~]# yum -y install httpd mariadb-server mariadb php php-mysql gd php-gd 安装网站-数据库服务器-数据库客户端-中间件-中间件插件-图形库-php图形库
[ro[email protected] ~]# systemctl start httpd mariadb 启动网站和数据库
[[email protected] ~]# systemctl enable httpd mariadb 开机启动网站和数据库
三、安装Discuz!
1. 导入discuz网站源码
wget http://download.comsenz.com/DiscuzX/2.5/Discuz_X2.5_SC_UTF8.zip
[[email protected] ~]# mkdir -p /webroot/discuz
[[email protected] ~]# yum install -y unzip
[[email protected] ~]#unzip Discuz_X2.5_SC_UTF8.zip
[[email protected] ~]#cp -rf upload/* /webroot/discuz/
[[email protected] ~]#chown -R apache.apache /webroot/discuz/
2. Apache 配置虚拟主机
[[email protected] ~]# vim /etc/httpd/conf.d/discuz.conf
[[email protected] ~]# systemctl restart httpd //重启服务
3. 准备数据库
客户端测试时,添加域名解析
[[email protected] ~]# vim /etc/hosts
10.8.162.127 www.discuz.com
4. 安装discuz [任何client]
四、客户端测试
www.discuz.com