申请鲲鹏920测试机试水+编译nginx
目錄
?
1.申請(qǐng)測(cè)試機(jī)
2.系統(tǒng)環(huán)境查看
2.1.看下cpu信息
2.2.看下內(nèi)存信息
3.準(zhǔn)備編譯安裝nginx
3.1.編譯環(huán)境安裝
3.2.下載源碼
1.申請(qǐng)測(cè)試機(jī)
申請(qǐng)地址:鵬城生態(tài)門戶
https://dw.pcl.ac.cn/cloud/
提需求,填寫公司信息,申請(qǐng)?jiān)囉萌齻€(gè)月的服務(wù)器,服務(wù)器CPU選擇鯤鵬920,操作系統(tǒng)選擇CentOS7
?
等一會(huì)審批后,登錄進(jìn)去,在云主機(jī)菜單就能看到服務(wù)器列表,點(diǎn)擊服務(wù)器詳情,看到服務(wù)器的管理員密碼(即root用戶的密碼)和端口映射左側(cè)22映射到對(duì)應(yīng)的互聯(lián)網(wǎng)ip和端口
?
xshell連接互聯(lián)網(wǎng)IP和端口,輸入用戶名root,管理員密碼
進(jìn)入操作系統(tǒng)shell。
?
2.系統(tǒng)環(huán)境查看
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架構(gòu),16核心
?
2.2.看下內(nèi)存信息
[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內(nèi)存
?
2.3.軟件環(huán)境
java -version
看到已經(jīng)有java的openjdk環(huán)境了。
?
裝一下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架構(gòu)的目錄,啊……看來(lái)要自行編譯了
?
3.準(zhǔn)備編譯安裝nginx
3.1.編譯環(huán)境安裝
yum install -y gcc-c++ yum install -y pcre pcre-devel yum install -y zlib zlib-devel yum install -y openssl openssl-devel看執(zhí)行情況,aarch64架構(gòu)的常見(jiàn)編譯環(huán)境還是沒(méi)有問(wèn)題的
---> 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.運(yùn)維
#開(kāi)啟、關(guān)閉、重啟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.訪問(wèn)
訪問(wèn)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>?
總結(jié)
以上是生活随笔為你收集整理的申请鲲鹏920测试机试水+编译nginx的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: KVM学习笔记
- 下一篇: MySQL存储过程和函数的区别