前端nginx部署

原文大佬文章入口:OpenEuler22.03源码编译安装nginx1.24.0https://www.cnblogs.com/boyliupan/p/17934108.html

以下步骤是个人项目部署示例,仅当个人笔记记录。

1、以下面为例,部署在 /mnt 文件夹下

2、创建autoTest文件夹

3、在autoTest文件夹下创建web文件夹

4、安装nginx

参考文档:OpenEuler22.03源码编译安装nginx1.24.0https://www.cnblogs.com/boyliupan/p/17934108.html

        4.1、# 安装必要依赖

yum -y install tar gcc make pcre pcre-devel zlib zlib-devel openssl openssl-devel

 

        4.2、# 创建nginx安装文件夹

mkdir nginx

 

        4.3、# 下载nginx源码包 (下载到了/autoTest下)

wget https://nginx.org/download/nginx-1.24.0.tar.gz

 

        4.4、# 解压源码包

tar -zxvf nginx-1.24.0.tar.gz 

 

        4.5、# 安装nginx

cd nginux-1.24.0;

        4.6、# 配置nginx安装路径及安装模块

./configure --prefix=/mnt/autoTest/nginx    --with-http_stub_status_module --with-http_v2_module --with-http_sub_module --with-http_gzip_static_module --with-pcre

         4.7、# 编译&&安装

make && make install

         4.8、修改nginx运行用户为root:移除user nobody 前的“#”,修改noby为root

5、上述操作都成功后,可以删除这两个文件夹

6、将打包后的前端web代码放在web目录下

7、启动nginx【 ./sbin/nginx 】

8、nginx.conf配置可以查看 /mnt/autoTest/nginx/conf/nginx.conf 文件

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值