Centos下编译安装Nginx教程详解
一、安装nginx时必须先安装相应的编译工具
yum-yinstallgccgcc-c++autoconfautomake yum-yinstallzlibzlib-developensslopenssl-develpcre-devel
建立nginx组
groupadd-rnginx useradd-s/sbin/nologin-gnginx-rnginx idnginx
zlib:nginx提供gzip模块,需要zlib库支持
openssl:nginx提供ssl功能
pcre:支持地址重写rewrite功能
二、tar-zxvfnginx-1.2.8.tar.gz
三、cdnginx-1.2.8
四、./configure\
--prefix=/usr\ --sbin-path=/usr/sbin/nginx\ --conf-path=/etc/nginx/nginx.conf\ --error-log-path=/var/log/nginx/error.log\ --pid-path=/var/run/nginx/nginx.pid\ --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\ --with-http_stub_status_module
五、make&&makeinstall
小结:centos没有安装make编译器
解决:
yum-yinstallgccautomakeautoconflibtoolmake
以上所述是小编给大家介绍的Centos下编译安装Nginx教程详解,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对毛票票网站的支持!