discuz论坛初体验:
discuz社区:http://www.discuz.net/
下载与帮助:http://www.comsenz.com/downloads/install/discuzx
一.安装LNMP平台(这里省略):
有两点要注意:
1. 为bbs创建一个可用的数据库,在初始化的时候需要用上。
2. 配置好nginx,nginx的配置参考如下:
[root@www ~]# cat /usr/local/app/nginx/conf/nginx.conf
user nobody;
worker_processes 10;
error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
use epoll;
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
sendfile on;
tcp_nopush on;
tcp_nodelay off;
gzip on;
gzip_comp_level 1;
gzip_proxied any;
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript image/jpeg image/gif image/png
keepalive_timeout 30;
#for sites enabled
include /usr/local/app/nginx/conf/sites-enabled/*;
}
[root@www ~]# cat /usr/local/app/nginx/conf/sites-enabled/bbs.conf
server {
listen 80;
server_name bbs.linuxblind.com;
gzip on;
gzip_min_length 1000;
gzip_buffers 4 8k;
gzip_types text/plain application/x-javascript text/css application/xml;
root /usr/local/bbs/;
index index.php index.html;
access_log off;
error_page 404 /index.php;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ \.php$ {
root /usr/local/bbs/;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi_params;
}
}
二、安装discuz
wget http://download.comsenz.com/DiscuzX/3.0/Discuz_X3.0_SC_UTF8.zip
unzip Discuz_X3.0_SC_UTF8.zip
#生成如下三个目录:
upload 这个目录下面的所有文件是可用程序文件;
readme 目录为产品介绍、授权、安装、升级、转换以及版本更新日志说明;
utility 目录为论坛附带工具,包括升级程序。
mv upload /usr/local/bbs
mv readme /usr/local/bbs/
mv utility /usr/local/bbs/
chown -R nobody:nobody /usr/local/bbs
chmod 777 /usr/local/bbs/*
#启动mysql,nginx,php
/usr/local/app/nginx/sbin/nginx
/usr/local/app/php/sbin/php-fpm
/usr/local/mysql/bin/mysqld --defaults-file=/usr/local/mysql/my.cnf &
#初始化diacuz
在浏览器中输入: http://bbs.linuxblind.com/install/,根据提示修改相应配置即可。
三、使用测试
在浏览器中输入:http://bbs.linuxblind.com/