HyunJun 기술 블로그

PM (Package Manager), apt, apt-get 본문

Linux

PM (Package Manager), apt, apt-get

공부 좋아 2023. 6. 22. 09:10
728x90
반응형

Package Manager

패키지 매니저(package manager)는 소프트웨어를 설치, 업데이트, 제거하고 관리하는 도구나 시스템이다. 패키지 매니저는 운영 체제나 소프트웨어 배포판의 일부로 제공되며, 사용자가 소프트웨어를 쉽게 설치하고 유지 관리할 수 있도록 돕는 역할을 한다. 패키지 매니저의 주요 기능은 다음과 같다 

 

  1. 패키지 설치: 패키지 매니저를 사용하여 새로운 소프트웨어 패키지를 설치할 수 있다. 패키지는 종속성 및 설정과 함께 제공되며, 이러한 정보를 기반으로 소프트웨어를 시스템에 설치한다. 
  2. 패키지 업데이트: 패키지 매니저를 사용하여 시스템에 설치된 소프트웨어 패키지를 최신 버전으로 업데이트할 수 있다. 이를 통해 보안 패치와 새로운 기능을 받아들일 수 있다. 
  3. 패키지 제거: 더 이상 필요하지 않은 소프트웨어 패키지를 제거할 수 있다. 패키지 매니저는 제거 시 해당 패키지와 종속성을 올바르게 관리하여 시스템의 안정성을 유지한다. 
  4. 의존성 관리: 패키지는 종종 다른 패키지에 의존하는 경우가 있다. 패키지 매니저는 이러한 종속성을 자동으로 처리하여 필요한 모든 패키지를 설치하거나 업데이트한다. 
  5. 패키지 검색 및 정보: 패키지 매니저를 사용하여 특정 소프트웨어 패키지를 검색하고, 패키지에 대한 정보나 문서를 확인할 수 있다. 

리눅스와 유닉스 기반 시스템에서는 여러 가지 패키지 매니저가 사용되며, 각각의 배포판마다 조금씩 다른 형식을 가지고 있을 수 있다. 몇 가지 유명한 패키지 매니저로는 APT (Advanced Package Tool), YUM (Yellowdog Updater, Modified), DNF (Dandified YUM), Pacman, Zypper, Homebrew 등이 있다. 이러한 패키지 매니저는 시스템 관리 및 소프트웨어 배포를 효율적으로 수행하는 데 도움을 준다.

 

1) apt(Advanced Package Tool), apt-get

데비안 계열(Ubuntu, ..) 계열에서 패키지를 설치 및 관리할 때에는 기본적으로 apt 혹은 apt-get을 사용한다. 이 apt와 apt-get은 큰 차이는 없고, 기존에는 apt-get이 오랫동안 사용되어 오다가, 다양한 기능들이 추가되고 그에 따른 많은 옵션들이 제공되었다. 그러다 보니 명령어의 사용이 너무 복잡해지고, 지저분해지는 경향이 있었는데 apt-get에서 주요하고 자주 사용되는 옵션들을 추려내고 조금 더 사용자 친화적으로 만든 것이 apt이다. 해서 단순 소프트웨어 설치, 관리의 경우 apt를 추천하고, 스크립트를 짤 때에는 apt-get으로 다양한 기능들을 사용하는 것을 추천한다.

 

 

2) apt update & apt upgrade

apt update: 이 명령은 패키지 데이터베이스를 업데이트한다. 패키지 데이터베이스는 소프트웨어 저장소(레포지토리)에서 사용 가능한 패키지 목록과 버전 정보를 포함한다. apt update를 실행하면 시스템은 소프트웨어 저장소로부터 최신 패키지 정보를 가져와 로컬 데이터베이스를 업데이트한다. 이로써 최신 패키지 정보를 확인할 수 있게 된다.

 

apt upgrade: 이 명령은 시스템에 설치된 패키지를 최신 버전으로 업그레이드한다. apt update를 통해 최신 패키지 정보를 업데이트한 후에 apt upgrade 명령을 실행하면, 현재 시스템에 설치된 패키지들 중에서 새로운 버전이 나온 것이 있다면 해당 패키지들을 최신 버전으로 업그레이드한다.

 

요약하자면, apt update는 패키지 데이터베이스를 업데이트하여 최신 패키지 정보를 가져오고, apt upgrade는 시스템에 설치된 패키지를 최신 버전으로 업그레이드하는 명령이다. 따라서 일반적으로 apt update를 먼저 실행한 후에 apt upgrade를 실행하여 시스템을 최신 상태로 유지할 수 있다.

 

apt 패키지 관리자로 설치된 패키지(응용 프로그램)가 아니라면, apt upgrade를 해도 업데이트 하지 못한다. 즉, apt로 다운로드한 패키지들만 apt로 관리가 가능하다.

 

~$ sudo apt update
Hit:1 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:3 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-backports InRelease [83.3 kB]
Get:4 https://download.docker.com/linux/ubuntu bionic InRelease [64.4 kB]            
Get:5 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]          
Hit:6 http://ubuntu.openvidu.io/6.13.0 bionic InRelease                              
Fetched 325 kB in 1s (344 kB/s)                               
Reading package lists... Done
Building dependency tree       
Reading state information... Done
37 packages can be upgraded. Run 'apt list --upgradable' to see them.

 

~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  docker-scan-plugin linux-aws-5.4-headers-5.4.0-1094
  linux-aws-5.4-headers-5.4.0-1096 linux-aws-5.4-headers-5.4.0-1099
  linux-aws-5.4-headers-5.4.0-1100
Use 'sudo apt autoremove' to remove them.
#
# News about significant security updates, features and services will
# appear here to raise awareness and perhaps tease /r/Linux ;)
# Use 'pro config set apt_news=false' to hide this and future APT news.
#
Receive additional future security updates with Ubuntu Pro.
Learn more about Ubuntu Pro on AWS at https://ubuntu.com/aws/pro
The following packages will be upgraded:
  apt apt-transport-https apt-utils containerd.io distro-info-data
  docker-buildx-plugin docker-ce docker-ce-cli docker-ce-rootless-extras
  docker-compose-plugin grub-common grub-efi-amd64-bin grub-efi-amd64-signed grub-pc
  grub-pc-bin grub2-common hibagent iptables libapt-inst2.0 libapt-pkg5.0 libip4tc0
  libip6tc0 libiptc0 liblxc-common liblxc1 libunwind8 libxtables12 mokutil
  open-vm-tools python-apt-common python3-apt python3-software-properties
  shim-signed software-properties-common tcpdump ubuntu-advantage-tools
  update-notifier-common
37 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 122 MB of archives.
After this operation, 23.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libapt-pkg5.0 amd64 1.6.17 [812 kB]
Get:2 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libapt-inst2.0 amd64 1.6.17 [54.6 kB]
Get:3 https://download.docker.com/linux/ubuntu bionic/stable amd64 containerd.io amd64 1.6.21-1 [28.3 MB]
Get:4 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 apt amd64 1.6.17 [1206 kB]
Get:5 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 apt-utils amd64 1.6.17 [206 kB]
Get:6 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 python-apt-common all 1.6.6 [16.9 kB]
Get:7 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-apt amd64 1.6.6 [149 kB]
Get:8 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 update-notifier-common all 3.192.1.19 [173 kB]
Get:9 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 distro-info-data all 0.37ubuntu0.17 [4872 B]
Get:10 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 iptables amd64 1.6.1-2ubuntu2.1 [269 kB]
Get:11 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libxtables12 amd64 1.6.1-2ubuntu2.1 [28.1 kB]
Get:12 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libip6tc0 amd64 1.6.1-2ubuntu2.1 [20.1 kB]
Get:13 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libiptc0 amd64 1.6.1-2ubuntu2.1 [9468 B]
Get:14 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libip4tc0 amd64 1.6.1-2ubuntu2.1 [19.8 kB]
Get:15 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 ubuntu-advantage-tools amd64 28.1~18.04 [178 kB]
Get:16 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 tcpdump amd64 4.9.3-0ubuntu0.18.04.3 [364 kB]
Get:17 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 apt-transport-https all 1.6.17 [1692 B]
Get:18 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 grub2-common amd64 2.02-2ubuntu8.26 [533 kB]
Get:19 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 grub-pc amd64 2.02-2ubuntu8.26 [138 kB]
Get:20 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 grub-pc-bin amd64 2.02-2ubuntu8.26 [901 kB]
Get:21 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 grub-common amd64 2.02-2ubuntu8.26 [1773 kB]
Get:22 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 grub-efi-amd64-signed amd64 1.187.3~18.04.1+2.06-2ubuntu14.1 [1343 kB]
Get:23 https://download.docker.com/linux/ubuntu bionic/stable amd64 docker-buildx-plugin amd64 0.10.5-1~ubuntu.18.04~bionic [26.1 MB]
Get:24 https://download.docker.com/linux/ubuntu bionic/stable amd64 docker-ce-cli amd64 5:24.0.2-1~ubuntu.18.04~bionic [13.3 MB]
Get:25 https://download.docker.com/linux/ubuntu bionic/stable amd64 docker-ce amd64 5:24.0.2-1~ubuntu.18.04~bionic [22.9 MB]
Get:26 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 grub-efi-amd64-bin amd64 2.06-2ubuntu14.1 [1591 kB]
Get:27 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 hibagent all 1.0.1-0ubuntu1.18.04.1 [11.3 kB]
Get:28 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 liblxc-common amd64 3.0.3-0ubuntu1~18.04.3 [438 kB]
Get:29 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 liblxc1 amd64 3.0.3-0ubuntu1~18.04.3 [263 kB]
Get:30 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libunwind8 amd64 1.2.1-8ubuntu0.1 [47.5 kB]
Get:31 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 mokutil amd64 0.6.0-2~18.04.1 [26.5 kB]
Get:32 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 software-properties-common all 0.96.24.32.22 [9880 B]
Get:33 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-software-properties all 0.96.24.32.22 [20.5 kB]
Get:34 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 shim-signed amd64 1.37~18.04.13+15.7-0ubuntu1 [667 kB]
Get:35 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 open-vm-tools amd64 2:11.0.5-4ubuntu0.18.04.3 [544 kB]
Get:36 https://download.docker.com/linux/ubuntu bionic/stable amd64 docker-ce-rootless-extras amd64 5:24.0.2-1~ubuntu.18.04~bionic [9014 kB]
Get:37 https://download.docker.com/linux/ubuntu bionic/stable amd64 docker-compose-plugin amd64 2.18.1-1~ubuntu.18.04~bionic [10.9 MB]
Fetched 122 MB in 3s (41.0 MB/s)             
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 251490 files and directories currently installed.)
Preparing to unpack .../libapt-pkg5.0_1.6.17_amd64.deb ...
Unpacking libapt-pkg5.0:amd64 (1.6.17) over (1.6.14) ...
Setting up libapt-pkg5.0:amd64 (1.6.17) ...
(Reading database ... 251490 files and directories currently installed.)
Preparing to unpack .../libapt-inst2.0_1.6.17_amd64.deb ...
Unpacking libapt-inst2.0:amd64 (1.6.17) over (1.6.14) ...
Preparing to unpack .../archives/apt_1.6.17_amd64.deb ...
Unpacking apt (1.6.17) over (1.6.14) ...
Setting up apt (1.6.17) ...
Removing obsolete conffile /etc/kernel/postinst.d/apt-auto-removal ...
(Reading database ... 251489 files and directories currently installed.)
Preparing to unpack .../00-apt-utils_1.6.17_amd64.deb ...
Unpacking apt-utils (1.6.17) over (1.6.14) ...
Preparing to unpack .../01-python-apt-common_1.6.6_all.deb ...
Unpacking python-apt-common (1.6.6) over (1.6.5ubuntu0.7) ...
Preparing to unpack .../02-python3-apt_1.6.6_amd64.deb ...
Unpacking python3-apt (1.6.6) over (1.6.5ubuntu0.7) ...
Preparing to unpack .../03-update-notifier-common_3.192.1.19_all.deb ...
Unpacking update-notifier-common (3.192.1.19) over (3.192.1.12) ...
Preparing to unpack .../04-distro-info-data_0.37ubuntu0.17_all.deb ...
Unpacking distro-info-data (0.37ubuntu0.17) over (0.37ubuntu0.15) ...
Preparing to unpack .../05-iptables_1.6.1-2ubuntu2.1_amd64.deb ...
Unpacking iptables (1.6.1-2ubuntu2.1) over (1.6.1-2ubuntu2) ...
Preparing to unpack .../06-libxtables12_1.6.1-2ubuntu2.1_amd64.deb ...
Unpacking libxtables12:amd64 (1.6.1-2ubuntu2.1) over (1.6.1-2ubuntu2) ...
Preparing to unpack .../07-libip6tc0_1.6.1-2ubuntu2.1_amd64.deb ...
Unpacking libip6tc0:amd64 (1.6.1-2ubuntu2.1) over (1.6.1-2ubuntu2) ...
Preparing to unpack .../08-libiptc0_1.6.1-2ubuntu2.1_amd64.deb ...
Unpacking libiptc0:amd64 (1.6.1-2ubuntu2.1) over (1.6.1-2ubuntu2) ...
Preparing to unpack .../09-libip4tc0_1.6.1-2ubuntu2.1_amd64.deb ...
Unpacking libip4tc0:amd64 (1.6.1-2ubuntu2.1) over (1.6.1-2ubuntu2) ...
Preparing to unpack .../10-ubuntu-advantage-tools_28.1~18.04_amd64.deb ...
Unpacking ubuntu-advantage-tools (28.1~18.04) over (27.12~18.04.1) ...
Preparing to unpack .../11-tcpdump_4.9.3-0ubuntu0.18.04.3_amd64.deb ...
Unpacking tcpdump (4.9.3-0ubuntu0.18.04.3) over (4.9.3-0ubuntu0.18.04.2) ...
Preparing to unpack .../12-apt-transport-https_1.6.17_all.deb ...
Unpacking apt-transport-https (1.6.17) over (1.6.14) ...
Preparing to unpack .../13-containerd.io_1.6.21-1_amd64.deb ...
Unpacking containerd.io (1.6.21-1) over (1.6.16-1) ...
Preparing to unpack .../14-docker-buildx-plugin_0.10.5-1~ubuntu.18.04~bionic_amd64.deb ...
Unpacking docker-buildx-plugin (0.10.5-1~ubuntu.18.04~bionic) over (0.10.2-1~ubuntu.18.04~bionic) ...
Preparing to unpack .../15-docker-ce-cli_5%3a24.0.2-1~ubuntu.18.04~bionic_amd64.deb ...
Unpacking docker-ce-cli (5:24.0.2-1~ubuntu.18.04~bionic) over (5:23.0.0-1~ubuntu.18.04~bionic) ...
Preparing to unpack .../16-docker-ce_5%3a24.0.2-1~ubuntu.18.04~bionic_amd64.deb ...
Unpacking docker-ce (5:24.0.2-1~ubuntu.18.04~bionic) over (5:23.0.0-1~ubuntu.18.04~bionic) ...
Preparing to unpack .../17-docker-ce-rootless-extras_5%3a24.0.2-1~ubuntu.18.04~bionic_amd64.deb ...
Unpacking docker-ce-rootless-extras (5:24.0.2-1~ubuntu.18.04~bionic) over (5:23.0.0-1~ubuntu.18.04~bionic) ...
Preparing to unpack .../18-docker-compose-plugin_2.18.1-1~ubuntu.18.04~bionic_amd64.deb ...
Unpacking docker-compose-plugin (2.18.1-1~ubuntu.18.04~bionic) over (2.15.1-1~ubuntu.18.04~bionic) ...
Preparing to unpack .../19-grub2-common_2.02-2ubuntu8.26_amd64.deb ...
Unpacking grub2-common (2.02-2ubuntu8.26) over (2.02-2ubuntu8.25) ...
Preparing to unpack .../20-grub-pc_2.02-2ubuntu8.26_amd64.deb ...
Unpacking grub-pc (2.02-2ubuntu8.26) over (2.02-2ubuntu8.25) ...
Preparing to unpack .../21-grub-pc-bin_2.02-2ubuntu8.26_amd64.deb ...
Unpacking grub-pc-bin (2.02-2ubuntu8.26) over (2.02-2ubuntu8.25) ...
Preparing to unpack .../22-grub-common_2.02-2ubuntu8.26_amd64.deb ...
Unpacking grub-common (2.02-2ubuntu8.26) over (2.02-2ubuntu8.25) ...
Preparing to unpack .../23-grub-efi-amd64-signed_1.187.3~18.04.1+2.06-2ubuntu14.1_amd64.deb ...
Unpacking grub-efi-amd64-signed (1.187.3~18.04.1+2.06-2ubuntu14.1) over (1.173.2~18.04.1+2.04-1ubuntu47.4) ...
Preparing to unpack .../24-grub-efi-amd64-bin_2.06-2ubuntu14.1_amd64.deb ...
Unpacking grub-efi-amd64-bin (2.06-2ubuntu14.1) over (2.04-1ubuntu47.4) ...
Preparing to unpack .../25-hibagent_1.0.1-0ubuntu1.18.04.1_all.deb ...
Unpacking hibagent (1.0.1-0ubuntu1.18.04.1) over (1.0.1-0ubuntu1) ...
Preparing to unpack .../26-liblxc-common_3.0.3-0ubuntu1~18.04.3_amd64.deb ...
Unpacking liblxc-common (3.0.3-0ubuntu1~18.04.3) over (3.0.3-0ubuntu1~18.04.1) ...
Preparing to unpack .../27-liblxc1_3.0.3-0ubuntu1~18.04.3_amd64.deb ...
Unpacking liblxc1 (3.0.3-0ubuntu1~18.04.3) over (3.0.3-0ubuntu1~18.04.1) ...
Preparing to unpack .../28-libunwind8_1.2.1-8ubuntu0.1_amd64.deb ...
Unpacking libunwind8:amd64 (1.2.1-8ubuntu0.1) over (1.2.1-8) ...
Preparing to unpack .../29-mokutil_0.6.0-2~18.04.1_amd64.deb ...
Unpacking mokutil (0.6.0-2~18.04.1) over (0.3.0+1538710437.fb6250f-0ubuntu2~18.04.1) ...
Preparing to unpack .../30-software-properties-common_0.96.24.32.22_all.deb ...
Unpacking software-properties-common (0.96.24.32.22) over (0.96.24.32.20) ...
Preparing to unpack .../31-python3-software-properties_0.96.24.32.22_all.deb ...
Unpacking python3-software-properties (0.96.24.32.22) over (0.96.24.32.20) ...
Preparing to unpack .../32-shim-signed_1.37~18.04.13+15.7-0ubuntu1_amd64.deb ...
Unpacking shim-signed (1.37~18.04.13+15.7-0ubuntu1) over (1.37~18.04.11+15.4-0ubuntu9) ...
Preparing to unpack .../33-open-vm-tools_2%3a11.0.5-4ubuntu0.18.04.3_amd64.deb ...
Unpacking open-vm-tools (2:11.0.5-4ubuntu0.18.04.3) over (2:11.0.5-4ubuntu0.18.04.2) ...
Setting up mokutil (0.6.0-2~18.04.1) ...
Setting up python-apt-common (1.6.6) ...
Setting up libapt-inst2.0:amd64 (1.6.17) ...
Setting up apt-transport-https (1.6.17) ...
Setting up containerd.io (1.6.21-1) ...
Setting up python3-apt (1.6.6) ...
Setting up libip4tc0:amd64 (1.6.1-2ubuntu2.1) ...
Setting up update-notifier-common (3.192.1.19) ...
Setting up apt-utils (1.6.17) ...
Setting up open-vm-tools (2:11.0.5-4ubuntu0.18.04.3) ...
Setting up docker-ce-rootless-extras (5:24.0.2-1~ubuntu.18.04~bionic) ...
Setting up libiptc0:amd64 (1.6.1-2ubuntu2.1) ...
Setting up distro-info-data (0.37ubuntu0.17) ...
Setting up hibagent (1.0.1-0ubuntu1.18.04.1) ...
Setting up tcpdump (4.9.3-0ubuntu0.18.04.3) ...
Installing new version of config file /etc/apparmor.d/usr.sbin.tcpdump ...
Setting up libunwind8:amd64 (1.2.1-8ubuntu0.1) ...
Setting up docker-buildx-plugin (0.10.5-1~ubuntu.18.04~bionic) ...
Setting up libxtables12:amd64 (1.6.1-2ubuntu2.1) ...
Setting up grub-common (2.02-2ubuntu8.26) ...
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Setting up docker-compose-plugin (2.18.1-1~ubuntu.18.04~bionic) ...
Setting up python3-software-properties (0.96.24.32.22) ...
Setting up docker-ce-cli (5:24.0.2-1~ubuntu.18.04~bionic) ...
Setting up libip6tc0:amd64 (1.6.1-2ubuntu2.1) ...
Setting up software-properties-common (0.96.24.32.22) ...
Setting up ubuntu-advantage-tools (28.1~18.04) ...
Installing new version of config file /etc/apt/apt.conf.d/20apt-esm-hook.conf ...
Installing new version of config file /etc/ubuntu-advantage/help_data.yaml ...
Installing new version of config file /etc/ubuntu-advantage/uaclient.conf ...
Installing new version of config file /etc/update-motd.d/91-contract-ua-esm-status ...
Removing obsolete conffile /etc/update-motd.d/88-esm-announce ...
Setting up grub-efi-amd64-bin (2.06-2ubuntu14.1) ...
Setting up grub-pc-bin (2.02-2ubuntu8.26) ...
Setting up grub2-common (2.02-2ubuntu8.26) ...
Setting up iptables (1.6.1-2ubuntu2.1) ...
Setting up docker-ce (5:24.0.2-1~ubuntu.18.04~bionic) ...
Setting up grub-pc (2.02-2ubuntu8.26) ...
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50-cloudimg-settings.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-1103-aws
Found initrd image: /boot/initrd.img-5.4.0-1103-aws
Found linux image: /boot/vmlinuz-5.4.0-1101-aws
Found initrd image: /boot/initrd.img-5.4.0-1101-aws
Found linux image: /boot/vmlinuz-5.4.0-1097-aws
Found initrd image: /boot/initrd.img-5.4.0-1097-aws
Found linux image: /boot/vmlinuz-5.4.0-1092-aws
Found initrd image: /boot/initrd.img-5.4.0-1092-aws
done
Setting up grub-efi-amd64-signed (1.187.3~18.04.1+2.06-2ubuntu14.1) ...
Installing for x86_64-efi platform.
EFI variables are not supported on this system.
Installation finished. No error reported.
Setting up shim-signed (1.37~18.04.13+15.7-0ubuntu1) ...
update-alternatives: using /usr/lib/shim/shimx64.efi.signed.latest to provide /usr/lib/shim/shimx64.efi.signed (shimx64.efi.signed) in auto mode
Installing for x86_64-efi platform.
EFI variables are not supported on this system.
Installation finished. No error reported.
Setting up liblxc1 (3.0.3-0ubuntu1~18.04.3) ...
Setting up liblxc-common (3.0.3-0ubuntu1~18.04.3) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for install-info (6.5.0.dfsg.1-2) ...
Processing triggers for libc-bin (2.27-3ubuntu1.6) ...
Processing triggers for systemd (237-3ubuntu10.57) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for dbus (1.12.2-1ubuntu1.4) ...
참고로 Mac OS는 Package Manager로 homebrew를 사용하는 것을 추천한다.

 

 

3) mysql-server 패키지 설치해 보기.

~$ sudo apt install mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  docker-scan-plugin linux-aws-5.4-headers-5.4.0-1094 linux-aws-5.4-headers-5.4.0-1096
  linux-aws-5.4-headers-5.4.0-1099 linux-aws-5.4-headers-5.4.0-1100 linux-aws-5.4-headers-5.4.0-1101
  linux-headers-5.4.0-1101-aws linux-image-5.4.0-1101-aws linux-modules-5.4.0-1101-aws
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libaio1 libcgi-fast-perl libcgi-pm-perl libencode-locale-perl libfcgi-perl libhtml-parser-perl
  libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl
  liblwp-mediatypes-perl libtimedate-perl liburi-perl mysql-client-5.7 mysql-client-core-5.7
  mysql-server-5.7 mysql-server-core-5.7
Suggested packages:
  libdata-dump-perl libipc-sharedcache-perl libwww-perl mailx tinyca
The following NEW packages will be installed:
  libaio1 libcgi-fast-perl libcgi-pm-perl libencode-locale-perl libfcgi-perl libhtml-parser-perl
  libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl
  liblwp-mediatypes-perl libtimedate-perl liburi-perl mysql-client-5.7 mysql-client-core-5.7 mysql-server
  mysql-server-5.7 mysql-server-core-5.7
0 upgraded, 19 newly installed, 0 to remove and 0 not upgraded.
Need to get 20.0 MB of archives.
After this operation, 157 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libaio1 amd64 0.3.110-5ubuntu0.1 [6476 B]
Get:2 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 mysql-client-core-5.7 amd64 5.7.42-0ubuntu0.18.04.1 [6752 kB]
Get:3 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 mysql-client-5.7 amd64 5.7.42-0ubuntu0.18.04.1 [2028 kB]
Get:4 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 mysql-server-core-5.7 amd64 5.7.42-0ubuntu0.18.04.1 [7542 kB]
Get:5 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 mysql-server-5.7 amd64 5.7.42-0ubuntu0.18.04.1 [3011 kB]
Get:6 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 libhtml-tagset-perl all 3.20-3 [12.1 kB]
Get:7 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 liburi-perl all 1.73-1 [77.2 kB]
Get:8 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 libhtml-parser-perl amd64 3.72-3build1 [85.9 kB]
Get:9 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 libcgi-pm-perl all 4.38-1 [185 kB]
Get:10 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 libfcgi-perl amd64 0.78-2build1 [32.8 kB]
Get:11 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 libcgi-fast-perl all 1:2.13-1 [9940 B]
Get:12 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 libencode-locale-perl all 1.05-1 [12.3 kB]
Get:13 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 libhtml-template-perl all 2.97-1 [59.0 kB]
Get:14 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 libtimedate-perl all 2.3000-2 [37.5 kB]
Get:15 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 libhttp-date-perl all 6.02-1 [10.4 kB]
Get:16 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 libio-html-perl all 1.001-1 [14.9 kB]
Get:17 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 liblwp-mediatypes-perl all 6.02-1 [21.7 kB]
Get:18 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 libhttp-message-perl all 6.14-1 [72.1 kB]
Get:19 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 mysql-server all 5.7.42-0ubuntu0.18.04.1 [9944 B]
Fetched 20.0 MB in 0s (42.6 MB/s)  
Preconfiguring packages ...
Selecting previously unselected package libaio1:amd64.
(Reading database ... 251542 files and directories currently installed.)
Preparing to unpack .../00-libaio1_0.3.110-5ubuntu0.1_amd64.deb ...
Unpacking libaio1:amd64 (0.3.110-5ubuntu0.1) ...
Selecting previously unselected package mysql-client-core-5.7.
Preparing to unpack .../01-mysql-client-core-5.7_5.7.42-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mysql-client-core-5.7 (5.7.42-0ubuntu0.18.04.1) ...
Selecting previously unselected package mysql-client-5.7.
Preparing to unpack .../02-mysql-client-5.7_5.7.42-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mysql-client-5.7 (5.7.42-0ubuntu0.18.04.1) ...
Selecting previously unselected package mysql-server-core-5.7.
Preparing to unpack .../03-mysql-server-core-5.7_5.7.42-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mysql-server-core-5.7 (5.7.42-0ubuntu0.18.04.1) ...
Selecting previously unselected package mysql-server-5.7.
Preparing to unpack .../04-mysql-server-5.7_5.7.42-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mysql-server-5.7 (5.7.42-0ubuntu0.18.04.1) ...
Selecting previously unselected package libhtml-tagset-perl.
Preparing to unpack .../05-libhtml-tagset-perl_3.20-3_all.deb ...
Unpacking libhtml-tagset-perl (3.20-3) ...
Selecting previously unselected package liburi-perl.
Preparing to unpack .../06-liburi-perl_1.73-1_all.deb ...
Unpacking liburi-perl (1.73-1) ...
Selecting previously unselected package libhtml-parser-perl.
Preparing to unpack .../07-libhtml-parser-perl_3.72-3build1_amd64.deb ...
Unpacking libhtml-parser-perl (3.72-3build1) ...
Selecting previously unselected package libcgi-pm-perl.
Preparing to unpack .../08-libcgi-pm-perl_4.38-1_all.deb ...
Unpacking libcgi-pm-perl (4.38-1) ...
Selecting previously unselected package libfcgi-perl.
Preparing to unpack .../09-libfcgi-perl_0.78-2build1_amd64.deb ...
Unpacking libfcgi-perl (0.78-2build1) ...
Selecting previously unselected package libcgi-fast-perl.
Preparing to unpack .../10-libcgi-fast-perl_1%3a2.13-1_all.deb ...
Unpacking libcgi-fast-perl (1:2.13-1) ...
Selecting previously unselected package libencode-locale-perl.
Preparing to unpack .../11-libencode-locale-perl_1.05-1_all.deb ...
Unpacking libencode-locale-perl (1.05-1) ...
Selecting previously unselected package libhtml-template-perl.
Preparing to unpack .../12-libhtml-template-perl_2.97-1_all.deb ...
Unpacking libhtml-template-perl (2.97-1) ...
Selecting previously unselected package libtimedate-perl.
Preparing to unpack .../13-libtimedate-perl_2.3000-2_all.deb ...
Unpacking libtimedate-perl (2.3000-2) ...
Selecting previously unselected package libhttp-date-perl.
Preparing to unpack .../14-libhttp-date-perl_6.02-1_all.deb ...
Unpacking libhttp-date-perl (6.02-1) ...
Selecting previously unselected package libio-html-perl.
Preparing to unpack .../15-libio-html-perl_1.001-1_all.deb ...
Unpacking libio-html-perl (1.001-1) ...
Selecting previously unselected package liblwp-mediatypes-perl.
Preparing to unpack .../16-liblwp-mediatypes-perl_6.02-1_all.deb ...
Unpacking liblwp-mediatypes-perl (6.02-1) ...
Selecting previously unselected package libhttp-message-perl.
Preparing to unpack .../17-libhttp-message-perl_6.14-1_all.deb ...
Unpacking libhttp-message-perl (6.14-1) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../18-mysql-server_5.7.42-0ubuntu0.18.04.1_all.deb ...
Unpacking mysql-server (5.7.42-0ubuntu0.18.04.1) ...
Setting up libhtml-tagset-perl (3.20-3) ...
Setting up libencode-locale-perl (1.05-1) ...
Setting up libtimedate-perl (2.3000-2) ...
Setting up libio-html-perl (1.001-1) ...
Setting up liblwp-mediatypes-perl (6.02-1) ...
Setting up libaio1:amd64 (0.3.110-5ubuntu0.1) ...
Setting up liburi-perl (1.73-1) ...
Setting up libhtml-parser-perl (3.72-3build1) ...
Setting up libcgi-pm-perl (4.38-1) ...
Setting up mysql-client-core-5.7 (5.7.42-0ubuntu0.18.04.1) ...
Setting up libfcgi-perl (0.78-2build1) ...
Setting up libhttp-date-perl (6.02-1) ...
Setting up libhtml-template-perl (2.97-1) ...
Setting up mysql-server-core-5.7 (5.7.42-0ubuntu0.18.04.1) ...
Setting up libcgi-fast-perl (1:2.13-1) ...
Setting up libhttp-message-perl (6.14-1) ...
Setting up mysql-client-5.7 (5.7.42-0ubuntu0.18.04.1) ...
Setting up mysql-server-5.7 (5.7.42-0ubuntu0.18.04.1) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Renaming removed key_buffer and myisam-recover options (if present)
Created symlink /etc/systemd/system/multi-user.target.wants/mysql.service → /lib/systemd/system/mysql.service.
Setting up mysql-server (5.7.42-0ubuntu0.18.04.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1.6) ...
Processing triggers for systemd (237-3ubuntu10.57) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...

 

설치 확인하기 (버전 확인하기)

~$ mysql --version
mysql  Ver 14.14 Distrib 5.7.42, for Linux (x86_64) using  EditLine wrapper
728x90
반응형
Comments