2021年1月,AWS中国区正式发布ARM处理器的EC2云服务器,规格包括c6g、m6g、r6g。选择Amazon Linux 2 操作系统创建EC2后,可能需要查找软件安装源,一些服务器端软件可能在很多公开的软件源无法下载到ARM处理器对应版本。
此时,可以使用amazon-linux-extras install 软件名 进行安装。执行 amazon-linux-extras 查看可用软件包和版本。
[root@ip-172-31-22-48 ~]# w
15:00:56 up 15 min, 1 user, load average: 0.00, 0.02, 0.04
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
ec2-user pts/0 54.222.61.40 14:50 0.00s 0.03s 0.00s sshd: ec2-user [priv]
[root@ip-172-31-22-48 ~]# ll
total 0
[root@ip-172-31-22-48 ~]# amazon-linux-extras
0 ansible2 available [ =2.4.6 =2.8 =stable ]
1 httpd_modules available [ =1.0 =stable ]
2 memcached1.5 available \
[ =1.5.1 =1.5.16 =1.5.17 ]
4 postgresql9.6 available [ =9.6.8 =stable ]
5 postgresql10 available [ =10 =stable ]
6 redis4.0 available [ =4.0.10 =stable ]
7 R3.4 available [ =3.4.3 =stable ]
11 php7.2 available \
[ =7.2.13 =7.2.14 =7.2.16 =7.2.17 =7.2.19 =7.2.21
=7.2.22 =7.2.23 =7.2.24 =7.2.26 =stable ]
13 lamp-mariadb10.2-php7.2 available \
[ =10.2.10_7.2.11 =10.2.10_7.2.14 =10.2.10_7.2.16
=10.2.10_7.2.17 =10.2.10_7.2.19 =10.2.10_7.2.22
=10.2.10_7.2.23 =10.2.10_7.2.24 =stable ]
14 libreoffice available [ =5.3.6.1 =stable ]
16 docker=latest enabled \
[ =18.06.1 =18.09.9 =stable ]
18 GraphicsMagick1.3 available \
[ =1.3.29 =1.3.32 =1.3.34 =stable ]
19 tomcat8.5 available \
[ =8.5.32 =8.5.38 =8.5.40 =8.5.42 =8.5.50 =stable ]
20 epel available [ =7.11 =stable ]
21 testing available [ =1.0 =stable ]
22 ecs available [ =stable ]
23 corretto8 available \
[ =1.8.0_202 =1.8.0_212 =1.8.0_222 =1.8.0_232 =1.8.0_242
=stable ]
24 golang1.11 available \
[ =1.11.3 =1.11.11 =1.11.13 =stable ]
25 squid4 available [ =4 =stable ]
26 php7.3 available \
[ =7.3.2 =7.3.3 =7.3.4 =7.3.6 =7.3.8 =7.3.9 =7.3.10
=7.3.11 =7.3.13 =stable ]
27 java-openjdk11 available [ =11 =stable ]
28 lynis available [ =stable ]
29 kernel-ng available [ =stable ]
30 BCC available [ =0.x =stable ]
31 nginx1 available [ =stable ]
32 ruby2.6 available [ =2.6 =stable ]
33 mock available [ =stable ]
34 postgresql11 available [ =11 =stable ]
35 php7.4 available [ =stable ]
36 python3.8 available [ =stable ]
37 lustre2.10 available [ =stable ]
38 haproxy2 available [ =stable ]
39 collectd available [ =stable ]
40 R4 available [ =stable ]
41 kernel-5.4 available [ =stable ]
42 selinux-ng available [ =stable ]
[root@ip-172-31-22-48 ~]#
使用Amazon Linux 2 提供的软件包,即可免去自己从源代码重新编译的麻烦,又可免费享有五年的Long Term Support长期升级支持,避免了安全隐患。
Amazon Linux 2 提供了相当程度上与CentOS 7的兼容,推荐选用。