03 LTS 源码编译安装nginx1.22.1
# openeuler22.03 LTS 源码编译安装nginx1.22.1
# 下载安装包
#官网下载nginx1.22.1
wget http://nginx.org/download/nginx-1.22.1.tar.gz
1
2
2
# 安装依赖包
#安装依赖包,NGINX是C语言写的,pcre-devel支持正则表达式,openssl 开启加密
[root@proxy ~]# yum -y install gcc pcre-devel openssl-devel
1
2
2
# 编译安装
#创建NGINX用户,为了安全起见,不允许登录系统
[root@proxy ~]# useradd -s /sbin/nologin nginx -M
#解压,安装,这里把nginx 部署在/home/application/nginx 目录下
[root@proxy ~]# mkdir /home/application/nginx
[root@proxy ~]# tar -xf nginx-1.22.1.tar.gz
[root@proxy ~]# cd nginx-1.22.1
[root@localhost nginx-1.22.1]# ./configure --prefix=/home/application/nginx --user=nginx --group=nginx --with-http_ssl_module --with-http_stub_status_module --with-stream --with-http_gzip_static_module
#编译安装
[root@proxy nginx-1.20.2]# make && make install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
# 测试访问
上次更新: 2023/09/06, 17:59:31