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,如出现欢迎页面,代表安装成功

你可能感兴趣的:(nginx)