部署论坛系统discuz
时间:2023-06-30 18:36:01 | 来源:网站运营
时间:2023-06-30 18:36:01 来源:网站运营
部署论坛系统discuz:首先准备环境,关闭防火墙和selinux
[root@apache ~]# sed -ri '/^SELINUX=/cSELINUX=disabled' /etc/selinux/config
[root@apache ~]# setenforce 0
[root@apache ~]# systemctl stop firewalld.service
[root@apache ~]# systemctl disable firewalld.service
2.安装LAMP [root@apache ~]# yum -y install httpd mariadb-server mariadb php php-mysql gd php-gd
[root@apache ~]# systemctl start httpd mariadb
[root@apache ~]# systemctl enable httpd mariadb
下载安装包并解压,导入网站源码
wget
http://download.comsenz.com/DiscuzX/2.5/Discuz_X2.5_SC_UTF8.zip[root@apache ~]# mkdir -p /webroot/discuz
[root@apache ~]#unzip Discuz_X2.5_SC_UTF8.zip
[root@apache ~]#cp -rf upload/* /webroot/discuz/
[root@apache ~]#chown -R apache.apache /webroot/discuz/
apache配置虚拟主机
[root@apache ~]# vim /etc/httpd/conf.d/discuz.conf
<VirtualHost *:80>
ServerName
http://www.discuz.com DocumentRoot /webroot/discuz
</VirtualHost>
<Directory "/webroot/discuz">
Require all granted
</Directory>
配置文件很重要千万不能打错
准备数据库
[root@localhost discuz]# mysql
MariaDB [(none)]> create database 数据库 discuz ;
还得进行域名解析# vim /etc/hosts
10.0.128.118
http://www.a.org10.0.128.118
http://www.b.org10.0.128.118 www.discuz.com
最后客户端测试可用性
字符界面要安装elinks后访问
yum install -y elinks
elink http:// www.discuz.com
图形界面直接通过火狐浏览器访问
通过火狐浏览器,访问网站地址.http:// www.discuz.com