--with-http_sub_module #允许一些其他文本替换Nginx相应中的一些文本
--with-http_flv_module #提供支持flv视频文件支持
--with-http_mp4_module #提供支持mp4视频文件支持,提供伪流媒体服务端支持
--with-http_ssl_module #启用ngx_http_ssl_module
[root@CXW nginx-1.10.2]# ln -s /usr/src/nginx1.10/sbin/nginx /usr/local/sbin/ [root@CXW nginx-1.10.2]# nginx -t nginx: the configuration file /usr/src/nginx1.10/conf/nginx.conf syntax is ok nginx: configuration file /usr/src/nginx1.10/conf/nginx.conf test is successful [root@CXW nginx-1.10.2]# nginx [root@CXW nginx-1.10.2]# netstat -anpt | grep nginx tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 7935/nginx: master
[root@CXW nginx-1.10.2]# nginx -h nginx version: cxw/7.0
3、nginx配置项优化
[root@CXW nginx-1.10.2]# ps -ef | grep nginx
root 7935 1 0 17:24 ? 00:00:00 nginx: master process nginx
www 7936 7935 0 17:24 ? 00:00:00 nginx: worker process
root 8125 4969 0 17:30 pts/1 00:00:00 grep --color=auto nginx

在这里我们还可以看到在查看的时候,work进程是nginx程序用户,但是master进程还是root,其中,master是监控进程,也叫主进程,work是工作进程
(1):Nginx运行工作进程个数,一般我们设置CPU的核心或者核心数x2
如果不了解cpu的核数,可以top命令之后按1也可以看出来,也可以查看/proc/cpuinfo文件#grep ^processor /proc/cpuinfo | wc -l
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/bofangqi/article-76432-3.html
爱你
越菲要哭了
有人好办事啊