一、编译安装
--prefix=/usr
--sbin-path=/usr/sbin/nginx
--conf-path=/etc/nginx_1_6/nginx.conf
--error-log-path=/var/log/nginx/error.log
--http-log-path=/var/log/nginx/access.log
--pid-path=/var/run/nginx/nginx.pid
--lock-path=/var/lock/nginx.lock
--user=nginx
--group=nginx
--with-http_ssl_module
--with-http_flv_module
--with-http_stub_status_module
--with-http_gzip_static_module
--http-client-body-temp-path=/var/tmp/nginx/client/
--http-proxy-temp-path=/var/tmp/nginx/proxy/
--http-fastcgi-temp-path=/var/tmp/nginx/fcgi/
--http-uwsgi-temp-path=/var/tmp/nginx/uwsgi
--http-scgi-temp-path=/var/tmp/nginx/scgi
--with-pcre --with-file-aio
编译过程中,会出现找不到类库的问题,先装好类库,再重复执行就好了
二、测试NGINX环境
执行以下语句
看到以下提示就说明已经可以具备了启动所有的环境
我遇到的错误是这样的
在启动nginx之前还需要添加nginx用户组,否则会提示
| @@######@@ |
添加用户组
| @@######@@ |
三、启动NGINX
启动NGINX
看到以下提示说明启动成功
以上就介绍了NGINX编译安装及配置,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。
<span>[</span>emerg<span>]</span>: getpwnam<span>(</span>“nginx”<span>)</span> failed
<span>sudo</span> adduser <span>--system</span><span>--no-create-home</span><span>--disabled-password</span><span>--group</span> nginx










