nginx非root安装

2023-07-30,,

nginx非root安装 唯一需要解决的就是指定安装目录

这里使用nginx相关包如下

nginx-1.14.0.tar.gz 安装需要依赖如下2个包

pcre-8.42.tar.gz

zlib-1.2.7.3

安装步骤

1.安装pcre-8.42.tar.gz

>cd pcre-8.42

>./configure --prefix=/opt/aspire/product/nginx/nginx/pcre   #指定安装在/opt/aspire/product/nginx/nginx目录下,标记灰色是我家目录

>make && make install

2.安装zlib-1.2.7.3

安装同步骤1

3.安装zlib-1.2.7.3

这里安装需要注意,这里安装nginx需要使用到pcre和zlib文件,这个不是你装好的路径是tar开包的原文件路径

>./configure  --with-http_stub_status_module  --prefix=/opt/aspire/product/nginx/nginx  --with-pcre=/opt/aspire/product/nginx/nginx-install/pcre-8.42  --with-zlib=/opt/aspire/product/nginx/nginx-install/zlib-1.2.7.3

注意我上面标颜色的区别

>make && make install

安装好如下,剩下的改conf文件拉起来就可以了

nginx非root安装的相关教程结束。

《nginx非root安装.doc》

下载本文的Word格式文档,以方便收藏与打印。