编译安装Nginx
1、下载安装包,***.tar.gz
2、解压缩
tar zxvf ***.tar.gz
3、进入目录安装
./configure 【成功后 记录Configuration summary信息】
make
make install
4、修改配置文件 nginx.conf
5、启动服务
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
------------------------
【FAQ】
出现:./configure: error: the HTTP rewrite module requires the PCRE library.
终极解决方案:yum -y install openssl-devel ,之后可继续 configure
-------------------------
Configuration summary
+ using system PCRE library
+ OpenSSL library is not used
+ md5: using system crypto library
+ sha1: using system crypto library
+ using system zlib library
nginx path prefix: "/usr/local/nginx"
nginx binary file: "/usr/local/nginx/sbin/nginx" 【nginx的启动bin文件】
nginx configuration prefix: "/usr/local/nginx/conf