Crossday Discuz! Board(簡稱 Discuz!)是北京康盛新創科技有限責任公司推出的一套通用的社區論壇軟件系統。自2001年6月面世以來,Discuz!已擁有14年以上的應用歷史和200多萬網站用戶案例,是全球成熟度最高、覆蓋率最大的論壇軟件系統之一。目前最新版本Discuz! X3.2正式版於2015年6月9日發布,首次引入應用中心的開發模式。2010年8月23日,康盛創想與騰訊達成收購協議,成為騰訊的全資子公司。
Crossday Discuz! Board(以下簡稱 Discuz!,中國國家版權局著作權登記號 2006SR11895)是康盛創想(北京)科技有限公司(英文簡稱Comsenz)推出的一套通用的社區論壇軟件系統,用戶可以在不需要任何編程的基礎上,通過簡單的設置和安裝,在互聯網上搭建起具備完善功能、很強負載能力和可高度定制的論壇服務。Discuz! 的基礎架構采用世界上最流行的web編程組合PHP+MySQL實現,是一個經過完善設計,適用於各種服務器環境的高效論壇系統解決方案。
作為國內最大的社區軟件及服務提供商,Comsenz旗下的 Discuz! 開發組具有豐富的 web應用程序設計經驗,尤其在論壇產品及相關領域,經過長期創新性開發,掌握了一整套從算法,數據結構到產品安全性方面的領先技術。使得 Discuz! 無論在穩定性、負載能力、安全保障等方面都居於國內外同類產品領先地位。
下面我們就來看一下LNMP環境下的Discuz安裝配置過程:
1、配置nginx
vim /usr/local/nginx/etc/nginx.conf
user nginx;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
error_log logs/error.log info;
events {
worker_connections 1024;
}
http {
include mime.types;
server_tokens off;
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"';
access_log logs/access.log main;
sendfile on;
keepalive_timeout 65;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
#客戶請求頭緩沖大小 nginx默認會用client_header_buffer_size這個buffer來讀取header值,如果header過大,它會使用large_client_header_buffers來讀取如果設置過小HTTP頭/Cookie過大 會報400 錯誤 nginx 400 bad request求行如果超過buffer,就會報HTTP 414錯誤(URI Too Long)nginx接受最長的HTTP頭部大小必須比其中一個buffer大,否則就會報400的HTTP錯誤(Bad Request)。
client_max_body_size 8m; #最大上傳附件8MB
client_body_buffer_size 128k; #緩沖區代理緩沖用戶端請求的最大字節數
keepalive_timeout 60;
tcp_nopush on;
tcp_nodelay on;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 2;
include vh/bbs.yourich.com.cn.conf;
}
mkdir /usr/local/nginx/etc/vh
vim /usr/local/nginx/etc/vh/discuz.conf
upstream bbs.test.com
{
server 127.0.0.1;
check interval=3000 rise=2 fall=5 timeout=1000 type=http;
#interval檢測間隔時間,單位為毫秒
#rsie請求2次正常的話,標記此realserver的狀態為up
#fall表示請求5次都失敗的情況下,標記此realserver的狀態為down
#timeout為超時時間,單位為毫秒
check_http_send "GET / HTTP/1.1\r\nHOST:\r\n\r\n";
check_http_expect_alive http_2xx http_3xx http_4xx;
}
server {
listen 80;
server_name bbs.test.com;
index index.html index.php;
root /www/discuz;
access_log logs/bbs_access.log main;
error_log logs/bbs_error.log;
location ~ .*\.(jpg|jpeg|png|gif\js|css)$ {
root /www/discuz;
access_log off;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~.*\.(php)?$ {
expires -1s;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
try_files $uri = 404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /www/discuz$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
}
}
2、下載discuz
下載discuz安裝包並解壓將upload目錄下的所有內容復制到nginx指定的網站文檔跟目錄下 /www/discuz
設置權限
chown -R nginx:nginx /www/discuz
3、創建數據
create database discuz default character set utf8; grant all privileges on discuz.* to discuz@'localhost' identified by 'discuz'; flush privileges;
4、安裝discuz
在浏覽器中輸入http://ip/install 根據向導進行安裝