申请鲲鹏920测试机试水+编译nginx

目录

 

1.申请测试机

2.系统环境查看

2.1.看下cpu信息

2.2.看下内存信息

3.准备编译安装nginx

3.1.编译环境安装

3.2.下载源码


1.申请测试机

申请地址:鹏城生态门户

https://dw.pcl.ac.cn/cloud/

提需求,填写公司信息,申请试用三个月的服务器,服务器CPU选择鲲鹏920,操作系统选择CentOS7

 

等一会审批后,登录进去,在云主机菜单就能看到服务器列表,点击服务器详情,看到服务器的管理员密码(即root用户的密码)和端口映射左侧22映射到对应的互联网ip和端口

 

xshell连接互联网IP和端口,输入用户名root,管理员密码

进入操作系统shell。

 

2.系统环境查看

2.1.看下cpu信息

[root@host-15-0-0-28 ~]# lscpu
Architecture:          aarch64
Byte Order:            Little Endian
CPU(s):                16
On-line CPU(s) list:   0-15
Thread(s) per core:    1
Core(s) per socket:    16
Socket(s):             1
NUMA node(s):          1
Model:                 2
BogoMIPS:              100.00
NUMA node0 CPU(s):     0-15
Flags:                 fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid

可以看到是aarch64架构,16核心

 

2.2.看下内存信息

[root@host-15-0-0-28 ~]# free -m
              total        used        free      shared  buff/cache   available
Mem:          32636         260       31593          33         783       29348
Swap:             0           0           0

可以看到是32GB内存

 

2.3.软件环境

java -version

看到已经有java的openjdk环境了。

 

装一下wget

yum install -y wget

2.4.尝试安装nginx

sudo rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

sudo yum install -y nginx

提示找不到aarch64架构的目录,啊……看来要自行编译了

 

3.准备编译安装nginx

3.1.编译环境安装

yum install -y gcc-c++
yum install -y pcre pcre-devel
yum install -y zlib zlib-devel
yum install -y openssl openssl-devel

看执行情况,aarch64架构的常见编译环境还是没有问题的

---> Package gcc-c++.aarch64 0:4.8.5-36.el7 will be updated
---> Package gcc-c++.aarch64 0:4.8.5-39.el7 will be an update
--> Processing Dependency: libstdc++-devel = 4.8.5-39.el7 for package: gcc-c++-4.8.5-39.el7.aarch64
--> Processing Dependency: libstdc++ = 4.8.5-39.el7 for package: gcc-c++-4.8.5-39.el7.aarch64
--> Processing Dependency: gcc = 4.8.5-39.el7 for package: gcc-c++-4.8.5-39.el7.aarch64

3.2.下载源码

wget http://nginx.org/download/nginx-1.17.10.tar.gz

 

3.3.运维

#开启、关闭、重启nginx

/usr/local/nginx/nginx

/usr/local/nginx/nginx -s stop

/usr/local/nginx/nginx -s reload

修改配置

vi /usr/local/nginx/nginx.conf

 

3.4.访问

访问http://localhost

看到输出html即表示可以了

 

[root@host-15-0-0-28 nginx-1.17.10]# curl http://localhost
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
    body {
        width: 35em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
    }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>

 

上一篇:PyTorch for Jetson Nano - version 1.4.0 now available


下一篇:3559 编译gdb-7.9