nginx 安装

yum install glib2-devel openssl-devel pcre-devel bzip2-devel gzip-devel gcc gcc-c++ ncurses-devel perl gcc gcc-c++ ncurses-devel perl perl-devel perl-ExtUtils-Embed
cd /tmp
wget http://nginx.org/download/nginx-1.4.7.tar.gz
tar -zxvf nginx-1.4.7.tar.gz
cd nginx-1.4.7
./configure \
    --user=nginx\
    --group=nginx \
    --prefix=/usr/local/nginx \
    --with-http_ssl_module \
    --with-http_realip_module \
    --with-http_addition_module \
    --with-http_sub_module \
    --with-http_dav_module \
    --with-http_flv_module \
    --with-http_gzip_static_module \
    --with-http_stub_status_module \
    --with-http_perl_module \
    --with-mail \
    --with-mail_ssl_module  
make
make install 

启动nginx

/usr/local/nginx/sbin/nginx

访问http://localhost,如出现欢迎页面,代表安装成功

posted @ 2014-07-30 11:05  林如振  阅读(281)  评论(0)    收藏  举报