ubuntu 20.04 focal sources.list

WSL2, Ubuntu 20.04를 설정하고 apt update 로 업데이트를 하는데 아래와 같이 에러가 나서 focal 버전의 sources.list 파일로 새로 적용했더니 잘 됨.

sudo apt update 에러 화면

Ign:1 http://archive.ubuntu.com focal InRelease
Ign:2 http://archive.ubuntu.com focal-updates InRelease
Ign:3 http://archive.ubuntu.com focal-backports InRelease
Get:4 http://archive.ubuntu.com/ubuntu focal-security InRelease [107 kB]
Err:5 http://archive.ubuntu.com focal Release
404 Not Found [IP: 91.189.88.152 80]
Err:6 http://archive.ubuntu.com focal-updates Release
404 Not Found [IP: 91.189.88.152 80]
Err:7 http://archive.ubuntu.com focal-backports Release
404 Not Found [IP: 91.189.88.152 80]
Reading package lists… Done
E: The repository 'http://archive.ubuntu.com focal Release' does not have a Release file.
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.
E: The repository 'http://archive.ubuntu.com focal-updates Release' does not have a Release file.
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.
E: The repository 'http://archive.ubuntu.com focal-backports Release' does not have a Release file.
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.

/etc/sources.list

deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse

deb http://archive.canonical.com/ubuntu focal partner
deb-src http://archive.canonical.com/ubuntu focal partner

Big Sur 베타에서 Eclipse 실행시 에러

Big Sur 에서 Eclipse 2020-06 (현재 최신버전) 실행시 에러가 발생해서 구글링 해보았습니다.

Finder -> 응용프로그램 -> Eclipse.app 우클릭 -> 패키지 내용 보기 -> Contents -> info.plist 우클릭 -> 다음으로 열기 텍스트 편집기

<key>Eclipse</key> 부분을 검색해서 찾음
<array></array> 사이에 아래 키 추가

<string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/bin/java</string>

두 번째 <string>에서 본인의 jdk 위치를 잡아줘야 합니다.

Ubuntu 20.04 + Nginx + Let’s Encrypt

1. certbot, python3-certbot-nginx 설치

sudo apt install certbot python3-certbot-nginx

2. Nginx 설정

site-available에 해당사이트 설정 편집
sudo nano /etc/nginx/sites-available/example.com

server_name 에 도메인 추가
server_name example.com www.example.com;

nginx 검증
sudo nginx -t

nginx 재시작
sudo systemctl reload nginx

(ufw status 결과 inactive 상태였음)
sudo ufw status
sudo ufw allow ‘Nginx Full’
sudo ufw delete allow ‘Nginx HTTP’

3. 인증서 설치

sudo certbot –nginx -d example.com -d www.example.com

HTTPS로 리다이렉트 시킬것인지 여부 
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel):

4. 인증봇 타이머 확인 및 인증서 테스트

인증봇 타이머 확인 (하루 두번)
sudo systemctl status certbot.timer

LetsEncrypt 인증서는 90일간 유효, 인증봇이 갱신처리

인증서 갱신 테스트
sudo certbot renew –dry-run

인증서 점검 테스트
https://www.ssllabs.com/ssltest/analyze.html?d=example.com

참고 URL

https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04