nginx -v 蝷綽error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory嚗舀曆追ibpcre.so.1璅∠嚗撠游憭望. s4 X8 `4 c1 k t4 f
閬閫瘙粹寞撣詨捆 憒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 , M/ k+ X! a" h. N8 x
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
2 U2 i' t4 O# H& K9 h: r5 q$ n' i2 tuseradd -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 銝撱箇雿輻刻桅
: Y3 y. i S& d0 i
vi /etc/passwd 亦臬血歇啣nginx , J$ | X4 V# m1 ~
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 |