搭建Discuz服务器

系统信息:
# cat /etc/redhat-release
CentOS release 6.4 (Final)

Discuz官网:
http://www.discuz.net/forum.php

1.安装所需软件
yum install httpd mysql php.x86_64 php-cli.x86_64 php-common.x86_64 php-gd.x86_64 php-pear.noarch php-mysql.x86_64

service mysqld start
mysql_secure_installation

2.创建论坛数据库
mysql -u root -p

create database bbs;
grant all privileges on bbs.* to 'bbs'@'localhost' identified by 'bbs';
flush privileges;

mysql -u bbs -p
SHOW DATABASES;

3.开机自启动
chkconfig httpd on
chkconfig mysqld on

4.解压
yum list | grep unzip
yum install unzip.x86_64

cp /softs/Discuz_X3.0_SC_UTF8.zip /var/www/html/
cd /var/www/html/

unzip Discuz_X3.0_SC_UTF8.zip
chown -R apache:apache /var/www/*

5.设置域名
vim /etc/httpd/conf/httpd.conf
--------------------------------------
DirectoryIndex index.html index.html.var index.php
--------------------------------------
vim /etc/httpd/conf.d/virtual.conf
--------------------------------------

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "/var/www/html/upload"
    ServerName  bbs.ncg.com
    ErrorLog "logs/bbs-error_log"
    CustomLog "logs/bbs-access_log" common
</VirtualHost>

--------------------------------------

6.添加主机名
vim /etc/hosts
--------------------------------------

192.168.16.201   bbs.ncg.com

--------------------------------------

7.重启并访问
/etc/init.d/httpd restart
http://bbs.ncg.com

8.在浏览器中安装配置

你可能感兴趣的:(服务器,discuz)