프록시 환경에서 Ubuntu Server 20.04에 MariaDB를 추가할 때 막히면

보면서 자신의 보도 학교의 프록시 환경에 있는 서버에 마리아 DB를 넣으려다 앱 창고 관련으로 꽉 찼다.

curl-LsS로... 그만.

curl -LsS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash해보고 여기 멈춰서...
[info] Repository file successfully written to /etc/apt/sources.list.d/mariadb.list
[info] Adding trusted package signing keys...

어쨌든 수동으로 deb 패키지를 추가해 보도록 하겠습니다.


여기.에서 옵션--write-to-stdout이 있음을 알아차렸기 때문에 회전을 시도해 보세요.
# curl -LsS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash -s -- --write-to-stdout
[info] If run without --write-to-stdout, this script will create /etc/apt/preferences.d/mariadb-enterprise.pref to give packages from MariaDB repositories highest priority, in order to avoid conflicts with packages from OS and other repositories.
# MariaDB Server
# To use a different major version of the server, or to pin to a specific minor version, change URI below.
deb http://downloads.mariadb.com/MariaDB/mariadb-10.5/repo/ubuntu focal main

deb http://downloads.mariadb.com/MariaDB/mariadb-10.5/repo/ubuntu focal main/debug

# MariaDB MaxScale
# To use the latest stable release of MaxScale, use "latest" as the version
# To use the latest beta (or stable if no current beta) release of MaxScale, use "beta" as the version
deb https://dlm.mariadb.com/repo/maxscale/latest/ubuntu focal main

# MariaDB Tools
deb http://downloads.mariadb.com/Tools/ubuntu focal main
[info] If run without --skip-key-import/--write-to-stdout, this script will import package signing keys used by MariaDB
deb라는 표시를 찾았기 때문에 수동으로 추가했다.
$ sudo nano /etc/apt/sources.list

----- sources.list
︙
deb http://downloads.mariadb.com/MariaDB/mariadb-10.5/repo/ubuntu focal main

deb http://downloads.mariadb.com/MariaDB/mariadb-10.5/repo/ubuntu focal main/debug
-----
포장이 추가되어 업데이트되었습니다.
$ sudo apt update

Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:5 http://archive.ubuntu.com/ubuntu focal-security InRelease
Get:1 https://downloads.mariadb.com/MariaDB/mariadb-10.5/repo/ubuntu focal InRelease [6,264 B]
Err:1 https://downloads.mariadb.com/MariaDB/mariadb-10.5/repo/ubuntu focal InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F1656F24C74CD1D8
Reading package lists... Done
W: GPG error: https://downloads.mariadb.com/MariaDB/mariadb-10.5/repo/ubuntu focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F1656F24C74CD1D8
E: The repository 'http://downloads.mariadb.com/MariaDB/mariadb-10.5/repo/ubuntu focal InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
오류가 토로되었습니다.

프록시 환경에서 appt-key adb 실행


위에서 보면 열쇠가 떨어졌어요.
︙
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F1656F24C74CD1D8
︙
아마 curl의 스크립트에서 이게 정상적으로 작동하지 않았을 거예요.
Qita 참조 보면서 버튼을 추가합니다.
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --keyserver-option http-proxy=http://proxy_address:proxy_port --recv-keys F1656F24C74CD1D8

gpg: key F1656F24C74CD1D8: public key "MariaDB Signing Key <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1
안 돼요!

드디어 설치


$ sudo apt update
$ sudo apt install mariadb-server
다 된...
$ mariadb --version
mariadb  Ver 15.1 Distrib 10.5.9-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

좋은 웹페이지 즐겨찾기