AWS Amazon Linux 2 ๊ฐ๋ฐ ์ ์
์ด ๊ธ์ ์ ๋ฆฌ๋ฅผ ์ํด ๊ฐ์ธ์ ์ธ ์ฉ๋๋ก ์์ฑ๋ ํฌ์คํธ์ ๋๋ค. ์ง์ ๊ณผ ์กฐ์ธ์ ์ธ์ ๋ ํ์์ ๋๋ค ใ ใ
EC2 ๋น์ฉ์ ์ค์ด๊ธฐ ์ํด t4g
์๋ฆฌ์ฆ์ ์ธ์คํด์ค๋ฅผ ์ฌ์ฉํ๋๋ โGravitonโ์ด ARM
์ํคํ
์ฒ๋ ๊ฑธ ๋ค๋ฆ๊ฒ ๊นจ๋ฌ์์ต๋๋ค ๐ญ
x86
๊ธฐ๋ฐ์์ ๊ธฐ์กด์ ์ฐ๋ ์ค์น ๋ช
๋ น์ด๋ก๋ ์ค์น๊ฐ ์ ์ ๋๋ ๋ฌธ์ ๋ ์์์ต๋๋ค. ๊ทธ๋์ AWS Graviton์ผ๋ก ์ธ์คํด์ค๋ฅผ ๊ตฌ์ฑํ๋ฉด์ ๊ฒช์ ํธ๋ฌ๋ธ ์ํ
์ ๊ธฐ๋กํ๊ณ ์ ํฉ๋๋ค.
amazon-linux-extras
Amazon Linux 2์์๋ amazon-linux-extras
๋ช
๋ น์ด๋ฅผ ํตํด ์๋ฒ๋ฅผ ์ด์ํ๋๋ฐ ํ์ํ ๋๊ตฌ๋ค์ ์ฝ๊ฒ ์ค์นํ ์ ์์ต๋๋ค! Amazon Linux๊ฐ ์ฒ์์ด๋ผ๋ฉด ์ ๋ช
๋ น์ด๋ถํฐ ์ตํ์ผ ํฉ๋๋ค! (2023.05 ์
๋ฐ์ดํธ: โAmazon Linux 2023โ์๋ amazon-linux-extras
๋ช
๋ น์ด๊ฐ ๋น ์ก๋ค๊ณ ํฉ๋๋ค stackoverflow ๐ฅฒ ๊ทธ๋์ Amazon Linux 2023์์๋ ์ง์ yum
์ผ๋ก Docker๋ฅผ ์ค์นํด์ค์ผ ํฉ๋๋ค!)
$ sudo amazon-linux-extras list
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 ]
5 postgresql10 available [ =10 =stable ]
7 R3.4 available [ =3.4.3 =stable ]
8 rust1 available [ =stable ]
14 libreoffice available [ =5.3.6.1 =stable ]
16 docker=latest enabled \
[ =18.06.1 =18.09.9 =stable ]
17 mate-desktop1.x available [ =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 ]
27 java-openjdk11 available [ =11 =stable ]
28 lynis available [ =stable ]
30 BCC available [ =0.x =stable ]
31 nginx1=latest enabled [ =stable ]
32 ruby2.6=latest enabled [ =2.6 =stable ]
33 mock available [ =stable ]
34 postgresql11 available [ =11 =stable ]
36 python3.8 available [ =stable ]
37 lustre2.10 available [ =stable ]
38 haproxy2 available [ =stable ]
39 collectd available [ =stable ]
40 R4 available [ =stable ]
_ kernel-5.4 available [ =stable ]
42 selinux-ng available [ =stable ]
43 php8.0 available [ =stable ]
44 tomcat9 available [ =stable ]
45 unbound1.13 available [ =stable ]
46 mariadb10.5 available [ =stable ]
47 kernel-5.10=latest enabled [ =stable ]
48 redis6 available [ =stable ]
49 ruby3.0 available [ =stable ]
50 postgresql12 available [ =stable ]
51 postgresql13 available [ =stable ]
52 mock2 available [ =stable ]
53 dnsmasq2.85 available [ =stable ]
54 aws-nitro-enclaves-cli available [ =stable ]
55 livepatch available [ =stable ]
56 kernel-5.15 available [ =stable ]
57 postgresql14 available [ =stable ]
58 firefox available [ =stable ]
59 lustre available [ =stable ]
60 php8.1 available [ =stable ]
61 awscli1 available [ =stable ]
ruby ์ค์น
# ๋ฃจ๋น ์ค์น
sudo amazon-linux-extras list | grep ruby
sudo amazon-linux-extras install ruby2.6
docker ์ค์น
sudo amazon-linux-extras list | grep docker
sudo amazon-linux-extras install docker
sudo usermod -a -G docker ec2-user
sudo setfacl -m user:ec2-user:rw /var/run/docker.sock
์์ ๊ณผ์ ์ ๋ชจ๋ ์๋ฃํ ํ์ ํฐ๋ฏธ๋์ ๋ซ์ ํ ๋ค์ ์ ์ ํด์ค๋๋ค!
docker-compose ์ค์น
sudo curl \
-L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/bin/docker-compose
sudo chmod +x /usr/bin/docker-compose
nginx ์ค์น
sudo amazon-linux-extras list | grep nginx
sudo amazon-linux-extras install nginx1
aws-cli ์ค์น
sudo amazon-linux-extras awscli1