Discuz论坛的搭建

Discuz论坛的搭建

(1)连接光驱,将光驱挂载到/mnt目录下

[root@localhost ~]# mount  /dev/sr0 /mnt

(2)配置本地源

[root@localhost ~]# cd /etc/yum.repos.d/      //切换到YUM源配置的目录
[root@localhost yum.repos.d]# vim csa.repo  //编辑一个新文件 创建本地源配置
[base]
name = baseos
baserul = file:///mnt
gpgcheck = 0

(3)从本地源里面安装httpd服务器环境

[root@localhost yum.repos.d]# yum install httpd -y
已加载插件:langpacks, product-id, search-disabled-repos, subscription-
.......

(4)安装数据库

[root@localhost yum.repos.d]# yum install mariadb-server.x86_64 -y
已加载插件:langpacks, product-id, search-disabled-repos, subscription-
........

(5)开启httpd服务和数据库,并关闭防火墙

[root@localhost yum.repos.d]# systemctl start mariadb httpd
[root@localhost yum.repos.d]# systemctl stop firewalld

(6)输入虚拟机地址用浏览器访问 打开的是httpd自己的测试页面
在这里插入图片描述
(7)自己定义一个主页面

[root@localhost html]# vim index.html
<html>
        <head>
                <title>大家好 欢迎来到计科19</title>
        </head>
        <body>
                <h1>计科的班级</h1>
                <ul>
                        <li>计科17</li>
                        <li>计科18</li>
                        <li>计科19</li>
                <ul>
        </body>
</html>   

在这里插入图片描述
(8)安装php环境

[root@localhost html]# yum install php* -y
已加载插件:langpacks, product-id, search-disabled-repos, subscription-
          : manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
正在解决依赖关系

(9)配置数据库

[root@localhost html]# mysql_secure_installation
/usr/bin/mysql_secure_installation:行379: find_mysql_client: 未找到命令
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR 
.......

(10)进数据库来看看

[root@localhost html]# mysql -u root -p
Enter password: 
.......
MariaDB [(none)]> exit

(11)装论坛软件包

[root@localhost html]# cd /var/www/html/     //先去httpd网页资源目录 
[root@localhost html]# rz                    //通过rz或XFTP上传Discuz包
[root@localhost html]# rm -rf index.html       //删除刚才我们自己创建的一个静态页面 
[root@localhost html]# unzip Discuz_X2.5_SC_UTF8.zip   //解压Discuz包 并删除 
[root@localhost html]# rm -rf Discuz_X2.5_SC_UTF8.zip   //删除
[root@localhost html]# cd upload/                 //进入到Discuz的主目录 

(12)将相关的目录该权限 为了给论坛用户增加写的权限

[root@localhost upload]# chmod o+w config/ data/ uc_client/ uc_server/ -R

(13)打开Selinx的安全

[root@localhost upload]# getenforce
Enforcing
[root@localhost upload]# setenforce 0
[root@localhost upload]# getenforce
Permissive

(14)重启httpd

[root@localhost upload]# systemctl restart httpd

(15)浏览器访问192.168.87.128/upload/
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值