启动服务
cd /usr/local/ewifi/nginx_v/nginx-1.14.0/sbin/
./nginx
这里注意的是默认监听端口80,要查看此接口是否被占用,而且最好不要用默认端口。修改端口后再启动。 常见问题:
1、默认,不指定pcre路径时。
./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre= option.
需要安装pcre-devel所以说,安装前准备工作要做好。
2、nginx: [emerg] getpwnam("nginx") failed
说明编译时指定的用户没有创建,创建即可