nginx源码包下载稳定版 (Stable version) 稳定版本
nginx网站 http://nginx.org/
http://nginx.org/download/nginx-1.16.0.tar.gz
安装环境:
yum -y install wget gcc gcc-c++ pcre-devel zlib-devel openssl openssl-devel
cd /usr/local/src :安装源码包目录
wget http://nginx.org/download/nginx-1.16.0.tar.gz ://下载
tar -zxvf nginx-1.16.0.tar.gz
cd nginx-1.16.0.tar.gz
vi auto/cc/gcc #将这句注释掉 取消Debug编译模式 大概在172行
#CFLAGS="$CFLAGS -g"
预编译
./configure --prefix=/usr/local/nginx
–with-http_ssl_module
–with-http_v2_module
–with-http_stub_status_module \
–with-pcre
–with-http_gzip_static_module
–with-http_dav_module
–with-http_addition_module \
–with-http_sub_module
–with-http_flv_module
–with-http_mp4_module
make && make install
添加系统变量(方便启停服务)
vim /etc/profile
添加 export PATH=/usr/local/nginx/sbin:$PATH
source /etc/profile 重启配置
建立软连接,编辑启动脚本
php 下载 https://www.php.net/downloads.php
源码安装php https://www.cnblogs.com/pengyunjing/p/8687097.html
swoole包 https://pecl.php.net/package/swoole
swoole安装 https://blog.csdn.net/zeroking_vip/article/details/83180346