申请鲲鹏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 -mtotal 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 wget2.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.aarch643.2.下載源碼編譯
wget http://nginx.org/download/nginx-1.17.10.tar.gz#解壓tar xzvf nginx-1.17.10.tar.gz#編譯cd nginx-1.17.10./configure --sbin-path=/usr/local/nginx/nginx --conf-path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid --with-pcre --with-http_stub_status_module --with-http_gzip_static_module --with-http_ssl_modulemakemake install3.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>?
總結
以上是生活随笔為你收集整理的申请鲲鹏920测试机试水+编译nginx的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: KVM学习笔记
- 下一篇: selenium的三种等待时间