信创国产系统麒麟arm架构中nginx安装过程

前言

在事业单位或国企,信创项目在步步推进,下面将在国产系统通信arm架构中nginx的安装过程记录分享出来,希望帮助到有需要的小伙伴。

1、nginx下载

1.1、在线下载

进入指定目录,如/usr/local,执行如下命令:

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

1.2、离线上传

将提前下载好的安装包上传到指定目录,如/usr/local
nginx的下载地址如下:https://nginx.org/en/download.html
在这里插入图片描述
此处选择的版本为 nginx-1.20.2

2、安装依赖组件

2.1、在线下载或离线上传对应的组件包

wget https://buildpack.oss-cn-shanghai.aliyuncs.com/static/r6d/nginx/nginx-compile-lib/pcre-8.44.tar.gz
 
wget https://buildpack.oss-cn-shanghai.aliyuncs.com/static/r6d/nginx/nginx-compile-lib/zlib-1.2.11.tar.gz
 
wget https://buildpack.oss-cn-shanghai.aliyuncs.com/static/r6d/nginx/nginx-compile-lib/openssl-1.1.1l.tar.gz

注:需要g++,gcc等环境,若没有需求安装,类似如下:
yum install -y gcc-c++

2.2、安装 pcre-8.44,root用户依次执行如下命令

cd /usr/local
tar -xvf pcre-8.44.tar.gz
cd /usr/local/pcre-8.44
./configure
make
make install

2.3、安装 openssl-1.1.1l,root依次执行如下命令

cd /usr/local
tar -xvf openssl-1.1.1l.tar.gz
cd /usr/local/openssl-1.1.1l
./config
make
make install

2.4、安装 zlib-1.2.11,root依次执行如下命令

cd /usr/local
tar -xvf zlib-1.2.11.tar.gz
cd /usr/local/zlib-1.2.11
./config
make
make install

3、安装nginx

cd /usr/local
tar -xvf nginx-1.20.2.tar.gz
cd /usr/local/nginx-1.20.2
./configure --prefix=/usr//nginx
make
make install

4、启动nginx

cd /usr/nginx/sbin
./nginx
# 重新加载
./nginx -s reload
# 停止服务
./nginx -s stop

5、验证nginx

执行如下命令

curl http://127.0.0.1:80

若出现响应内容则说明启动成功。
或通过浏览器访问http://127.0.0.1:80,若出现welcome to nginx则说明启动成功。

注:在信创国产系统中安装nginx的过程和linux环境基本类似。

6、ssh命令

6.1、ssh远程登录命令

ssh [email protected]

格式为:ssh root@需要登录的主机ip地址

6.2、scp远程复制命令

# 将本地文件远程复制到目的地
scp ***.jar [email protected]:/usr/local
# 将目的地文件远程复制到本地
scp [email protected]:/usr/local/***.jar /opt/

猜你喜欢

转载自blog.csdn.net/leijie0322/article/details/132495074