RHEL7搭建Discuz论坛

RHEL7中配置

  • 关闭防火墙和selinux
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# setenforce 0
  • 安装php
[root@localhost ~]# yum install php* -y
  • 安装httpd服务
[root@localhost ~]# yum install httpd -y
  • 安装数据库
[root@localhost ~]# yum install mariadb -y   

这一步可以省略 系统默认有mysql
[root@localhost ~]# rpm -qa | grep mariadb
mariadb-libs-5.5.44-2.el7.x86_64
mariadb-server-5.5.44-2.el7.x86_64
mariadb-5.5.44-2.el7.x86_64
  • 启动数据库
[root@localhost ~]# systemctl start mariadb
  • 初始化数据库
[root@localhost ~]# mysql_secure_installation 
/usr/bin/mysql_secure_installation:行379: find_mysql_client: 未找到命令

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): (这里回车,设置root密码)
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!
  • 登陆数据库
[root@localhost ~]# mysql -uroot -predhat
  • 创建数据库
    注意命令分号结尾
MariaDB [(none)]> create database luntan;
Query OK, 1 row affected (0.00 sec)
database' at line 1
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| luntan             |
| mysql              |
| performance_schema |
+--------------------+
4 rows in set (0.00 sec)
MariaDB [(none)]> exit
Bye
  • 重启两个服务
[root@localhost ~]# systemctl restart mariadb
[root@localhost ~]# systemctl restart httpd
  • 复制并解压论坛源码
[root@localhost test]# cp /test/Discuz_X3.2_SC_UTF8.zip /var/www/html/
[root@localhost test]# cd /var/www/html/
[root@localhost test]# unzip Discuz_X3.2_SC_UTF8.zip 
[root@localhost html]# ll
总用量 12204
-rw-r--r--.  1 root root 12486773 12月  2 20:35 Discuz_X3.2_SC_UTF8.zip
drwxr-xr-x.  2 root root     4096 5月  31 2016 readme
drwxr-xr-x. 12 root root     4096 5月  31 2016 upload
drwxr-xr-x.  4 root root       68 5月  31 2016 utility
  • 配置论坛数据目录
[root@localhost html]# cd upload/
[root@localhost upload]# ll
总用量 92
-rw-r--r--.  1 root root 2739 5月  31 2016 admin.php
drwxr-xr-x. 11 root root 4096 5月  31 2016 api
-rw-r--r--.  1 root root  727 5月  31 2016 api.php
drwxr-xr-x.  2 root root   22 5月  31 2016 archiver
drwxr-xr-x.  2 root root   87 5月  31 2016 config
-rw-r--r--.  1 root root  922 5月  31 2016 connect.php
-rw-r--r--.  1 root root  253 5月  31 2016 cp.php
-rw-r--r--.  1 root root  106 5月  31 2016 crossdomain.xml
drwxr-xr-x. 13 root root 4096 5月  31 2016 data
-rw-r--r--.  1 root root 5558 5月  31 2016 favicon.ico
-rw-r--r--.  1 root root 2242 5月  31 2016 forum.php
-rw-r--r--.  1 root root  821 5月  31 2016 group.php
-rw-r--r--.  1 root root 1290 5月  31 2016 home.php
-rw-r--r--.  1 root root 5669 5月  31 2016 index.php
drwxr-xr-x.  5 root root   60 5月  31 2016 install
-rw-r--r--.  1 root root 1025 5月  31 2016 member.php
-rw-r--r--.  1 root root 2462 5月  31 2016 misc.php
-rw-r--r--.  1 root root 1757 5月  31 2016 plugin.php
-rw-r--r--.  1 root root  988 5月  31 2016 portal.php
-rw-r--r--.  1 root root  582 5月  31 2016 robots.txt
-rw-r--r--.  1 root root 1161 5月  31 2016 search.php
drwxr-xr-x. 10 root root 4096 5月  31 2016 source
drwxr-xr-x.  6 root root   67 5月  31 2016 static
drwxr-xr-x.  3 root root   36 5月  31 2016 template
drwxr-xr-x.  6 root root   86 5月  31 2016 uc_client
drwxr-xr-x. 13 root root 4096 5月  31 2016 uc_server
-rw-r--r--.  1 root root 1682 5月  31 2016 userapp.php
[root@localhost upload]# chmod 777 config/ data/ uc_* -R

通过页面进行访问并安装

在这里插入图片描述

  • 下一步
    在这里插入图片描述

  • 选择全新安装,下一步
    在这里插入图片描述

  • 数据库名改为刚刚设置的luntan
    数据库密码为刚刚设置的数据库的密码
    管理员账号和密码可自行设置
    在这里插入图片描述

  • 安装成功
    在这里插入图片描述

  • 可正常使用论坛
    在这里插入图片描述

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
GPlay虚拟农场是一款以农场为背景的模拟经营类游戏,完全公开的后台配置,支持无数类种子,作物,道具,装扮,装备的自定义,熟悉的UI界面设计,最佳的游戏体验,丰富的官方素材库,持续更新,不断扩展功能设计。 1、兑换系统: 支持论坛积分直接消耗和兑换。 2、商城系统: 超级华丽的商城自定义配置,上架数量,时间,周期,购买限制,不同的消耗类型等。 3、种植系统: 良好的种植效果体验,轻松上手,爱不释手。 4、铲除系统: 不小心种错了?不要紧,还可以铲掉重来,无需等待,一切由你做主。 5、收获/偷窃系统: 等待作物成熟的期间还可以去别人家偷偷偷,丰富的装扮和装备还可以影响偷窃的效果。 6、装扮系统: 宠物,地貌,告示牌,农场小屋,后台完全自定义设计,影响偷窃和被偷窃效果。 7、任务系统: 主线任务引导玩家快速上手,日常任务调节气氛,活动任务迅速提高用户粘性。 8、道具系统: 作物生长慢?不怕,有各类道具等着你提升,还可以帮助论坛其他玩家一起快速成长。 9、签到系统: 每日签到领取豪华大礼包,快速增加用户每日来访量。 10、图鉴/成就系统: 记录图鉴,解锁成就,一步步引导用户疯狂在线,疯狂玩! 11、排行系统: 等级榜,金钱榜,爱心榜,天天排不停! 12、更多精彩: 我们仍在开发更多更丰富的玩法。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值