LNMP set up, install Disuz operation record
[Email protected] ~]# Mkdir/data/dis
[email protected] dis]# wget Http://download.comsenz.com/DiscuzX/3.2/Discuz_X3.2_SC_GBK.zip
[Email protected] ~]# vim/usr/local/nginx/conf/nginx.conf #清空nginx. conf, write the following:
User nobody nobody;
Worker_processes 2;
Error_log/usr/local/nginx/logs/nginx_error.log Crit;
Pid/usr/local/nginx/logs/nginx.pid;
Worker_rlimit_nofile 51200;
Events
{
Use Epoll;
Worker_connections 6000;
}
http
{
Include Mime.types;
Default_type Application/octet-stream;
Server_names_hash_bucket_size 3526;
Server_names_hash_max_size 4096;
Log_format combined_realip ' $remote _addr $http _x_forwarded_for [$time _local] '
' $host ' $request _uri "$status"
' "$http _referer" "$http _user_agent";
Sendfile on;
Tcp_nopush on;
Keepalive_timeout 30;
Client_header_timeout 3m;
Client_body_timeout 3m;
Send_timeout 3m;
Connection_pool_size 256;
Client_header_buffer_size 1k;
Large_client_header_buffers 8 4k;
Request_pool_size 4k;
Output_buffers 4 32k;
Postpone_output 1460;
Client_max_body_size 10m;
Client_body_buffer_size 256k;
Client_body_temp_path/usr/local/nginx/client_body_temp;
Proxy_temp_path/usr/local/nginx/proxy_temp;
Fastcgi_temp_path/usr/local/nginx/fastcgi_temp;
Fastcgi_intercept_errors on;
Tcp_nodelay on;
gzip on;
Gzip_min_length 1k;
Gzip_buffers 4 8k;
Gzip_comp_level 5;
Gzip_http_version 1.1;
Gzip_types text/plain application/x-javascript text/css text/htm application/xml;
Server
{
Listen 80;
server_name localhost;
Index index.html index.htm index.php;
root/usr/local/nginx/html;
Location ~ \.php$ {
Include Fastcgi_params;
Fastcgi_pass 127.0.0.1:9000;
Fastcgi_index index.php;
Fastcgi_param Script_filename/usr/local/nginx/html$fastcgi_script_name;
}
}
}
--------------------------------Split Line----------------------------------------
Install the discuz into the/usr/local/nginx/html directory
650) this.width=650; "Src=" http://s2.51cto.com/wyfs02/M00/8A/59/wKiom1gtxDvxKGrYAAFoYj_f1_0302.jpg " Title= "Ng7.jpg" alt= "wkiom1gtxdvxkgryaafoyj_f1_0302.jpg"/>
[Email protected] ~]# vim/usr/local/nginx/conf/vhosts/linux.com
Server
{
Listen 80;
server_name www.linux.com;
Index index.html index.htm index.php;
Root/data/dis;
Location ~ \.php$ {
Include Fastcgi_params;
#fastcgi_pass Unix:/tmp/dis.sock;
Fastcgi_pass 127.0.0.1:9000;
Fastcgi_index index.php;
Fastcgi_param Script_filename/data/dis$fastcgi_script_name;
}
}
———————— Split Line---------------------------------------
Binding IP & URLs in C:\Windows\System32\drivers\etc
192.168.31.165 www.linux.com
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/8A/59/wKiom1gtxgCi3hlDAAI_EQWTIws260.jpg "title=" Ng8.jpg "alt=" Wkiom1gtxgci3hldaai_eqwtiws260.jpg "/>
650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M02/8A/55/wKioL1gtxoeTiu2CAAEMHc1AeU8227.jpg "style=" float: none; "title=" ng9.jpg "alt=" Wkiol1gtxoetiu2caaemhc1aeu8227.jpg "/>
650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M00/8A/59/wKiom1gtxojwBuDQAACzfGTJxXk725.jpg "style=" float: none; "title=" ng10.jpg "alt=" Wkiom1gtxojwbudqaaczfgtjxxk725.jpg "/>
Agreed after the installation we see how many are not writable, then we will give them php-fpm user rights.
---------------------------------------------
[Email protected] ~]# cd/usr/local/nginx/html/#进入到目录下
[Email protected] html]# chown-r php-fpm config data uc_client uc_server #赋权
Empowering the back-shaped view
Drwxr-xr-x 2 php-fpm root 4096 Nov 07:34 Config
Drwxr-xr-x php-fpm root 4096 Nov 07:34 data
Drwxr-xr-x 6 php-fpm root 4096 Nov 22:34 uc_client
Drwxr-xr-x php-fpm root 4096 Nov 22:34 uc_server
----------------------------------------------
New Refresh page, status all become writable. Then proceed to the next step.
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/8A/56/wKioL1gt0yOw_dZWAAC_AmFLU-o541.jpg "title=" Ng12.jpg "alt=" Wkiol1gt0yow_dzwaac_amflu-o541.jpg "/>
Choose a New Installation
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/8A/56/wKioL1gt0-rz5nkqAAD07Z3R7to092.jpg "title=" Ng13.jpg "alt=" Wkiol1gt0-rz5nkqaad07z3r7to092.jpg "/>
The next step is to set up MySQL, each time we use our own installed Myqls
You need to enter/usr/local/mysql/bin/mysql instead of directly entering MySQL,
Then we need to change PATH
Down is set MySQL, each time we use self-installed MYQLS
You need to enter/usr/local/mysql/bin/mysql instead of directly entering MySQL,
Then we need to change PATH
[[email protected] www]# which MySQL (MySQL is not/usr/local/mysql/bin/mysql, note distinction)
/usr/bin/mysql (the system comes with MySQL)
Use the following command to find the MySQL that comes with the system, and then uninstall the MySQL conflict if it is not uninstalled and installed. Because the landlord has been uninstalled, so there is no.
[Email protected] www]# Rpm-qf/usr/local/mysql
File/usr/local/mysql is isn't owned by any package
Write a path.sh script to create a MySQL quick-use method
[Email protected] www]# vim/etc/profile.d/path.sh
#!/bin/bash
Export path= $PATH:/usr/local/mysql/bin
[Email protected] www]# source/etc/profile.d/path.sh
Then you can use it.
First create a library
[[email protected] ~]# MySQL
mysql> CREATE DATABASE Discuz;
Query OK, 1 row affected (0.20 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| Information_schema |
| MySQL |
| Test |
+--------------------+
Mysql> Grant all on discuz.* to ' Linux '@ ' localhost ' identified by ' Linux ';
Query OK, 0 rows affected (0.16 sec)
Database name: discuz; database name: Linux Ps:linux
Admin Admin ps:123456
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/8A/56/wKioL1gt3DyjkFe-AAEsm3QI6kE711.jpg "title=" Ng14.jpg "alt=" Wkiol1gt3dyjkfe-aaesm3qi6ke711.jpg "/>
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/8A/56/wKioL1gt3OnRAizhAAHxn68cndI823.jpg "title=" Ng15.jpg "alt=" Wkiol1gt3onraizhaahxn68cndi823.jpg "/>
The following is the access interface:
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/8A/56/wKioL1gt3WrBLuOZAAIwa-drV2s445.jpg "title=" Ng16.jpg "alt=" Wkiol1gt3wrbluozaaiwa-drv2s445.jpg "/>
This article is from the "Cbo#boy_linux Road" blog, make sure to keep this source http://20151213start.blog.51cto.com/9472657/1874094
LNMP installation of Discuz