Linux+nginx+mysql To configure the Forum program discuz Basic Tutorial _php Example

Source: Internet
Author: User
Tags create database forum software

Crossday discuz! Board (referred to as discuz!) is Beijing Kang Sheng New Technology Co., Ltd. launched a set of common Community forum software system. Since June 2001, discuz! has more than 14 years of application history and more than 2 million site user cases, is the world's highest maturity, coverage of the largest forum software system. Current Latest Version discuz! The X3.2 official edition was released on June 9, 2015, introducing the development model of the Application Center for the first time. August 23, 2010, Kangsheng to reach a takeover agreement with Tencent, Tencent's wholly owned subsidiary.
Crossday discuz! Board (hereinafter referred to as discuz!, China National Copyright Administration Copyright Registration number 2006sr11895) is Kangsheng Chong want (Beijing) Technology Co., Ltd. (English abbreviation Comsenz) launched a set of common Community forum software system, users can not need any programming on the basis of With simple setup and installation, the Internet is built with perfect features, strong load capacity and highly customizable forum services. discuz! Infrastructure with the world's most popular web programming combination Php+mysql implementation, is a well designed, suitable for a variety of server environment efficient forum system solutions.
As the largest community software and service provider in China, Comsenz's discuz! The development team has rich experience in Web application design, especially in the Forum products and related fields, through long-term innovative development, mastered a set of algorithms, data structure to product security leading technology. Make discuz! Whether in the stability, load capacity, security and other aspects of domestic and foreign similar products leading position.
Let's take a look at the Discuz installation configuration process in the LNMP environment:
1. Configure 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 _refere
  R "" "$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 defaults to use client_header_buffer_size this buffer to read the header value, if the header is too large, it will use Large_client_header_ Buffers to read if you set a small HTTP header/cookie The General Assembly 400 error Nginx Bad request if more than buffer, you will report HTTP 414 error (URI Too Long)
  Nginx accept the longest HTTP header size must be larger than one of the buffer, or you will report a 400 HTTP error (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检测间隔时间, in milliseconds #rsie请求2次正常的话, the status of this realserver is up #fall表示请求5次都失败的情况下, marking the state of this realserver as down #timeout为超时时间, unit
  For milliseconds 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, download Discuz
Download the Discuz installation package and unzip all content in the upload directory to the Nginx specified Web site document and directory/www/discuz
Set permissions

Chown-r Nginx:nginx/www/discuz

3. Create data

Create DATABASE discuz default character set UTF8;
 Grant all privileges on discuz.* to discuz@ ' localhost ' identified by ' discuz ';
 Flush privileges;

4. Installation Discuz
enter Http://ip/install in the browser install according to the wizard

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.