nginx -v 蝷綽error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory嚗舀曆追ibpcre.so.1璅∠嚗撠游憭望1 g2 R% r+ ~% }: F2 @( ^
閬閫瘙粹寞撣詨捆 憒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
7 D9 b2 r; ^, J0 z% {4 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 nginx8 [8 G+ z# g! l4 X. v
useradd -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 銝撱箇雿輻刻桅 7 C8 y0 f; {, ` I, p
vi /etc/passwd 亦臬血歇啣nginx
# |( K- }( x& F& ~6 z( |7 G
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 |