nginx -v 蝷綽error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory嚗舀曆追ibpcre.so.1璅∠嚗撠游憭望1 F H# f' I. m# V
閬閫瘙粹寞撣詨捆 憒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 m/ B/ f% e! G
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
6 _0 j5 ~ u1 |) euseradd -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 銝撱箇雿輻刻桅
% a1 {' y& C& J: j
vi /etc/passwd 亦臬血歇啣nginx
0 d7 T8 M. D! t7 S. ]6 P2 b
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 |