實戰!基於lamp安裝Discuz論壇-技術流ken
阿新 • • 發佈:2018-10-01
utility version 之前 local acl avi 詳細介紹 pan 下一步
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.瀏覽器訪問
點擊我同意
點擊下一步
點擊下一步
填寫數據庫信息以及管理員密碼,然後點擊下一步
點擊您的論壇已完成安裝,點此訪問
安裝完成!
實戰!基於lamp安裝Discuz論壇-技術流ken