nginx-1.26.2安装
1、解压安装泡
tar -zxvf nginx-1.26.2.tar.gz
2、编译进入解压目录执行
-prefix=/home/dgs/nginx-1.26.2./configure–with-http ssl module–with-http flv module–with-http gzip static module–with-http stub status module -with-threads -with-file-aio
-prefix=/home/dgs/nginx-1.26.2 为安装目录,最好安装在原来软件附件
如果编译过程中遇到 ssl 模块报错 则跳过 ssl模块不安装 ssl 模块
不要 ssl 模块
./configure -prefix=/root/tanghai/dsm/nginx-1.26.2-gh -with-http flv module-with-http gzip static module -with-http stub status module -with-threads–with-file-aio --without-http gzip module
3、make
进入解压目录
执行 make 命令
4、 make install
若 Nginx 安装编译报错 conf/koi-win and /usr/local/nginx/conf/koi-win 为同一目录
编译文件目录和-prefix=指定安装目录不要在同一目录
安装目录:-prefix=/root/tanghai/dsm/nginx-1.26.2-gh
5、配置文件
用上一个版本 nginx.conf进行替换
/usr/local/nginx/conf/nginx.conf 替换
/home/dgs/nginx-1.26.2/conf/nginx.conf