標籤:discuz! 安裝
下載 discuz!
[[email protected] ~]# mkdir /data/www[[email protected] ~]# cd /data/www[[email protected] www]# wget http://download.comsenz.com/DiscuzX/3.2/Discuz_X3.2_SC_GBK.zip[[email protected] www]# lsDiscuz_X3.2_SC_GBK.zip[[email protected] www]# unzip Discuz_X3.2_SC_GBK.zip[[email protected] www]# mv upload/* .
配置第一個虛擬機器主機
刪除 httpd.conf 中的“#Include conf/extra/httpd-vhosts.conf”這行前面的#號
[[email protected] conf]# pwd/usr/local/apache2/conf[[email protected] conf]# lsextra httpd.conf httpd.conf.bak magic mime.types original[[email protected] conf]# vim httpd.conf# Virtual hostsInclude conf/extra/httpd-vhosts.conf
然後編輯該設定檔
[[email protected] conf]# vim /usr/local/apache2/conf/extra/httpd-vhosts.conf
在最後面,加入如下配置:
<VirtualHost *:80> DocumentRoot "/data/www" ServerName www.123.com</VirtualHost>
重啟 apache 服務
[[email protected] conf]# /usr/local/apache2/bin/apachectl -tSyntax OK[[email protected] conf]# /usr/local/apache2/bin/apachectl restart
配置 mysql ,給 Discuz! 增加一個賬戶
給 mysql root 賬戶設定密碼,然後命令列進入 mysql ,建立新的庫,並建立一個新的帳號對該庫有所有的許可權:
[[email protected] ~]# /usr/local/mysql/bin/mysql -urootWelcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 1Server version: 5.6.31 MySQL Community Server (GPL)Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.mysql> create database discuz;Query OK, 1 row affected (0.06 sec)mysql> grant all on discuz.* to ‘test‘@‘localhost‘ identified by ‘test123‘;Query OK, 0 rows affected (0.05 sec)mysql> quitBye
這樣就建立了一個庫discuz,又建立了一個使用者 test ,密碼是 test123 。
安裝 Discuz!
”www.123.com” 這個網域名稱是隨便定義的,所以不能直接存取,需要綁定hosts,hosts在windows和linux上都是存在的,可以把一個網域名稱指向到一個 ip 上。windows 下的hosts檔案路徑是在:C:\windows\system32\drivers\etc\hosts,用記事本開啟它,然後增加一行,儲存:
192.168.56.128 www.123.com
這裡的 192.168.56.128 是我虛擬機器的 ip 。
在瀏覽器輸入:
http://www.123.com/install/
根據提示,修改對應目錄的許可權。
[[email protected] ~]# cd /data/www[[email protected] www]# chown -R daemon:daemon data uc_server/data uc_client/data config
讓這幾個目錄支援apache運行帳號可寫,daemon 就是 apache 的運行帳號,在 /usr/local/apache2/conf/httpd.conf 中用 User 和 Group 定義的。
650) this.width=650;" src="http://s4.51cto.com/wyfs02/M01/83/B1/wKioL1d7As3j9BGzAACH_038yTY101.png" style="float:none;" title="2.PNG" alt="wKioL1d7As3j9BGzAACH_038yTY101.png" />
650) this.width=650;" src="http://s4.51cto.com/wyfs02/M01/83/B2/wKiom1d7As6xykElAAC100KGYKs146.png" style="float:none;" title="3.PNG" alt="wKiom1d7As6xykElAAC100KGYKs146.png" />
資料庫名就是上面在mysql建立的資料庫。資料庫使用者名稱和密碼就是上面mysql中建立的使用者和密碼。管理員密碼是discuz內部的。點下一步後,就會看到安裝資料庫的過程,稍後就彈出“Discuz 應用中心”的介面,不過不需要安裝任何應用,直接點右下角“點此訪問”,成功安裝discuz論壇。
本文出自 “散宜生的學習筆記” 部落格,請務必保留此出處http://sanyisheng.blog.51cto.com/11154168/1795798
安裝 Discuz!