Installing the nginx
yum install gcc openssl-devel pcre-devel zlib-devel
# groupadd nginx
# useradd -g nginx -s /bin/false -M nginx
./configure \
--prefix=/usr \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.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_stub_status_module \
--with-http_gzip_static_module \
--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/ \
--with-pcre
make && make install
启动脚本 :放在/etc/init.d/nginx并加入以下内容:
然后需要做的是:
chkconfig --add nginx
chkconfig nginx on
阅读(1275) | 评论(0) | 转发(0) |