DedeCMS

db01:

###################

####MySQL的配置####

###################


##登录MySQL数据库

mysql -uroot -poldboy123


##创建数据库

create database discuz;


##显示数据库

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<

    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/