본문 바로가기

Server/Ubuntu

Ubuntu 20.10 x64 + MySQL 5.7.33

반응형

MySQL을 설치하고 업데이트하는데 필요한 레포지토리 설정을 위한 패키기를 다운로드합니다.


파일 관리를 위해 폴더 생성 생략해도 상관없습니다. ^.^

root@masterDB:~# pwd
/root
root@masterDB:~# mkdir down
root@masterDB:~# ls
down  snap
root@masterDB:~# cd down
root@masterDB:~/down# pwd
/root/down

 

1. 다운로드

sudo wget wget https://dev.mysql.com/get/mysql-apt-config_0.8.12-1_all.deb

root@masterDB:~/down# sudo wget wget https://dev.mysql.com/get/mysql-apt-config_0.8.12-1_all.deb
--2021-03-21 08:43:56--  http://wget/
Resolving wget (wget)... failed: Temporary failure in name resolution.
wget: unable to resolve host address ‘wget’
--2021-03-21 08:43:56--  https://dev.mysql.com/get/mysql-apt-config_0.8.12-1_all.deb
Resolving dev.mysql.com (dev.mysql.com)... 137.254.60.11
Connecting to dev.mysql.com (dev.mysql.com)|137.254.60.11|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://repo.mysql.com//mysql-apt-config_0.8.12-1_all.deb [following]
--2021-03-21 08:43:56--  https://repo.mysql.com//mysql-apt-config_0.8.12-1_all.deb
Resolving repo.mysql.com (repo.mysql.com)... 23.50.239.110
Connecting to repo.mysql.com (repo.mysql.com)|23.50.239.110|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 36306 (35K) [application/x-debian-package]
Saving to: ‘mysql-apt-config_0.8.12-1_all.deb’

mysql-apt-config_0. 100%[===================>]  35.46K  --.-KB/s    in 0s

2021-03-21 08:43:56 (94.0 MB/s) - ‘mysql-apt-config_0.8.12-1_all.deb’ saved [36306/36306]

FINISHED --2021-03-21 08:43:56--
Total wall clock time: 0.9s
Downloaded: 1 files, 35K in 0s (94.0 MB/s)
root@masterDB:~/down#

 

2. 패키지 설치

sudo dpkg -i mysql-apt-config_0.8.12-1_all.deb

root@masterDB:~/down# sudo dpkg -i mysql-apt-config_0.8.12-1_all.deb

아래는 설치 화면입니다.  화면 순서로 설치하시면 됩니다.

 

3. APT 레포지토리 업데이트

root@masterDB:~/down# sudo apt update

 

4. 본격적인 MySQL 5.7.33 설치 과정

sudo apt-get install -s mysql-client=5.7.33-1ubuntu18.04

root@masterDB:~/down# sudo apt-get install -s mysql-client=5.7.33-1ubuntu18.04
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  eatmydata libeatmydata1 python3-importlib-metadata python3-jinja2
  python3-json-pointer python3-jsonpatch python3-jsonschema python3-markupsafe
  python3-more-itertools python3-pyrsistent python3-zipp
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libtinfo5 mysql-common mysql-community-client
The following NEW packages will be installed:
  libtinfo5 mysql-client mysql-common mysql-community-client
0 upgraded, 4 newly installed, 0 to remove and 67 not upgraded.
Inst libtinfo5 (6.2-1 Ubuntu:20.10/groovy [amd64])
Inst mysql-common (5.8+1.0.5ubuntu2 Ubuntu:20.10/groovy [all])
Inst mysql-community-client (5.7.33-1ubuntu18.04 MySQL:repo.mysql.com [amd64])
Inst mysql-client (5.7.33-1ubuntu18.04 MySQL:repo.mysql.com [amd64])
Conf libtinfo5 (6.2-1 Ubuntu:20.10/groovy [amd64])
Conf mysql-common (5.8+1.0.5ubuntu2 Ubuntu:20.10/groovy [all])
Conf mysql-community-client (5.7.33-1ubuntu18.04 MySQL:repo.mysql.com [amd64])
Conf mysql-client (5.7.33-1ubuntu18.04 MySQL:repo.mysql.com [amd64])
root@masterDB:~/down#

 

sudo apt-get install mysql-client=5.7.33-1ubuntu18.04

root@masterDB:~/down# sudo apt-get install mysql-client=5.7.33-1ubuntu18.04
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  eatmydata libeatmydata1 python3-importlib-metadata python3-jinja2
  python3-json-pointer python3-jsonpatch python3-jsonschema python3-markupsafe
  python3-more-itertools python3-pyrsistent python3-zipp
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libtinfo5 mysql-common mysql-community-client
The following NEW packages will be installed:
  libtinfo5 mysql-client mysql-common mysql-community-client
0 upgraded, 4 newly installed, 0 to remove and 55 not upgraded.
Need to get 14.5 MB of archives.
After this operation, 94.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://repo.mysql.com/apt/ubuntu bionic/mysql-5.7 amd64 mysql-community-client amd64 5.7.33-1ubuntu18.04 [14.4 MB]
Get:2 http://repo.mysql.com/apt/ubuntu bionic/mysql-5.7 amd64 mysql-client amd64 5.7.33-1ubuntu18.04 [67.6 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu groovy/universe amd64 libtinfo5 amd64 6.2-1 [82.9 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu groovy/main amd64 mysql-common all 5.8+1.0.5ubuntu2 [7496 B]
Fetched 14.5 MB in 1s (15.0 MB/s)
Selecting previously unselected package libtinfo5:amd64.
(Reading database ... 110210 files and directories currently installed.)
Preparing to unpack .../libtinfo5_6.2-1_amd64.deb ...
Unpacking libtinfo5:amd64 (6.2-1) ...
Selecting previously unselected package mysql-common.
Preparing to unpack .../mysql-common_5.8+1.0.5ubuntu2_all.deb ...
Unpacking mysql-common (5.8+1.0.5ubuntu2) ...
Selecting previously unselected package mysql-community-client.
Preparing to unpack .../mysql-community-client_5.7.33-1ubuntu18.04_amd64.deb ...
Unpacking mysql-community-client (5.7.33-1ubuntu18.04) ...
Selecting previously unselected package mysql-client.
Preparing to unpack .../mysql-client_5.7.33-1ubuntu18.04_amd64.deb ...
Unpacking mysql-client (5.7.33-1ubuntu18.04) ...
Setting up mysql-common (5.8+1.0.5ubuntu2) ...
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Setting up libtinfo5:amd64 (6.2-1) ...
Setting up mysql-community-client (5.7.33-1ubuntu18.04) ...
Setting up mysql-client (5.7.33-1ubuntu18.04) ...
Processing triggers for man-db (2.9.3-2) ...
Processing triggers for libc-bin (2.32-0ubuntu3) ...
root@masterDB:~/down#

 

sudo apt-get install -s mysql-community-server=5.7.33-1ubuntu18.04

root@masterDB:~/down# sudo apt-get install -s mysql-community-server=5.7.33-1ubuntu18.04
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  eatmydata libeatmydata1 python3-importlib-metadata python3-jinja2
  python3-json-pointer python3-jsonpatch python3-jsonschema python3-markupsafe
  python3-more-itertools python3-pyrsistent python3-zipp
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libmecab2
The following NEW packages will be installed:
  libmecab2 mysql-community-server
0 upgraded, 2 newly installed, 0 to remove and 56 not upgraded.
Inst libmecab2 (0.996-14 Ubuntu:20.10/groovy [amd64])
Inst mysql-community-server (5.7.33-1ubuntu18.04 MySQL:repo.mysql.com [amd64])
Conf libmecab2 (0.996-14 Ubuntu:20.10/groovy [amd64])
Conf mysql-community-server (5.7.33-1ubuntu18.04 MySQL:repo.mysql.com [amd64])
root@masterDB:~/down#

 

sudo apt-get install -s mysql-server=5.7.33-1ubuntu18.04

root@masterDB:~/down# sudo apt-get install -s mysql-server=5.7.33-1ubuntu18.04
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  eatmydata libeatmydata1 python3-importlib-metadata python3-jinja2
  python3-json-pointer python3-jsonpatch python3-jsonschema python3-markupsafe
  python3-more-itertools python3-pyrsistent python3-zipp
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libmecab2 mysql-community-server
The following NEW packages will be installed:
  libmecab2 mysql-community-server mysql-server
0 upgraded, 3 newly installed, 0 to remove and 56 not upgraded.
Inst libmecab2 (0.996-14 Ubuntu:20.10/groovy [amd64])
Inst mysql-community-server (5.7.33-1ubuntu18.04 MySQL:repo.mysql.com [amd64])
Inst mysql-server (5.7.33-1ubuntu18.04 MySQL:repo.mysql.com [amd64])
Conf libmecab2 (0.996-14 Ubuntu:20.10/groovy [amd64])
Conf mysql-community-server (5.7.33-1ubuntu18.04 MySQL:repo.mysql.com [amd64])
Conf mysql-server (5.7.33-1ubuntu18.04 MySQL:repo.mysql.com [amd64])
root@masterDB:~/down#

 

sudo apt-get install mysql-community-server=5.7.33-1ubuntu18.04

root@masterDB:~/down# sudo apt-get install mysql-community-server=5.7.33-1ubuntu18.04
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  eatmydata libeatmydata1 python3-importlib-metadata python3-jinja2
  python3-json-pointer python3-jsonpatch python3-jsonschema python3-markupsafe
  python3-more-itertools python3-pyrsistent python3-zipp
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libmecab2
The following NEW packages will be installed:
  libmecab2 mysql-community-server
0 upgraded, 2 newly installed, 0 to remove and 56 not upgraded.
Need to get 36.7 MB of archives.
After this operation, 221 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://repo.mysql.com/apt/ubuntu bionic/mysql-5.7 amd64 mysql-community-server amd64 5.7.33-1ubuntu18.04 [36.4 MB]
Get:2 http://us.archive.ubuntu.com/ubuntu groovy/main amd64 libmecab2 amd64 0.996-14 [233 kB]
Fetched 36.7 MB in 1s (35.6 MB/s)
Preconfiguring packages ...
Selecting previously unselected package libmecab2:amd64.
(Reading database ... 110295 files and directories currently installed.)
Preparing to unpack .../libmecab2_0.996-14_amd64.deb ...
Unpacking libmecab2:amd64 (0.996-14) ...
Selecting previously unselected package mysql-community-server.
Preparing to unpack .../mysql-community-server_5.7.33-1ubuntu18.04_amd64.deb ...
Unpacking mysql-community-server (5.7.33-1ubuntu18.04) ...
Setting up libmecab2:amd64 (0.996-14) ...
Setting up mysql-community-server (5.7.33-1ubuntu18.04) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Created symlink /etc/systemd/system/multi-user.target.wants/mysql.service → /lib/systemd/system/mysql.service.
Processing triggers for systemd (246.6-1ubuntu1) ...
Processing triggers for man-db (2.9.3-2) ...
Processing triggers for libc-bin (2.32-0ubuntu3) ...
root@masterDB:~/down#

 

root 관리자 비밀번호를 설정합니다.

sudo apt-get install mysql-server=5.7.33-1ubuntu18.04

root@masterDB:~/down# sudo apt-get install mysql-server=5.7.33-1ubuntu18.04
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  eatmydata libeatmydata1 python3-importlib-metadata python3-jinja2
  python3-json-pointer python3-jsonpatch python3-jsonschema python3-markupsafe
  python3-more-itertools python3-pyrsistent python3-zipp
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  mysql-server
0 upgraded, 1 newly installed, 0 to remove and 56 not upgraded.
Need to get 67.6 kB of archives.
After this operation, 77.8 kB of additional disk space will be used.
Get:1 http://repo.mysql.com/apt/ubuntu bionic/mysql-5.7 amd64 mysql-server amd64 5.7.33-1ubuntu18.04 [67.6 kB]
Fetched 67.6 kB in 0s (420 kB/s)
Selecting previously unselected package mysql-server.
(Reading database ... 110463 files and directories currently installed.)
Preparing to unpack .../mysql-server_5.7.33-1ubuntu18.04_amd64.deb ...
Unpacking mysql-server (5.7.33-1ubuntu18.04) ...
Setting up mysql-server (5.7.33-1ubuntu18.04) ...
root@masterDB:~/down#

 

5. MySQL 5.7.33가 모두 설치가 완료되었습니다. 

mysql -V 설치 버전 확인합니다.

root@masterDB:~/down# mysql -V
mysql  Ver 14.14 Distrib 5.7.33, for Linux (x86_64) using  EditLine wrapper
root@masterDB:~/down#

 

반응형