nginx -v 蝷綽error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory嚗舀曆追ibpcre.so.1璅∠嚗撠游憭望9 p5 Y: Q1 [ K. ]
閬閫瘙粹寞撣詨捆 憒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
2 S5 i6 Z, b' \+ T8 J1 r
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
( u" K; ]: D& S+ B( q" b& fuseradd -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 銝撱箇雿輻刻桅 6 Q2 n& J4 R( C$ @% q8 W: a
vi /etc/passwd 亦臬血歇啣nginx
# \$ G8 Z O& X) B* H f
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 |