DedeCMSphp
db01:html
###################mysql
####MySQL的配置####nginx
###################web
##登陸MySQL數據庫sql
mysql -uroot -poldboy123數據庫
##建立數據庫app
create database discuz;ide
##顯示數據庫測試
show databases;
##受權
grant all on discuz.* to discuz@'172.16.1.%' identified by '123456';
#grant all on discuz.* to discuz@'localhost' identified by '123456';
##刷新生效
flush privileges;
##查看全部用戶
select user,host from mysql.user;
quit;
##測試的discuz用戶是否能夠登陸
#mysql -udiscuz -p123456
mysql -udiscuz
quit;
web02:
# Adjust bbs configuration
cat >/application/nginx/conf/extra/bbs.conf<<EOF
server {
listen 80;
server_name bbs.etiantian.org etiantian.org;
location / {
root html/bbs;
index index.php index.html index.htm;
}
location ~ .*\.(php|php5)?$ {
root html/bbs;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
}
EOF
#Check restart
/application/nginx/sbin/nginx -t
/application/nginx/sbin/nginx -s reload
# Download bbs installation
cd /home/oldboy/tools && \
wget http://download.comsenz.com/DiscuzX/2.5/Discuz_X2.5_SC_GBK.zip && \
unzip Discuz_X3.3_SC_UTF8.zip
cp -a upload/* /application/nginx/html/bbs/
chown -R www.www /application/nginx/html/bbs/