1.简介
我前面的博客已经详细介绍了lamp采用yum安装以及编译安装的方式,这篇博客将基于yum安装的lamp架构来实战安装Discuz论坛,你可以任选其一来完成。
2.系统环境
centos7.5
服务器IP:172.20.10.7/28
客户端IP:172.20.10.4/28
3.关闭安全服务
[root@ken ~]# setenforce 0
4.安装lamp
[root@ken ~]# yum install httpd php php-mysql mariadb-server lrzsz unzip -y
5.测试
略。请参看我之前博文的详细测试步骤《yum一键安装企业级lamp服务环境-技术流ken》
6.创建数据库及用户
[root@ken ~]# systemctl start mariadb #启动数据库 [root@ken ~]# mysql Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 2 Server version: 5.5.56-MariaDB MariaDB Server Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> create database ken; #创建数据库ken Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> grant all on ken.* to ken@"localhost" identified by "123"; #创建用户ken Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> flush privileges; #刷新授权表 Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> Bye
7.准备Discuz安装包
[root@ken ~]# cd /var/www/html [root@ken html]# rz [root@ken html]# unzip Discuz_X3.3_SC_GBK.zip [root@ken html]# ls Discuz_X3.3_SC_GBK.zip readme upload utility
[root@ken html]# cd upload/
[root@ken upload]# ls
admin.php archiver cp.php favicon.ico home.php member.php portal.php source uc_client
api config crossdomain.xml forum.php index.php misc.php robots.txt static uc_server api.php connect.php data group.php install plugin.php search.php template userapp.php
[root@ken upload]# chmod 757 -R data/ uc_server/ config/ uc_client/
8.启动httpd,防火墙放行客户端访问
[root@ken upload]# systemctl restart httpd [root@ken upload]# iptables -A INPUT -p tcp -s 172.20.10.4 --dport 80 -d 172.20.10.7 -j ACCEPT
9.浏览器访问
点击我同意
点击下一步
点击下一步
填写数据库信息以及管理员密码,然后点击下一步
点击您的论坛已完成安装,点此访问
安装完成!