CentOS6编译安装Nginx(2)

[root@test sbin]#

[root@test sbin]# ./nginx -t nginx: the configuration file /service/nginx/conf/nginx.conf syntax is ok nginx: configuration file /service/nginx/conf/nginx.conf test is successful [root@test sbin]# ./nginx -v nginx version: nginx/1.5.7 [root@test sbin]#

 

[root@test nginx]# /service/nginx/sbin/nginx

[root@test nginx]# netstat -lanp|grep nginx

tcp 0 0 0.0.0.0:81 0.0.0.0:* LISTEN 27889/nginx

unix 3 [ ] STREAM CONNECTED 54224 27889/nginx

unix 3 [ ] STREAM CONNECTED 54223 27889/nginx

[root@test nginx]# ll

total 40

drwx------ 2 nobody root 4096 Nov 26 21:24 client_body_temp

drwxr-xr-x 2 root root 4096 Nov 26 21:38 conf

drwx------ 2 nobody root 4096 Nov 26 21:24 fastcgi_temp

drwxr-xr-x 2 root root 4096 Nov 26 21:23 html

drwxr-xr-x 2 root root 4096 Nov 26 21:24 logs

-rw-r--r-- 1 root root 6 Nov 26 21:40 nginx.pid

drwx------ 2 nobody root 4096 Nov 26 21:24 proxy_temp

drwxr-xr-x 2 root root 4096 Nov 26 21:23 sbin

drwx------ 2 nobody root 4096 Nov 26 21:24 scgi_temp

drwx------ 2 nobody root 4096 Nov 26 21:24 uwsgi_temp

[root@test nginx]# cat nginx.pid

27889

[root@test nginx]# ps -ef|grep nginx

root 27889 1 0 21:40 ? 00:00:00 nginx: master process /service/nginx/sbin/nginx

nobody 27890 27889 0 21:40 ? 00:00:00 nginx: worker process

root 27902 3729 0 21:40 pts/0 00:00:00 grep nginx

[root@test nginx]# /service/nginx/sbin/nginx [root@test nginx]# netstat -lanp|grep nginx tcp 0 0 0.0.0.0:81 0.0.0.0:* LISTEN 27889/nginx unix 3 [ ] STREAM CONNECTED 54224 27889/nginx unix 3 [ ] STREAM CONNECTED 54223 27889/nginx [root@test nginx]# ll total 40 drwx------ 2 nobody root 4096 Nov 26 21:24 client_body_temp drwxr-xr-x 2 root root 4096 Nov 26 21:38 conf drwx------ 2 nobody root 4096 Nov 26 21:24 fastcgi_temp drwxr-xr-x 2 root root 4096 Nov 26 21:23 html drwxr-xr-x 2 root root 4096 Nov 26 21:24 logs -rw-r--r-- 1 root root 6 Nov 26 21:40 nginx.pid drwx------ 2 nobody root 4096 Nov 26 21:24 proxy_temp drwxr-xr-x 2 root root 4096 Nov 26 21:23 sbin drwx------ 2 nobody root 4096 Nov 26 21:24 scgi_temp drwx------ 2 nobody root 4096 Nov 26 21:24 uwsgi_temp [root@test nginx]# cat nginx.pid 27889 [root@test nginx]# ps -ef|grep nginx root 27889 1 0 21:40 ? 00:00:00 nginx: master process /service/nginx/sbin/nginx nobody 27890 27889 0 21:40 ? 00:00:00 nginx: worker process root 27902 3729 0 21:40 pts/0 00:00:00 grep nginx


关闭Nginx

/service/nginx/sbin/nginx -s stop

/service/nginx/sbin/nginx -s stop

访问81端口显示

Welcome to nginx!

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

Thank you for using nginx.

推荐阅读

Nginx实现反向代理和负载均衡的配置及优化

Nginx做负载均衡报:nginx: [emerg] could not build the types_hash

Nginx 负载均衡模块 ngx_http_upstream_module 详述

Nginx+Firebug 让浏览器告诉你负载均衡将请求分到了哪台服务器

Ubuntu安装Nginx php5-fpm MySQL(LNMP环境搭建)

Nginx 的详细介绍请点这里
Nginx 的下载地址请点这里

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/7ecea9c2408b51017fbd0ee164cc02ce.html