nginx -v 蝷綽error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory嚗舀曆追ibpcre.so.1璅∠嚗撠游憭望
7 E7 G3 E5 \' P* \閬閫瘙粹寞撣詨捆 憒32雿蝟餌 [root@lee ~]# ln -s /usr/local/lib/libpcre.so.1 /lib 憒64雿蝟餌 [root@lee ~]# ln -s /usr/local/lib/libpcre.so.1 /lib64 嗅nginx撠屠K鈭 [root@lee ~]# service nginx start
4 {$ u8 X) l! Z6 g9 K, L
BUT service nginx start show error: nginx: unrecognized service Solution: 舀曆啣script 臬瑁瑼 cp /usr/sbin/nginx /etc/init.d/ nginx臬瑁瑼 銴鋆賢亙酒erver 銋 /etc/rc.d/init.d/nginx 祆 /etc/rc.d/init.d/nginx 甇方nginx 臬script 銝甈 service nginx start show error: Starting nginx: nginx: [emerg] getpwnam("nginx") failed in /etc/nginx/nginx.conf:2 舀 nginx 冽嗅蝢斤 Sol: groupadd -r nginx
+ D" c* M6 O6 Q# y$ Luseradd -r -g nginx -s /bin/false -M nginx or /usr/sbin/groupadd -f nginx /usr/sbin/useradd -M -s /sbin/nologin -g nginx nginx //-M 銝撱箇雿輻刻桅
, I$ b( d [) v- ]3 ~% Z L1 |
vi /etc/passwd 亦臬血歇啣nginx
- I* I8 z$ T# y% T: n
again service nginx start show error: Starting nginx: nginx: [emerg] mkdir() "/var/cache/nginx/client_temp" failed (2: No such file or directory) Sol: 亦 /var/cache/nginx/ 甇斤桅 mkdir /var/cache/nginx again service nginx start ======ok |