Nginx 및 제3자 모듈 의 설치

3279 단어 nginx
● nginx 의 설치 (nginx 를 설치 하려 면 pcre 를 먼저 설치 해 야 합 니 다)

# 1.    pcre
[root@localhost ~]# wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.02.tar.gz
[root@localhost ~]# tar -xzvf pcre-8.02.tar.gz

# 2.    pcre
#             ,configure        ,     ./configure --help    。    prefix     /usr/local/pcre     prce     /usr/local/pcre  
[root@localhost ~]# cd /usr/local/pcre-8.02
[root@localhost ~]# ./configure --prefix=/usr/local/pcre
[root@localhost ~]# make
[root@localhost ~]# make install
#    pcre       ,      :
# /usr/local/      pcre   
# /usr/local/lib      pcre   
# /usr/local/include      pcre   

# 3.    nginx    。          /usr/local/nginx-1.0.4
[root@localhost ~]# cd /usr/local/nginx-1.0.4
[root@localhost ~]# ./configure --prefix=/usr/local/nginx --with-http_gzip_static_module
[root@localhost ~]# make
# make install  ,   /usr/local/nginx-1.0.4/objs     nginx       ,              nginx      ,  --prefix      
[root@localhost ~]# make install

   nginx           ,        ,          ,   ./configure --help             。              :
./configure
    --prefix=/usr/local/nginx \
    --sbin-path=/usr/local/nginx/sbin/nginx \
    --conf-path=/etc/nginx/nginx.conf \
    --error-log-path=/var/log/nginx/error.log \
    --pid-path=/var/run/nginx/nginx.pid \
    --lock-path=/var/lock/nginx.lock \
    --user=nginx \
    --group=nginx \
    --with-http_ssl_module \
    --with-http_flv_module \
    --with-http_gzip_static_module \
    --http-log-path=/var/log/nginx/access.log \
    --http-client-body-temp-path=/var/tmp/nginx/client/ \
    --http-proxy-temp-path=/var/tmp/nginx/proxy/ \
    --http-fastcgi-temp-path=/var/tmp/nginx/fcgi/

        ● nginx 모듈 의 추가 (여 기 는 agentzh - headers - more - nginx - module 을 예 로 들 면)

#    http://hi.baidu.com/linuxsirnixx3/blog/item/c5ea6bd17fb48c2032fa1ced.html

# 1.    agentzh-headers-more-nginx-module,   。      /usr/local/agentzh-headers-more-nginx-module-7bba2a1
[root@localhost ~]# wget http://friendly.sinaapp.com//LinuxSoft/agentzh-headers-more-nginx-module-v0.14rc1-0-gfb2d893.tar.gz
[root@localhost ~]#tar -xzvf agentzh-headers-more-nginx-module-v0.14rc1-0-gfb2d893.tar.gz

# 2.    nginx      ,    /usr/local/nginx
[root@localhost ~]# cd /usr/local/nginx

# 3.      agentzh-headers-more-nginx-module,  :
 --prefix=/usr/local/nginx          ,  nginx      
 --add-module=/usr/local/agentzh-headers-more-nginx-module-7bba2a1             
[root@localhost ~]# ./configure --prefix=/usr/local/nginx --add-module=/usr/local/agentzh-headers-more-nginx-module-7bba2a1
[root@localhost ~]# make

# 4.       /usr/local/nginx-1.0.4/objs      nginx   ,          /usr/local/nginx/sbin    nginx   ,    objs      nginx       /usr/local/nginx/sbin  。  ,           ,       ,        。
[root@localhost ~]# cp /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.old
[root@localhost ~]# cp /usr/local/nginx-1.0.4/objs/nginx /usr/local/nginx/sbin

좋은 웹페이지 즐겨찾기