本文共 886 字,大约阅读时间需要 2 分钟。
Nginx安装:
解压并安装Nginx:
[root@clone1 nginx-1.8.1]# tar xf nginx-1.8.1.tar.gz[root@clone1 nginx-1.8.1]# cd nginx-1.8.1[root@clone1 nginx-1.8.1]# ./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_stub_status_module --with-http_ssl_module make && make install--prefix=/usr/local/nginx #指定安装路径
--with-http_stub_status_module #声明启用service status页,默认不启用--with-http_ssl_module #启用ssl模块,以支持https请求启动:
[root@clone1 nginx-1.8.1]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf查看启动状态:
[root@clone1 nginx-1.8.1]# netstat -tanp|grep 80tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 5535/nginx转载于:https://blog.51cto.com/13553337/2097180