Certbot: '๋ฏธ์ถฉ์กฑ ์ข…์†์„ฑ'์œผ๋กœ ์ธํ•ด Ubuntu 18.04์— python-certbot-nginx๋ฅผ ์„ค์น˜ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

์— ๋งŒ๋“  2018๋…„ 09์›” 09์ผ  ยท  18์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: certbot/certbot

์™„์ „ํžˆ ์ƒˆ๋กœ์šด ์ตœ์‹  Ubuntu 18.04.1 LTS (์„œ๋ฒ„) ์„ค์น˜์—์„œ๋Š” Certbot PPA์—์„œ Certbot์„ ์„ค์น˜ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. '๋ฏธ์ถฉ์กฑ ์ข…์†์„ฑ'์œผ๋กœ ์ธํ•ด ์„ค์น˜๊ฐ€ ์‹คํŒจํ•ฉ๋‹ˆ๋‹ค.

https://certbot.eff.org/lets-encrypt/ubuntuartful-nginx ์˜ ์ง€์นจ์„ ๋”ฐ๋ฅด๊ณ 

sudo add-apt-repository ppa:certbot/certbot ๋ฅผ ์™„๋ฃŒํ•˜๊ณ  APT ํŒจํ‚ค์ง€ ์บ์‹œ๋ฅผ ์—…๋ฐ์ดํŠธ ํ•œ ํ›„ ๋ช…๋ น ์ค„ ๋Œ€ํ™”๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

ubuntu<strong i="10">@pingu</strong>:~$ sudo apt-get install python-certbot-nginx
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python-certbot-nginx : Depends: python3-certbot-nginx but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
ubuntu<strong i="11">@pingu</strong>:~$ sudo apt-get install python3-certbot-nginx
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python3-certbot-nginx : Depends: certbot (>= 0.25.0~) but it is not going to be installed
                         Depends: python3-acme but it is not going to be installed
                         Depends: python3-certbot (>= 0.25.0~) but it is not going to be installed
                         Depends: python3-mock but it is not installable
E: Unable to correct problems, you have held broken packages.

์ด ํŒจํ‚ค์ง€ ์„ค์น˜๊ฐ€ ์ž‘๋™ ํ•  ๊ฒƒ์œผ๋กœ ์˜ˆ์ƒํ•˜๊ฑฐ๋‚˜ ์ผ๋ถ€ ์ „์ œ ์กฐ๊ฑด์ด ๋ˆ„๋ฝ ๋œ ๊ฒฝ์šฐ Certbot ์ง€์นจ์—์„œ์ด๋ฅผ ์–ธ๊ธ‰ํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค. ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!

debian / ubuntu documentation pkging bug

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

sudo add-apt-repository universe sudo apt-get update ๋ฅผ ์‹คํ–‰ํ•˜๋ฉด ์ง€์นจ์— ๋”ฐ๋ผ certbot์„ ์„ค์น˜ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋ชจ๋“  18 ๋Œ“๊ธ€

์ด ๋ฌธ์ œ์— ๋Œ€ํ•ด ์•Œ๋ ค ์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. @glts. @bmw , ์ œ์•ˆ ์‚ฌํ•ญ์ด ์žˆ์Šต๋‹ˆ๊นŒ?

@schoen ์ด์ œ ์ด๊ฒƒ์ด ๊ธฐ๋ณธ์ ์œผ๋กœ ํ™œ์„ฑํ™”๋˜์ง€ ์•Š์€ ์œ ๋‹ˆ๋ฒ„์Šค bionic , bionic-updates , bionic-security ) ๋•Œ๋ฌธ์ด๋ผ๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค. ์œ ๋‹ˆ๋ฒ„์Šค ๋ฆฌํฌ์ง€ํ† ๋ฆฌ๋ฅผ ์ถ”๊ฐ€ ํ•œ ํ›„์— ์ง„ํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์ด ๊ฒฝ์šฐ ๋ฒ„๊ทธ๋Š” ์•„๋‹ˆ์ง€๋งŒ ์ง€์นจ์˜ ํžŒํŠธ๋Š” ๋งค์šฐ ํ™˜์˜๋ฐ›์„ ๊ฒƒ์ž…๋‹ˆ๋‹ค.

๋‚˜๋Š” ๊ฐ™์€ ๋ฌธ์ œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ์–ด๋–ป๊ฒŒ ํ•ด๊ฒฐํ•ฉ๋‹ˆ๊นŒ?

sudo add-apt-repository universe sudo apt-get update ๋ฅผ ์‹คํ–‰ํ•˜๋ฉด ์ง€์นจ์— ๋”ฐ๋ผ certbot์„ ์„ค์น˜ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋ฐ๋น„์•ˆ ์ŠคํŠธ๋ ˆ์น˜์—๋„ ๋™์ผํ•œ ๋™์ž‘์ด ์žˆ์œผ๋ฉฐ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

apt install python3-certbot-nginx
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python3-certbot-nginx : Depends: certbot (>= 0.25.0~) but 0.10.2-1 is to be installed
                         Depends: python3-acme (>= 0.26.0~) but 0.10.2-1 is to be installed
                         Depends: python3-certbot but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

์ด๊ฒƒ์— ๋Œ€ํ•ด ์ƒˆ๋กœ์šด ๋ฌธ์ œ๋ฅผ ์—ด์–ด์•ผํ•ฉ๋‹ˆ๊นŒ?

๋ฐ๋น„์•ˆ Gnu / ๋ฆฌ๋ˆ…์Šค์˜ ๊ฒฝ์šฐ ๋ฐฑ ํฌํŠธ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค. sudo ๊ณ„์ •์œผ๋กœ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

echo "deb http://ftp.debian.org/debian stretch-backports main">>/etc/apt/sources.list
apt-get update && apt-get install certbot python3-certbot-nginx -t stretch-backports 
ertbot --nginx -d domain.com

@ h3ct0rjs , -t stretch-backports ๋ฅผ ํฌํ•จํ•ด์•ผ ์„ค์น˜ ๋ช…๋ น์ด sudo apt-get install python-certbot-nginx -t stretch-backports ๋ฉ๋‹ˆ๋‹ค. ์ž์„ธํ•œ ๋‚ด์šฉ์€ https://certbot.eff.org/lets-encrypt/debianstretch-nginx ๋ฅผ ์ฐธ์กฐ

Ubuntu ์‚ฌ์šฉ์ž์˜ ๊ฒฝ์šฐ์ด ๋ฌธ์ œ๋Š” https://github.com/certbot/website/pull/382 ๋กœ ํ•ด๊ฒฐํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค

์ตœ๊ทผ ๋ฐ๋น„์•ˆ ํ…Œ์ŠคํŠธ์—์„œ apt-get dist-upgrade ์„ ํ•œ ํ›„์—๋„ ๋น„์Šทํ•œ ๋ฌธ์ œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. certbot์„ ์ œ๊ฑฐํ–ˆ์œผ๋ฉฐ ๋‹ค์‹œ ์„ค์น˜ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

root<strong i="7">@localhost</strong>:~# apt-get dist-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:
  python3-acme python3-configargparse python3-configobj python3-future python3-icu python3-josepy python3-mock python3-parsedatetime python3-pbr python3-requests-toolbelt python3-rf
  python3.6 python3.6-minimal
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  certbot python3-certbot python3-zope.component python3-zope.hookable python3-zope.interface
The following NEW packages will be installed:
  libpython3.7-minimal libpython3.7-stdlib python3.7 python3.7-minimal
The following packages will be upgraded:
  binutils binutils-common binutils-x86-64-linux-gnu cargo cpp-8 g++-8 gcc-8 gcc-8-base gir1.2-glib-2.0 git git-man init init-system-helpers iptables iptables-persistent libasan5 li
  libcryptsetup12 libfreetype6 libgcc-8-dev libgcc1 libgdbm-compat4 libgdbm6 libgirepository-1.0-1 libgomp1 libip4tc0 libip6tc0 libiptc0 libitm1 libllvm7 liblsan0 libmpx2 libnghttp2
  libpython3-stdlib libquadmath0 libsqlite3-0 libssl1.0.2 libssl1.1 libstdc++-8-dev libstdc++6 libsystemd0 libtiff5 libtsan0 libubsan1 libudev1 libxtables12 linux-libc-dev netfilter
  python3-reportbug reportbug stress-ng sudo systemd systemd-sysv sysvinit-utils udev unattended-upgrades vim vim-tiny xxd
68 upgraded, 4 newly installed, 5 to remove and 0 not upgraded.
Need to get 0 B/78.4 MB of archives.
After this operation, 22.0 MB of additional disk space will be used.
Do you want to continue? [Y/n]

๋ฐ๋น„์•ˆ์—๋Š” '์œ ๋‹ˆ๋ฒ„์Šค'๊ฐ€ ์—†์œผ๋ฏ€๋กœ ์ถ”๊ฐ€ํ•˜๋ ค๊ณ ํ•˜๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๊ฒฐ๊ณผ๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

root<strong i="11">@localhost</strong>:~# add-apt-repository universe
Error: 'universe' invalid
root<strong i="14">@localhost</strong>:~# apt-get install python-certbot-nginx
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python-certbot-nginx : Depends: python3-certbot-nginx but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root<strong i="17">@localhost</strong>:~# apt-cache policy certbot
certbot:
  Installed: (none)
  Candidate: 0.28.0-1
  Version table:
     0.28.0-1 500
        500 http://mirrors.linode.com/debian unstable/main amd64 Packages
        100 /var/lib/dpkg/status
     0.25.0-1+ubuntu17.10.1+certbot+1 500
        500 http://ppa.launchpad.net/certbot/certbot/ubuntu artful/main amd64 Packages
root<strong i="20">@localhost</strong>:~# apt-cache policy python-certbot-nginx
python-certbot-nginx:
  Installed: (none)
  Candidate: 0.28.0-1
  Version table:
     0.28.0-1 500
        500 http://mirrors.linode.com/debian unstable/main amd64 Packages
     0.25.0-2+ubuntu17.10.1+certbot+1 500
        500 http://ppa.launchpad.net/certbot/certbot/ubuntu artful/main amd64 Packages
root<strong i="23">@localhost</strong>:~# apt-cache policy python3-certbot-nginx
python3-certbot-nginx:
  Installed: (none)
  Candidate: 0.28.0-1
  Version table:
     0.28.0-1 500
        500 http://mirrors.linode.com/debian unstable/main amd64 Packages
     0.25.0-2+ubuntu17.10.1+certbot+1 500
        500 http://ppa.launchpad.net/certbot/certbot/ubuntu artful/main amd64 Packages

์กฐ์–ธ์„ ์ฃผ์‹œ๋ฉด ๊ฐ์‚ฌํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค!

@bmw์— ์˜ํ•ด ์ด์ „์˜ ์ฝ”๋ฉ˜ํŠธ๋ฅผ ํ™•์ธ @leeoniya, ๋ฐ๋น„์•ˆ GNU / ๋ฆฌ๋ˆ…์Šค์—์„œ certbot์˜ ๋ฐฑ ํฌํŠธ๋ฅผ ์„ค์น˜ํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค

@ h3ct0rjs , -t stretch-backports ๋ฅผ ํฌํ•จํ•ด์•ผ ์„ค์น˜ ๋ช…๋ น์ด sudo apt-get install python-certbot-nginx -t stretch-backports ๋ฉ๋‹ˆ๋‹ค. ์ž์„ธํ•œ ๋‚ด์šฉ์€ https://certbot.eff.org/lets-encrypt/debianstretch-nginx ๋ฅผ ์ฐธ์กฐ

Ubuntu ์‚ฌ์šฉ์ž์˜ ๊ฒฝ์šฐ์ด ๋ฌธ์ œ๋Š” certbot / website # 382 ๋กœ ํ•ด๊ฒฐํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค.

Jessie ์‚ฌ์šฉ์ž๋Š” ๋ช‡ ์ค„์„ ๋ณ€๊ฒฝํ•˜๋Š” ๊ฒƒ์„ ์žŠ์ง€ ๋ง์•„์•ผํ•ฉ๋‹ˆ๋‹ค. :)

jessie์˜ ๊ฒฝ์šฐ ์†Œ์Šค ๋ชฉ๋ก์—์ด ์ค„์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.
deb http://ftp.debian.org/debian jessie-backports main
์ŠคํŠธ๋ ˆ์น˜๋ฅผ ์œ„ํ•ด์ด ์„ ์„ ์ถ”๊ฐ€ํ•˜์‹ญ์‹œ์˜ค
deb http://ftp.debian.org/debian stretch-backports main

๊ทธ๋Ÿฐ ๋‹ค์Œ ์„ค์น˜๋Š” ๋ฐ๋น„์•ˆ ๋ฒ„์ „์— ๋”ฐ๋ผ ๋‹ค๋ฆ…๋‹ˆ๋‹ค.
sudo apt-get install python-certbot-nginx -t jessie-backports
๋˜๋Š”
sudo apt-get install python-certbot-nginx -t stretch-backports

๊ทธ๊ฒƒ์€ ๋ช…๋ฐฑํ•ด ๋ณด์ด์ง€๋งŒ ๋งŒ์ผ์˜ ๊ฒฝ์šฐ์—;)

์•ˆ๋…•ํ•˜์„ธ์š”, ์šฐ๋ถ„ํˆฌ 18.04๋ฅผ ์ƒˆ๋กœ ์„ค์น˜ํ•  ๋•Œ๋„ ๊ฐ™์€ ๋ฌธ์ œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค ... ๋ˆ„๊ตฐ๊ฐ€์ด ํ•ด๊ฒฐ์ฑ…์„ ์ฐพ์•˜๋Š”์ง€ ์•Œ๊ณ  ์‹ถ์Šต๋‹ˆ๊นŒ?
๋‚˜๋Š” ๊ณต์‹ ์›น ์‚ฌ์ดํŠธ์˜ ๋ฌธ์„œ๋ฅผ ์‹œ๋„ํ–ˆ๋‹ค
$ sudo apt-get ์—…๋ฐ์ดํŠธ
$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ์œ ๋‹ˆ๋ฒ„์Šค
$ sudo add-apt-repository ppa : certbot / certbot
$ sudo apt-get ์—…๋ฐ์ดํŠธ
$ sudo apt-get install python-certbot-nginx

ํ•˜์ง€๋งŒ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
๋‹ค์Œ ํŒจํ‚ค์ง€์—๋Š” ์ถฉ์กฑ๋˜์ง€ ์•Š์€ ์ข…์†์„ฑ์ด ์žˆ์Šต๋‹ˆ๋‹ค.
python-certbot-nginx : ์ข…์† ํ•ญ๋ชฉ : python3-certbot-nginx์ด์ง€๋งŒ ์„ค์น˜๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
E : ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. ํŒŒ์† ๋œ ํŒจํ‚ค์ง€๋ฅผ ๋ณด๊ด€ํ–ˆ์Šต๋‹ˆ๋‹ค.

๋‹ค์‹œ ์•ˆ๋…•ํ•˜์„ธ์š”.
๋‚ด ๊ตฌ์„ฑ์— ๋ฌธ์ œ๊ฐ€ ์žˆ์ง€๋งŒ ๋„์›€์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
์†Œ์Šค์—์„œ nginx๋ฅผ ์„ค์น˜ํ•˜๊ณ  ๋‚ด ํŽธ์—์„œ ์ปดํŒŒ์ผํ–ˆ์Šต๋‹ˆ๋‹ค. ํŽ˜์ด์ง€ ์†๋„ ๋ฐ brotlib์™€ ๊ฐ™์€ ์‚ฌ์šฉ์ž ์ง€์ • ๋ชจ๋“ˆ์ด ํ•„์š”ํ•˜๊ธฐ ๋•Œ๋ฌธ์— apt ํŒจํ‚ค์ง€๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ nginx ์„œ๋ฒ„๋ฅผ ์„ค์น˜ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.
๊ทธ๋ฆฌ๊ณ ์ด ์‚ฌ์šฉ์ž ์ •์˜ ๋ฒ„์ „ (/etc/apt/preference.d/ => ํŒจํ‚ค์ง€ : nginx *๋ฅผ ํ†ตํ•ด)์„ ๋ฎ์–ด ์“ฐ์ง€ ์•Š๋„๋ก apt์—์„œ Nginx ์—…๋ฐ์ดํŠธ๋ฅผ ์ฐจ๋‹จํ•˜๊ธฐ ๋•Œ๋ฌธ์— "python-certbot_nginx"๋ฅผ ์„ค์น˜ํ•˜๋ ค๊ณ  ํ•  ๋•Œ ์‹œ๋„ํ•ฉ๋‹ˆ๋‹ค. nginx ํŒจํ‚ค์ง€๋ฅผ ์„ค์น˜ํ•˜๋ฉด ์‹คํŒจ) ... ํ…Œ์ŠคํŠธ๋ฅผํ•˜๊ณ  nginx ํŒจํ‚ค์ง€ ์„ค์น˜๋ฅผ ํ—ˆ์šฉํ•˜๋ฉด ์˜ค๋ฅ˜๊ฐ€ ์‚ฌ๋ผ์ง‘๋‹ˆ๋‹ค ...ํ•˜์ง€๋งŒ ๋‚ด ์‚ฌ์šฉ์ž ์ •์˜ ๋ฒ„์ „์ด ์ง€์›Œ์งˆ ๊ฒƒ์ด๋ผ๊ณ  ์ƒ๊ฐํ•˜๊ธฐ ๋•Œ๋ฌธ์—์ด ์„ค์น˜๋ฅผ ํ™•์ธํ•˜๊ณ  ์‹ถ์ง€ ์•Š์Šต๋‹ˆ๋‹ค. nginx์™€ ๋‚˜๋Š” ๋‚ด๊ฐ€ ์ง์ ‘ ์ปดํŒŒ์ผ ํ•œ sutom ๋ชจ๋“ˆ์„ ํ’€ ๊ฒƒ์ด๋‹ค.
๋ˆ„๊ตฐ๊ฐ€๊ฐ€์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•  ํ•ด๊ฒฐ์ฑ…์„ ์ฐพ๋„๋ก ๋„์™€ ์ค„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๊นŒ?
๋ฏธ๋ฆฌ ๋„์™€ ์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!

@angelflo , https://community.letsencrypt.org์— ๊ฒŒ์‹œํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค. ํ”„๋กœ์ ํŠธ์— ์ต์ˆ™ํ•œ ๋งŽ์€ ์‚ฌ๋žŒ๋“ค์ด ๊ธฐ๊บผ์ด ์‹œ๋„ํ•˜๊ณ  ๋„์›€์„ ์ค„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

sudo apt-get ์—…๋ฐ์ดํŠธ
sudo apt-get install --python ์ „์šฉ ์—…๊ทธ๋ ˆ์ด๋“œ
sudo apt-get install python-pip
sudo apt-get install build-essential libssl-dev libffi-dev python-dev
pip ์„ค์น˜ pyopenssl
certbot certonly

๊ฐ€์ƒ ํ™˜๊ฒฝ ์™ธ๋ถ€์—์„œ pip ํŒจํ‚ค์ง€๋ฅผ ์„ค์น˜ํ•˜๋Š” ๊ฒƒ์€ ๊ถŒ์žฅํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์ด๋ ‡๊ฒŒํ•˜๋ฉด ํŒจํ‚ค์ง€๊ฐ€ OS ํŒจํ‚ค์ง€ ๊ด€๋ฆฌ์ž๊ฐ€ ์ œ๊ณต ํ•œ ํŒจํ‚ค์ง€์™€ ํ˜ผํ•ฉ๋˜๊ณ  ์žฌ์ •์˜๋˜์–ด Python ํ™˜๊ฒฝ์ด ์†์ƒ ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๊ฐ€์ƒ ํ™˜๊ฒฝ ์™ธ๋ถ€์—์„œ pip ํŒจํ‚ค์ง€๋ฅผ ์„ค์น˜ํ•˜๋Š” ๊ฒƒ์€ ๊ถŒ์žฅํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์ด๋ ‡๊ฒŒํ•˜๋ฉด ํŒจํ‚ค์ง€๊ฐ€ OS ํŒจํ‚ค์ง€ ๊ด€๋ฆฌ์ž๊ฐ€ ์ œ๊ณต ํ•œ ํŒจํ‚ค์ง€์™€ ํ˜ผํ•ฉ๋˜๊ณ  ์žฌ์ •์˜๋˜์–ด Python ํ™˜๊ฒฝ์ด ์†์ƒ ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋™์˜ํ•˜์ง€๋งŒ ๋‹ค๋ฅธ ์˜ต์…˜์ด์—†๋Š” ๊ฒฝ์šฐ ์‹ฌ๊ฐํ•œ ํ•„์š”๊ฐ€์žˆ์„ ๋•Œ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋‚ด ์„œ๋ฒ„์—์„œ์ด ์˜ต์…˜์„ ์‚ฌ์šฉํ–ˆ๊ณ  ๋ชจ๋“  ๊ฒƒ์ด ์„ฑ๊ณต์ ์œผ๋กœ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

์ด ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•˜๊ณ  universe ์ถ”๊ฐ€ํ•˜๋Š” ๋‹ค๋ฅธ ์‚ฌ๋žŒ์€ ์ด๋ฏธ ์ถ”๊ฐ€๋˜์—ˆ์œผ๋ฉฐ ์ตœ์‹  ์ƒํƒœ์ด๋ฏ€๋กœ ์‹คํŒจํ•ฉ๋‹ˆ๋‹ค. ๋‚ด ํŒŒ์ผ์˜ ๋์—์žˆ๋Š” ์œ ๋‹ˆ๋ฒ„์Šค๋ฅผ ์ œ๊ฑฐํ•œ ๋‹ค์Œ ์œ ๋‹ˆ๋ฒ„์Šค๋„ ํฌํ•จํ•˜๋Š” /etc/apt/sources.list ์—์„œ ๊ทธ ์œ„์—์žˆ๋Š” ๋‘ ์ €์žฅ์†Œ์˜ ์ฃผ์„ ์ฒ˜๋ฆฌ๋ฅผ ์ˆ˜๋™์œผ๋กœ ์ œ๊ฑฐํ•˜์—ฌ ํ•ด๊ฒฐํ•  ์ˆ˜์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.

๋ณ€ํ™”:

## Uncomment the following two lines to add software from Ubuntu's
## 'extras' repository.
# deb http://archive.ubuntu.com/ubuntu/ bionic main universe multiverse
# deb http://archive.ubuntu.com/ubuntu/ bionic-security main universe multiverse
deb http://archive.ubuntu.com/ubuntu bionic universe

์—:

## Uncomment the following two lines to add software from Ubuntu's
## 'extras' repository.
deb http://archive.ubuntu.com/ubuntu/ bionic main universe multiverse
deb http://archive.ubuntu.com/ubuntu/ bionic-security main universe multiverse

๊ทธ๋Ÿฐ ๋‹ค์Œ sudo apt-get update ๋ฅผ ์‹คํ–‰ํ•˜๋ฉด ์„ค์น˜๊ฐ€ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

์ œ ๊ฒฝ์šฐ ๋ฌธ์ œ๋Š” AWS์˜ Ubuntu ๋ฏธ๋Ÿฌ์— python3-mock ๋“ฑ์ด ํฌํ•จ๋˜์–ด ์žˆ์ง€ ์•Š๋‹ค๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. (WTF?)

/etc/apt/sources.list์—์„œ :

# Fails:
deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ bionic main universe multiverse

# Succeeds:
deb http://archive.ubuntu.com/ubuntu/ bionic main universe multiverse

์–˜๋“ค ์•„ ๋‚˜๋Š” ์ด๊ฒƒ์— ๋Œ€ํ•œ ์ตœ์ฒจ๋‹จ ์†”๋ฃจ์…˜์„ ๊ฐ€์ง€๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
TL; DR ์ด๊ฒƒ์€ ์•„๊ธฐ๋ฅผ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค! https://certbot.eff.org/lets-encrypt/ubuntuother-nginx

์†Œ์Šค ์‚ฌ์šฉ์ž ์ง€์ • ๋นŒ๋“œ์—์„œ NGINX๋ฅผ ์„ค์น˜ํ–ˆ๋Š”๋ฐ ์ตœ์ฒจ๋‹จ์ž…๋‹ˆ๋‹ค. ์–ธ๊ธ‰ ๋œ ๋ชจ๋“  ์†”๋ฃจ์…˜์„ ์‹œ๋„ํ–ˆ์Šต๋‹ˆ๋‹ค.
1-์œ ๋‹ˆ๋ฒ„์Šค๋ฅผ ํฌํ•จํ•˜๋„๋ก ์ €์žฅ์†Œ ์—…๋ฐ์ดํŠธ
2-๋ฐฑ ํฌํŠธ ํ”Œ๋ž˜๊ทธ ์˜ต์…˜ ์‹œ๋„
3-Python ์„ค์น˜

@angristan nginx autointall ์†Œ์Šค ๋นŒ๋“œ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ์ƒˆ๋กœ์šด ์„ค์น˜์—์„œ๋Š”์ด ์ค‘ ์–ด๋Š ๊ฒƒ๋„ ์ž‘๋™ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

๋‚ด๊ฐ€ ๋ชจ๋“  ๊ฒƒ์„ ์‹œ๋„ํ•œ ํ›„ ์ด๊ฒƒ์ด ํšจ๊ณผ๊ฐ€ ์žˆ์Œ์„ ์•Œ ์ˆ˜ ์žˆ์—ˆ๋‹ค https://certbot.eff.org/lets-encrypt/ubuntuother-nginx

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰