下載discuzmysql
在瀏覽期中 download.comsenz.com/DiscuzX/3.2web
複製Discuz X3.2 SC GBK.的連接sql
建立跟目錄數據庫
mkdir /data/123apache
cd /data/123vim
wget 粘貼連接windows
解壓Discuzide
unzip Discuz_X3.2_SC_GBK.zipspa
mv upload/* ./server
刪去多餘的目錄
rm -rf reade/ utility/ upload/ Discuz_X3.2_SC_GBK.zip
配置虛擬主機,
打開Apache主配置文件
vim /usr/local/apache2/conf/httpd.conf
找到
# Virtual hosts
#Include conf/extra/httpd-vhosts.conf
刪去# 打開虛擬主機配置
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
打開虛擬主機配置文件
vim /usr/local/apache2/conf/extra/httpd-vhosts.conf
將
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "/usr/local/apache2/docs/dummy-host.example.com"
ServerName dummy-host.example.com
ServerAlias www.dummy-host.example.com
ErrorLog "logs/dummy-host.example.com-error_log"
CustomLog "logs/dummy-host.example.com-access_log" common
</VirtualHost>
改成
<VirtualHost *:80>
DocumentRoot "/data/123"
ServerName123.com
ServerAlias 456.com
# ErrorLog "logs/dummy-host.example.com-error_log"
# CustomLog "logs/dummy-host.example.com-access_log" common
</VirtualHost>
檢查配置文件有沒有錯誤
/usr/local/apache2/bin/apachectl -t
配置hosts
在真機中搜c:\windows\system32\drivers\etc
在hosts 的文件中加上
192.168.23.135 123.com
192.168.23.135 456.com
啓動80端口
/usr/local/apache2/bin/apachectl start
查Apache是那個用戶執行的
ps aux |grep http
root 19714 0.0 0.9 29164 9876 ? Ss 02:18 0:00 /usr/local/apache2/bin/httpd -k start
daemon 19715 0.0 0.9 29164 9332 ? S 02:18 0:00 /usr/local/apache2/bin/httpd -k start
daemon 19716 0.0 0.9 29468 9444 ? S 02:18 0:00 /usr/local/apache2/bin/httpd -k start
daemon 19717 0.0 0.8 29164 8852 ? S 02:18 0:00 /usr/local/apache2/bin/httpd -k start
daemon 19718 0.0 0.8 29164 8852 ? S 02:18 0:00 /usr/local/apache2/bin/httpd -k start
daemon 19719 0.0 0.8 29164 8852 ? S 02:18 0:00 /usr/local/apache2/bin/httpd -k start
是daemon用戶並將權限改成
chown -R daemon config data uc_client/data uc_server/data
配置mysql
/usr/local/mysql/bin/mysql
建立數據庫
mysql> create database discuz;
建立人
mysql> grant all on discuz.* to 'aming'@'localhost' identified by '123456';
用戶aming 密碼123456