[root@webapp92 webapp]# /usr/local/nginx/sbin/nginx
/usr/local/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory
[root@webapp92 webapp]#find / -type f -name "libpcre.so"
/usr/local/lib/libpcre.so.1
[root@webapp92 webapp]#export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
[root@webapp92 webapp]#/usr/local/nginx/sbin/nginx
[root@webapp92 webapp]# ps -ef |grep nginx
root 9539 1 0 19:06 ? 00:00:00 nginx: master process /usr/local/nginx/sbin/nginx
www 9540 9539 0 19:06 ? 00:00:00 nginx: worker process
OK,nginx 已经启动了。。
---注:需要先切到root下,再去执行
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
启动nginx命令:[root@webapp92 webapp]# /usr/local/nginx/sbin/nginx
关闭nginx命令:[root@webapp92 webapp]# /usr/local/nginx/sbin/nginx -s stop