buffashe's Blog https://blog.buffashe.com/ 버프애쉬의 블로그 Wed, 06 Jan 2021 12:04:50 +0000 ko-KR hourly 1 https://wordpress.org/?v=5.6 리눅스 램디스크(tmpfs) 만들기 https://blog.buffashe.com/2021/01/linux-create-a-ramdisk/ Wed, 06 Jan 2021 12:00:54 +0000 https://blog.buffashe.com/?p=991 리눅스에서 램디스크(tmpfs)를 사용하는 방법을 설명합니다. 램디스크의 내용은 기기의 전원이 꺼지면 삭제되므로 주의해서 사용하여야 합니다. 가용 램 용량 확인 시스템의 여유 … 더 보기 "리눅스 램디스크(tmpfs) 만들기"

The post 리눅스 램디스크(tmpfs) 만들기 appeared first on buffashe's Blog.

]]>
리눅스에서 램디스크(tmpfs)를 사용하는 방법을 설명합니다.

램디스크의 내용은 기기의 전원이 꺼지면 삭제되므로 주의해서 사용하여야 합니다.


가용 램 용량 확인

시스템의 여유 램 용량을 확인합니다.

$ free --mega
              total        used        free      shared  buff/cache   available
Mem:           8071        2426        4778          85         867        5314
Swap:             0           0           0

5314 MB를 사용할 수 있음을 알 수 있습니다(available 컬럼).
이 중 3 GB를 사용하겠습니다.


마운트 지점 생성 및 마운트

램디스크의 마운트 지점으로 사용할 폴더를 생성합니다.

$ sudo mkdir /mnt/ramdisk

램디스크를 마운트 합니다.

$ sudo mount -t tmpfs -o size=3G tmpfs /mnt/ramdisk

아래 명령어로 마운트 된 램디스크를 확인할 수 있습니다.

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
...
tmpfs           3.0G     0  3.0G   0% /mnt/ramdisk

/etc/fstab 설정

부팅 시 램디스크가 자동으로 마운트 되도록 설정합니다.

아래 명령어로 /etc/fstab을 편집합니다.

$ sudo nano /etc/fstab

/etc/fstab의 내용에 다음 내용을 추가합니다.

tmpfs /mnt/ramdisk tmpfs defaults,size=3G 0 0

앞으로 부팅 시마다 램디스크가 자동으로 마운트 됩니다.


추가: 램디스크 언마운트/삭제

램디스크의 언마운트/삭제 방법을 설명합니다.

아래 명령어로 램디스크의 내용을 삭제하고, 언마운트 합니다.

$ sudo rm -rf /mnt/ramdisk/*
$ sudo umount /mnt/ramdisk

위에서 /etc/fstab에 추가한 내용을 삭제합니다.

$ sudo nano /etc/fstab

마운트 지점을 삭제합니다.

$ sudo rmdir /mnt/ramdisk

The post 리눅스 램디스크(tmpfs) 만들기 appeared first on buffashe's Blog.

]]>
Let’s Encrypt(Certbot)를 통한 SSL 인증서 발급 및 적용 https://blog.buffashe.com/2020/09/get-ssl-cert-via-letsencrypt/ Sat, 05 Sep 2020 07:51:31 +0000 https://blog.buffashe.com/?p=963 이 글에서는 Certbot을 사용한 Let’s Encrypt SSL 인증서 발급과 자동 갱신 방법을 설명합니다. 우분투 20.04에 Apache 또는 Nginx 웹 서버가 … 더 보기 "Let’s Encrypt(Certbot)를 통한 SSL 인증서 발급 및 적용"

The post Let’s Encrypt(Certbot)를 통한 SSL 인증서 발급 및 적용 appeared first on buffashe's Blog.

]]>
이 글에서는 Certbot을 사용한 Let’s Encrypt SSL 인증서 발급과 자동 갱신 방법을 설명합니다.

우분투 20.04에 Apache 또는 Nginx 웹 서버가 설치된 상태에서 진행합니다.
서버의 443(HTTPS) 포트를 미리 개방해 주세요.


snapd 설치

우분투 16.04.4, 18.04, 20.04에는 snapd가 기본으로 설치되어 있으므로 생략합니다.
다른 배포판의 snapd 설치 방법은 Installing snapd를 참고하세요.


Certbot OS 패키지 제거

기존에 설치된 Certbot 패키지가 있다면 삭제합니다.

$ sudo apt remove certbot

설치된 패키지가 없으면 다음 단계로 넘어갑니다.


Certbot 설치

Certbot을 설치합니다.

$ sudo snap install --classic certbot
Download snap "core20" (634) from channel "stable"            12%  190kB/s 4m56s
Download snap "certbot" (500) from channel "stable"            5%  187kB/s 4m14s
certbot 1.7.0 from Certbot Project (certbot-eff✓) installed

SSL 인증서 발급 및 설정

SSL 인증서를 발급한 후 웹 서버의 설정을 업데이트(HTTPS 사용 설정)합니다.

// Apache
$ sudo certbot --apache

// Nginx
$ sudo certbot --nginx
$ sudo certbot --apache
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Enter email address (used for urgent renewal and security notices)
 (Enter 'c' to cancel): [이메일 주소]

  • 이용 약관에 동의합니다.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: A

  • EFF의 소식을 이메일로 받을지 선택합니다.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing, once your first certificate is successfully issued, to
share your email address with the Electronic Frontier Foundation, a founding
partner of the Let's Encrypt project and the non-profit organization that
develops Certbot? We'd like to send you email about our work encrypting the web,
EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y

  • Apache 설정 파일에 도메인 이름이 설정되어 있지 않아 나오는 메시지입니다.
    SSL 인증서를 발급받을 도메인 이름을 입력합니다. (콤마 또는 스페이스로 구분)
No names were found in your configuration files. Please enter in your domain
name(s) (comma and/or space separated)  (Enter 'c' to cancel): [도메인 이름]

  • SSL 설정 절차(인증서 발급, 검증, 웹 서버 설정)가 진행됩니다.
    앞으로 접속하는 클라이언트는 HTTP -> HTTPS로 리다이렉트됩니다.
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for [도메인 이름]
Enabled Apache rewrite module
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/000-default-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-available/000-default-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/000-default-le-ssl.conf
Enabled Apache rewrite module
Redirecting vhost in /etc/apache2/sites-enabled/000-default.conf to ssl vhost in /etc/apache2/sites-available/000-default-le-ssl.conf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://[도메인 이름]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Subscribe to the EFF mailing list (email: [이메일]).

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/[도메인 이름]/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/[도메인 이름]/privkey.pem
   Your cert will expire on 2020-12-03. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot again
   with the "certonly" option. To non-interactively renew *all* of
   your certificates, run "certbot renew"
 - Your account credentials have been saved in your Certbot
   configuration directory at /etc/letsencrypt. You should make a
   secure backup of this folder now. This configuration directory will
   also contain certificates and private keys obtained by Certbot so
   making regular backups of this folder is ideal.
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

SSL 설정이 완료되었으며 인증서의 만료 시점(2020-12-03)을 알려줍니다.
Certbot은 60일마다 인증서를 자동으로 갱신하기 때문에 다시 실행할 필요는 없습니다.


인증서 자동 갱신 테스트

다음 명령어로 인증서 자동 갱신을 테스트(dry-run)합니다.

$ sudo certbot renew --dry-run
.....
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
** DRY RUN: simulating 'certbot renew' close to cert expiry
**          (The test certificates below have not been saved.)

Congratulations, all renewals succeeded. The following certs have been renewed:
  /etc/letsencrypt/live/[도메인 이름]/fullchain.pem (success)
** DRY RUN: simulating 'certbot renew' close to cert expiry
**          (The test certificates above have not been saved.)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
.....

  • 인증서 갱신 명령어는 다음 중 하나에 설치됩니다.
/etc/crontab/
/etc/cron.*/*
$ systemctl list-timers
  • 인증서 갱신 서비스의 실행 예정 시각이 표시됩니다.
$ sudo systemctl list-timers
NEXT                        LEFT          LAST                        PASSED       UNIT                         ACTIVATES                     
.....      
Fri 2020-09-04 22:58:00 KST 2h 2min left  n/a                         n/a          snap.certbot.renew.timer     snap.certbot.renew.service    
.....

The post Let’s Encrypt(Certbot)를 통한 SSL 인증서 발급 및 적용 appeared first on buffashe's Blog.

]]>
CloudFront와 Amazon S3를 사용한 정적 웹 사이트 호스팅 https://blog.buffashe.com/2020/08/serve-static-website-using-cloudfront-s3/ Sun, 16 Aug 2020 13:03:03 +0000 https://blog.buffashe.com/?p=721 이 글에서는 Amazon CloudFront와 Amazon Simple Storage Service (Amazon S3)를 사용하여 SSL(HTTPS)을 지원하는 정적 웹 사이트를 호스팅하는 방법을 소개합니다. 이 … 더 보기 "CloudFront와 Amazon S3를 사용한 정적 웹 사이트 호스팅"

The post CloudFront와 Amazon S3를 사용한 정적 웹 사이트 호스팅 appeared first on buffashe's Blog.

]]>
이 글에서는 Amazon CloudFrontAmazon Simple Storage Service (Amazon S3)를 사용하여 SSL(HTTPS)을 지원하는 정적 웹 사이트를 호스팅하는 방법을 소개합니다.

이 블로그(blog.buffashe.com)도 CloudFront와 S3를 사용하여 서버리스 환경에서 서비스 중입니다.

Amazon Route 53(또는 다른 DNS 서비스)에 등록된 도메인(호스팅 영역)이 있는 상태에서 진행합니다.


사용하는 서비스

Amazon CloudFront
전 세계로 배포 및 HTTPS 적용

Amazon Route 53
CloudFront 도메인과 웹 사이트 도메인 연결

Amazon S3
웹 사이트의 Origin(웹 서버, 파일시스템 역할) 담당

AWS Certificate Manager
웹 사이트의 도메인에 대한 인증서 발급


웹 페이지 준비

웹 사이트에서 호스팅할 파일을 준비합니다.
간단한 페이지를 만들어 사용하겠습니다.

index.html

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>테스트 페이지</title>
	</head>
	<body>
		<p>테스트 페이지입니다.</p>
	</body>
</html>

Amazon S3 버킷 생성 및 준비

Amazon S3 버킷의 생성, 호스팅할 파일의 업로드, 정적 웹 사이트 호스팅 기능 설정과 버킷 정책 추가를 진행합니다.


버킷 생성

  • AWS Management Console에 로그인한 뒤 Amazon S3 Console에 접속합니다.
    https://console.aws.amazon.com/s3/
  • 버킷 만들기를 클릭합니다.
  • 버킷 이름을 입력합니다. (buffashecom-staticweb 등)
    Amazon S3 버킷을 CloudFront와 연결할 때에는 도메인 이름과 다른 이름을 사용하여야 합니다.
  • 리전을 선택합니다.
    주 사용자층과 인접한 리전을 선택하시면 됩니다.
    (Cache miss시 CloudFront와 Origin 사이의 레이턴시 감소)
  • 생성을 클릭합니다.

호스팅할 파일 업로드

생성한 S3 버킷에 호스팅할 파일을 업로드합니다.

  • 업로드를 클릭합니다.
  • 앞에서 생성한 파일을 추가합니다.
  • 업로드를 클릭합니다.

정적 웹 사이트 호스팅 기능 설정

버킷의 정적 웹 사이트 호스팅 기능을 활성화합니다.

  • 버킷의 속성 탭으로 이동합니다.
  • 정적 웹 사이트 호스팅을 활성화하고 인덱스 문서index.html을 입력한 뒤 저장합니다.

버킷 정책 추가

누구나 버킷에 접근할 수 있도록 버킷 정책을 구성합니다.

  • 버킷의 권한퍼블릭 액세스 차단 탭으로 이동합니다.
  • 편집을 클릭한 뒤 모든 퍼블릭 액세스 차단을 체크 해제하고 저장합니다.
  • 설정 확인 창에 확인을 입력한 뒤 확인을 클릭합니다.
  • 버킷의 권한버킷 정책 탭으로 이동합니다.
  • 인터넷의 누구나 버킷에 접근할 수 있도록 정책을 추가합니다.
    s3:GetObject, s3:GetObjectVersion 작업을 모두에게 허용합니다.
    다음 내용을 입력한 후 저장합니다.
    [버킷 ARN]은 버킷 정책 편집기에 표시된 ARN으로 대체합니다. (arn:aws:s3:::buffashecom-staticweb 등)
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": "*",
            "Action": [
                "s3:GetObject",
                "s3:GetObjectVersion"
            ],
            "Resource": "[버킷 ARN]/*"
        }
    ]
}
  • 버킷에 퍼블릭 액세스 권한이 부여된 것을 확인할 수 있습니다.

SSL 인증서 요청

AWS Certificate Manager를 통해 us-east-1(미국 동부; 버지니아 북부) 리전에서 SSL 인증서를 요청합니다.
CloudFront에서 사용되는 Custom SSL Certificate는 us-east-1에서 생성되어야 합니다.


  • us-east-1 리전에서 AWS Certificate Manager에 접속하여 인증서 프로비저닝을 클릭합니다.
    아래 페이지는 처음 접속한(인증서가 없는) 사용자에게만 표시되며, 인증서가 있는 분들은 인증서 요청을 클릭하시면 됩니다.
  • 공인 인증서 요청을 선택한 뒤 인증서 요청을 클릭합니다.
  • 발급할 주소(사용자들이 접속할 주소)를 입력합니다.

    Apex 도메인 – buffashe.com
    서브도메인 – blog.buffashe.com
    와일드카드 – *.buffashe.com (buffashe.com의 모든 서브도메인)
    에 모두 발급 가능합니다.
  • 입력한 뒤 다음을 클릭합니다.
  • 검증 방법을 선택합니다.
    DNS 검증을 사용하면 DNS 서비스에 추가할 CNAME 레코드가 유지되는 한 자동으로 인증서가 갱신되어 편리합니다.
  • 태그는 추가하지 않았습니다.
  • 입력한 사항을 검토한 뒤 확인 및 요청을 클릭합니다.
  • 인증서 검증에 사용할 CNAME 레코드(도메인 이름마다 1개씩)가 표시됩니다.
    Route 53 사용자는 Route 53에서 레코드 생성을 클릭하면 한 번에 입력 가능합니다.
    다른 DNS 서비스 사용자는 수동으로 입력하면 됩니다.
  • 인증서의 상태가 검증 보류에서 발급 완료가 되었는지 확인합니다.
    시간이 조금 소요되므로 다음 단계로 진행하셔도 됩니다.

CloudFront 웹 배포 생성

CloudFront는 AWS에서 제공하는 CDN입니다.
Amazon CloudFront란?


  • 웹 배포를 선택(Get Started 클릭)합니다.

Origin, Default Cache Behavior 설정

  • Origin Domain Name 입력 칸을 클릭하면 가능한 옵션이 표시되는데, 목록에 나오는 값 대신 위의 정적 웹 사이트 호스팅 기능 설정에서 표시된 정적 웹 사이트 호스팅 엔드포인트 주소를 입력합니다(http:// 제외).
    목록에서 선택해도 일반적인 정적 웹 호스팅에는 문제가 없지만, SPA(Single Page Application)를 호스팅 할 경우에는 엔드포인트를 직접 입력해야 합니다.
    정적 웹 사이트로 변환한 WordPress를 호스팅 할 때에도 정적 웹 사이트 호스팅 엔드포인트 주소를 직접 입력해야 정상적으로 작동했습니다.
  • 나머지 Origin, Default Cache Behavior 설정은 필요에 따라 변경하시면 됩니다.
    아래 설정은 예시로 참고하세요.

    HTTP 요청을 HTTPS로 리다이렉트
    기본 캐시 정책
    자동 gzip 압축
    을 설정했습니다.

Distribution 설정

  • 사용할 Alternate Domain Name들(쉼표 또는 줄 바꿈으로 구분)과 Custom SSL Certificate, Default Root Object를 설정합니다.

    SSL 인증서 요청에서 입력한 사용자들이 접속할 주소
    발급받은 SSL 인증서
    index.html
    로 설정했습니다.
    나머지 설정은 필요에 따라 변경하세요.
  • Create Distribution을 클릭하여 완료합니다.

  • Distribution Status가 InProgress인 것을 확인할 수 있습니다.
    각 엣지로의 배포가 완료되면 Deployed로 변경됩니다.
    시간이 조금 소요되므로 다음 단계로 진행하셔도 됩니다.

Route 53 설정

CloudFront Distribution과 기존에 보유한 도메인을 연결합니다.


  • 레코드 생성을 클릭합니다.
  • 단순 라우팅을 선택한 뒤 다음을 클릭합니다.
  • 단순 레코드 정의를 클릭합니다.

    레코드 이름에 사용할 도메인을 입력하고, 값/트래픽 라우팅 대상CloudFront 배포에 대한 별칭으로 설정합니다.
    배포 선택 입력 칸을 클릭하면 사용 가능한 Distribution의 주소가 표시됩니다.
    CloudFront 웹 배포 생성 단계에서 생성한 Distribution의 Domain Name과 일치하는 값을 선택합니다.

    단순 레코드 정의(완료)를 클릭합니다.
  • 레코드 설정을 확인하고 레코드 생성을 클릭합니다.

접속 확인

CloudFront와 도메인이 잘 연결되었는지 확인합니다.


  • HTTPS를 사용하여 접속되었으며, 유효한 인증서가 적용된 것을 확인할 수 있습니다.

참고 자료

The post CloudFront와 Amazon S3를 사용한 정적 웹 사이트 호스팅 appeared first on buffashe's Blog.

]]>
우분투 18.04 LTS에서 20.04 LTS로 업그레이드하기 https://blog.buffashe.com/2020/07/upgrade-ubuntu-18-04-lts-to-20-04-lts/ Wed, 29 Jul 2020 12:55:04 +0000 https://blog.buffashe.com/?p=656 우분투 18.04 Bionic Beaver에서 20.04 Focal Fossa로 업그레이드하는 방법입니다.16.04에서 18.04로의 업그레이드는 이 글을 참고해 주세요. 업그레이드 과정에서 부팅 불가 등의 … 더 보기 "우분투 18.04 LTS에서 20.04 LTS로 업그레이드하기"

The post 우분투 18.04 LTS에서 20.04 LTS로 업그레이드하기 appeared first on buffashe's Blog.

]]>
우분투 18.04 Bionic Beaver에서 20.04 Focal Fossa로 업그레이드하는 방법입니다.
16.04에서 18.04로의 업그레이드는 이 글을 참고해 주세요.

업그레이드 과정에서 부팅 불가 등의 문제가 발생할 수 있으니 위험을 인지하신 후에 진행하셔야 합니다.


패키지 업데이트

패키지를 최신 버전으로 업데이트합니다.

$ sudo apt update && sudo apt upgrade && sudo apt dist-upgrade

업데이트 완료 후 재부팅합니다.

$ sudo reboot now

더 이상 필요하지 않은 패키지를 삭제합니다.

$ sudo apt autoremove && sudo apt clean

업데이트 매니저 설치

update-manager-core가 설치되지 않은 경우 설치합니다.

$ sudo apt install update-manager-core

lts 릴리스로 업데이트 하기 위해 update-manager의 설정을 변경합니다.

$ sudo nano /etc/update-manager/release-upgrades

아래 내용과 같이 Prompt=lts로 변경합니다.

 Default behavior for the release upgrader.

[DEFAULT]
# Default prompting behavior, valid options:
#
#  never  - Never check for, or allow upgrading to, a new release.
#  normal - Check to see if a new release is available.  If more than one new
#           release is found, the release upgrader will attempt to upgrade to
#           the supported release that immediately succeeds the
#           currently-running release.
#  lts    - Check to see if a new LTS release is available.  The upgrader
#           will attempt to upgrade to the first LTS release available after
#           the currently-running one.  Note that if this option is used and
#           the currently-running release is not itself an LTS release the
#           upgrader will assume prompt was meant to be normal.
Prompt=lts

Ctrl+XYEnter 하여 저장합니다.


우분투 릴리스 업그레이드

업그레이드를 진행합니다.
아직 20.04로의 직접 업그레이드를 이용할 수 없으므로 -d 옵션을 사용합니다. (2020-07-29)

$ sudo do-release-upgrade -d
$ sudo do-release-upgrade -d
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [1554 B]                                                                    
Get:2 Upgrade tool [1333 kB]                                                                             
Fetched 1334 kB in 6s (203 kB/s)                                                                         
authenticate 'focal.tar.gz' against 'focal.tar.gz.gpg' 
extracting 'focal.tar.gz'

Reading cache

Checking package manager

Continue running under SSH? 

This session appears to be running under ssh. It is not recommended 
to perform a upgrade over ssh currently because in case of failure it 
is harder to recover. 

If you continue, an additional ssh daemon will be started at port 
'1022'. 
Do you want to continue? 

Continue [yN] 

SSH를 통한 업그레이드를 권장하지 않는다는 메시지가 표시됩니다.
업그레이드 후 문제가 생길 경우 복구가 어렵기 때문입니다.
그대로 진행할 시 추가 SSH 데몬이 1022번 포트에서 실행될 것이라고 알려줍니다.
y를 입력하여 확인합니다.


Continue [yN] y

Starting additional sshd 

To make recovery in case of failure easier, an additional sshd will 
be started on port '1022'. If anything goes wrong with the running 
ssh you can still connect to the additional one. 
If you run a firewall, you may need to temporarily open this port. As 
this is potentially dangerous it's not done automatically. You can 
open the port with e.g.: 
'iptables -I INPUT -p tcp --dport 1022 -j ACCEPT' 

To continue please press [ENTER]

방화벽 설정 업데이트 가이드입니다.
업그레이드 이후 문제가 발생할 경우 1022번 포트로 SSH 연결이 가능하다는 메시지입니다.
Enter를 입력하여 확인합니다.


To continue please press [ENTER]

Reading package lists... Done
Building dependency tree        
Reading state information... Done
Hit http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic InRelease                                 
Get:1 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]             
Get:2 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]           
Get:3 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]                              
Hit http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic InRelease                                 
Fetched 252 kB in 0s (0 B/s)                                                                             
Reading package lists... Done    
Building dependency tree          
Reading state information... Done

Updating repository information

Third party sources disabled 

Some third party entries in your sources.list were disabled. You can 
re-enable them after the upgrade with the 'software-properties' tool 
or your package manager. 

To continue please press [ENTER]

sources.list에 추가된 서드파티 저장소가 비활성화된다는 메시지입니다.
Enter를 입력하여 확인합니다.


.......

Do you want to start the upgrade?


18 installed packages are no longer supported by Canonical. You can
still get support from the community.

14 packages are going to be removed. 172 new packages are going to be
installed. 651 packages are going to be upgraded.

You have to download a total of 407 M. This download will take about
51 minutes with a 1Mbit DSL connection and about 15 hours with a 56k
modem.

Fetching and installing the upgrade can take several hours. Once the
download has finished, the process cannot be canceled.

 Continue [yN]  Details [d]

업그레이드 내용을 확인한 뒤 y를 입력하여 진행합니다.


 Continue [yN]  Details [d]y

.......

LXD 시스템 컨테이너 매니저의 설정 페이지입니다.
LTS 릴리스인 4.0을 선택하였습니다. (Enter)


.......

Configuration file '/etc/sysctl.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** sysctl.conf (Y/I/N/O/D/Z) [default=N] ? 

/etc/sysctl.conf이 업데이트되어 나오는 메시지입니다.
D를 입력하여 변경사항을 확인한 뒤 Y/N 중 하나를 입력합니다.


*** sysctl.conf (Y/I/N/O/D/Z) [default=N] ? d
--- /etc/sysctl.conf    2020-06-14 22:52:44.617580235 +0900
+++ /etc/sysctl.conf.dpkg-new   2020-02-14 07:44:31.000000000 +0900
@@ -25,7 +25,7 @@
 #net.ipv4.tcp_syncookies=1
 
 # Uncomment the next line to enable packet forwarding for IPv4
-net.ipv4.ip_forward=1
+#net.ipv4.ip_forward=1
 
 # Uncomment the next line to enable packet forwarding for IPv6
 #  Enabling this option disables Stateless Address Autoconfiguration
@@ -61,17 +61,8 @@
 
 ###################################################################
 # Magic system request Key
-# 0=disable, 1=enable all
-# Debian kernels have this set to 0 (disable the key)
-# See https://www.kernel.org/doc/Documentation/sysrq.txt
+# 0=disable, 1=enable all, >1 bitmask of sysrq functions
+# See https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html
 # for what other values do
-#kernel.sysrq=1
+#kernel.sysrq=438
 
-###################################################################
-# Protected links
-#
-# Protects against creating or following links under certain conditions
-# Debian kernels have both set to 1 (restricted) 
-# See https://www.kernel.org/doc/Documentation/sysctl/fs.txt
-#fs.protected_hardlinks=0
-#fs.protected_symlinks=0

Configuration file '/etc/sysctl.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** sysctl.conf (Y/I/N/O/D/Z) [default=N] ? n  

n을 입력하여 기존 파일의 내용을 유지하였습니다.
(IPv4 패킷 포워딩이 설정되었음)


기존의 openssh-server 설정 파일을 유지하였습니다.


.......

Reading package lists... Done    
Building dependency tree          
Reading state information... Done

Searching for obsolete software
Reading state information... Done

Remove obsolete packages? 


86 packages are going to be removed. 

 Continue [yN]  Details [d]

사용하지 않는 패키지를 삭제할지 묻는 메시지입니다.
y를 입력하여 삭제합니다.


System upgrade is complete.

Restart required 

To finish the upgrade, a restart is required. 
If you select 'y' the system will be restarted. 

Continue [yN] 

업그레이드 완료 메시지입니다.
y를 입력하여 재부팅합니다.


$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.1 LTS
Release:        20.04
Codename:       focal

업그레이드가 완료된 것을 확인할 수 있습니다.


(필요한 경우) 서드파티 저장소 활성화

위 과정에서 비활성화된 서드파티 저장소를 활성화합니다.

/etc/apt/sources.list.d/ 내부에 있는 *.list 파일의 내용을 확인하여

# ....... focal main # disabled on upgrade to focal

의 주석을 해제합니다.


패키지 목록을 다시 받아옵니다.

$ sudo apt update

The post 우분투 18.04 LTS에서 20.04 LTS로 업그레이드하기 appeared first on buffashe's Blog.

]]>
윈도우 10 락스크린 슬라이드 쇼 모드 변경하기 https://blog.buffashe.com/2020/07/change-windows-10-lockscreen-slide-show-mode/ Tue, 28 Jul 2020 06:47:29 +0000 https://blog.buffashe.com/?p=630 윈도우10의 락스크린 배경화면을 슬라이드 쇼로 지정하였을 때 콜라주 형식으로 표시됩니다.이미지를 한 개씩 슬라이드 쇼로 표시하도록 변경하겠습니다.Windows 10 Education 2004 (19041.388) … 더 보기 "윈도우 10 락스크린 슬라이드 쇼 모드 변경하기"

The post 윈도우 10 락스크린 슬라이드 쇼 모드 변경하기 appeared first on buffashe's Blog.

]]>
윈도우10의 락스크린 배경화면을 슬라이드 쇼로 지정하였을 때 콜라주 형식으로 표시됩니다.
이미지를 한 개씩 슬라이드 쇼로 표시하도록 변경하겠습니다.
Windows 10 Education 2004 (19041.388) 환경에서 진행합니다.


레지스트리 수정

레지스트리 편집기를 열어(Win + R -> regedit) 아래의 경로로 이동합니다.

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen

DWORD (32-bit) 값 SlideshowLayout을 생성합니다.

유효한 값은 1부터 9까지이며, 의미는 다음과 같습니다.

  1. 한 개의 이미지를 수평으로 배치
  2. 두 개의 이미지를 수평 타일 형태로 배치
  3. 세 개의 이미지를 수평 타일 형태로 배치
  4. 네 개의 이미지를 수평 타일 형태로 배치
  5. 다섯 개의 이미지를 수평 타일 형태로 배치
  6. 여섯 개의 이미지를 수평 타일 형태로 배치
  7. 한 개의 이미지를 수직으로 배치
  8. 두 개의 이미지를 수직 타일 형태로 배치
  9. 세 개의 이미지를 수직 타일 형태로 배치

마지막 숫자부터 슬라이드 쇼가 시작되며, 311로 설정하면 1 -> 1 -> 3 순서로 표시됩니다.

저는 DWORD 값을 1로 설정하여 사용중입니다.


참고 자료

https://answers.microsoft.com/en-us/windows/forum/windows_10-start/lock-screen-slideshow-showing-tiled-photos/4d56e24c-a353-4c93-ac61-fc2159033a6e [Archived]

https://superuser.com/questions/1243643/is-there-a-way-to-get-a-windows-10-lock-screen-slide-show-without-tiling-or-zoom [Archived]

The post 윈도우 10 락스크린 슬라이드 쇼 모드 변경하기 appeared first on buffashe's Blog.

]]>
macOS에서의 iPhone 연결 끊김 현상 https://blog.buffashe.com/2020/02/macos-iphone-disconnecting/ Tue, 25 Feb 2020 09:15:36 +0000 https://blog.buffashe.com/?p=600 MacBook Pro (Retina, 15-inch, Mid 2015), macOS 10.15.3과 iPhone Xs를 사용 중입니다. Mac에 iPhone을 USB로 연결하였을 때 제대로 인식되지 않고 … 더 보기 "macOS에서의 iPhone 연결 끊김 현상"

The post macOS에서의 iPhone 연결 끊김 현상 appeared first on buffashe's Blog.

]]>
MacBook Pro (Retina, 15-inch, Mid 2015), macOS 10.15.3과 iPhone Xs를 사용 중입니다.

Mac에 iPhone을 USB로 연결하였을 때 제대로 인식되지 않고 빠르게 연결-연결 해제를 반복할 때의 해결법입니다.


터미널 명령 실행

응용 프로그램유틸리티터미널
(ApplicationsUtilitiesTerminal)
위 경로에 들어가 터미널을 실행합니다.


터미널에 다음 명령어를 입력합니다.

% sudo killall -STOP -c usbd

표시되는 비밀번호 입력 프롬프트에 macOS 사용자 비밀번호를 입력하시면 됩니다.
(화면에 비밀번호는 표시되지 않으니 입력한 뒤에 Enter합니다.)

buffashe@buffashe-MacBook-Pro ~ % sudo killall -STOP -c usbd
Password:

The post macOS에서의 iPhone 연결 끊김 현상 appeared first on buffashe's Blog.

]]>
PiVPN 설치하기 (OpenVPN) https://blog.buffashe.com/2020/02/installing-pivpn-openvpn/ Fri, 21 Feb 2020 07:12:32 +0000 https://blog.buffashe.com/?p=551 PiVPN은 WireGuard와 OpenVPN을 Raspberry Pi에 간단히 설치하기 위해 만들어졌습니다.다른 리눅스 배포판에도 설치 가능하기 때문에 우분투 18.04에 설치해 보겠습니다. PIVPN: Simplest … 더 보기 "PiVPN 설치하기 (OpenVPN)"

The post PiVPN 설치하기 (OpenVPN) appeared first on buffashe's Blog.

]]>
PiVPN은 WireGuard와 OpenVPN을 Raspberry Pi에 간단히 설치하기 위해 만들어졌습니다.
다른 리눅스 배포판에도 설치 가능하기 때문에 우분투 18.04에 설치해 보겠습니다.

PIVPN: Simplest way to setup a VPN


PiVPN 설치

$ curl -L https://install.pivpn.io | bash

PiVPN 설치 관리자가 실행됩니다. Enter를 눌러 확인합니다.


고정 IP 사용을 권장한다는 메시지입니다.


저는 Raspbian을 사용중이지 않기 때문에 고정 IP 설정을 건너뛴다고 알려줍니다.
Amazon EC2나 Lightsail 등을 사용하는 경우 사전에 고정 IP를 할당하는 것이 좋습니다.


ovpn 파일을 보관할 사용자를 선택하게 됩니다.


원하는 사용자를 Space로 선택합니다. (‘*‘가 표시됨)


OpenVPN을 선택합니다.


사용할 프로토콜을 선택합니다.


OpenVPN의 UDP 기본 포트인 1194를 사용합니다.


설정이 맞는지 확인합니다.


사용할 DNS 제공자를 선택합니다.
Google DNS를 선택하였습니다. (8.8.8.8, 8.8.4.4)


서치 도메인은 추가하지 않습니다.


ovpn 파일에 지정될 IP 주소 또는 DNS 이름을 선택합니다. 공인 IP를 자동으로 받아와 표시합니다.

도메인을 보유한 사용자는 DNS Entry 옵션을 선택하시면 됩니다. (vpn.buffashe.com 등)


OpenVPN 2.4부터 추가된 ECC 옵션의 사용 여부를 물어봅니다.

이 옵션이 활성화된 경우 iPhone 클라이언트에서 접속이 불가하여 사용하지 않겠습니다.


RSA 인증서의 크기를 설정합니다. 기본 옵션인 2048비트로 설정하였습니다.


사전에 정의된 DHE 그룹의 사용 여부를 선택합니다. IETF에서 권장하는 방법이기 때문에 사용하겠습니다.
Pre-defined DHE groups


서버 키HMAC 키를 생성하게 됩니다.


unattended-upgrades를 활성화합니다. 자동으로 보안 업데이트를 확인하고 설치하게 됩니다. 주기적인 서버 재시작이 권장됩니다.


설치가 완료되었습니다. <Yes>를 선택하여 서버를 재시작합니다.


PiVPN 기본 명령어

$ pivpn
::: Control all PiVPN specific functions!
:::
::: Usage: pivpn <command> [option]
:::
::: Commands:
:::  -a, add [nopass]     Create a client ovpn profile, optional nopass
:::  -c, clients          List any connected clients to the server
:::  -d, debug            Start a debugging session if having trouble
:::  -l, list             List all valid and revoked certificates
:::  -r, revoke           Revoke a client ovpn profile
:::  -h, help             Show this help dialog
:::  -u, uninstall        Uninstall PiVPN from your system!
:::  -up, update          Updates PiVPN Scripts
:::  -bk, backup          Backup Openvpn and ovpns dir
-a: 클라이언트 추가; nopass 옵션을 사용하면 비밀번호 없이 접속 가능
-c: 현재 접속된 클라이언트 목록
-d: 디버깅 세션 시작
-l: 생성된 클라이언트 인증서(*.ovpn)의 목록 (revoke된 인증서도 포함)
-r: 클라이언트 인증서 제거 (접속 권한 제거)
-h: 도움말 페이지
-u: PiVPN 제거
-up: PiVPN 업데이트
-bk: OpenVPN, ovpns(클라이언트 인증서) 디렉토리 백업

클라이언트 추가

$ pivpn -a
Enter a Name for the Client:  buffashe-iPhone
How many days should the certificate last?  1080
Enter the password for the client:  
Enter the password again to verify:

클라이언트의 이름, 인증서 유효기간, 비밀번호를 입력합니다.


========================================================
Done! buffashe-iPhone.ovpn successfully created! 
buffashe-iPhone.ovpn was copied to:
  /home/buffashe/ovpns
for easy transfer. Please use this profile only on one
device and create additional profiles for other devices.
========================================================

/home/buffashe/ovpns 디렉토리에 ovpn 파일이 생성됩니다.

~/ovpns$ ls -la
total 16
drwxr-x--- 2 buffashe buffashe 4096 Feb 12 15:20 .
drwxr-xr-x 6 buffashe buffashe 4096 Feb 12 15:14 ..
-rw-r----- 1 buffashe buffashe 5226 Feb 12 15:20 buffashe-iPhone.ovpn

생성된 ovpn 파일을 사용하여 서버에 연결하면 됩니다.

The post PiVPN 설치하기 (OpenVPN) appeared first on buffashe's Blog.

]]>
우분투 18.04 LTS NTP 클라이언트 설정 https://blog.buffashe.com/2020/02/ntp-client-in-ubuntu-18-04/ Wed, 12 Feb 2020 02:36:37 +0000 https://blog.buffashe.com/?p=537 우분투 18.04 LTS에 NTP를 설치하여 시간을 동기화합니다. NTP 설치 NTP 설정 사용할 서버를 선택합니다. pool.ntp.org의 NTP 서버를 사용하겠습니다.한국 pool: https://www.ntppool.org/zone/kr … 더 보기 "우분투 18.04 LTS NTP 클라이언트 설정"

The post 우분투 18.04 LTS NTP 클라이언트 설정 appeared first on buffashe's Blog.

]]>
우분투 18.04 LTS에 NTP를 설치하여 시간을 동기화합니다.


NTP 설치

$ sudo apt install ntp

NTP 설정

사용할 서버를 선택합니다.

pool.ntp.org의 NTP 서버를 사용하겠습니다.
한국 pool: https://www.ntppool.org/zone/kr

1.kr.pool.ntp.org
1.asia.pool.ntp.org
0.asia.pool.ntp.org

NTP 설정을 변경합니다.

$ sudo nano /etc/ntp.conf
# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# more information.
pool 0.ubuntu.pool.ntp.org iburst
pool 1.ubuntu.pool.ntp.org iburst
pool 2.ubuntu.pool.ntp.org iburst
pool 3.ubuntu.pool.ntp.org iburst

# Use Ubuntu's ntp server as a fallback.
pool ntp.ubuntu.com

미리 설정되어 있던 서버들을 주석 처리한 뒤 선택한 서버의 주소를 입력합니다.

# Specify one or more NTP servers.

server 1.kr.pool.ntp.org
server 1.asia.pool.ntp.org
server 0.asia.pool.ntp.org

# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# more information.
#pool 0.ubuntu.pool.ntp.org iburst
#pool 1.ubuntu.pool.ntp.org iburst
#pool 2.ubuntu.pool.ntp.org iburst
#pool 3.ubuntu.pool.ntp.org iburst

# Use Ubuntu's ntp server as a fallback.
#pool ntp.ubuntu.com

Ctrl + XYEnter 하여 저장합니다.


NTP 서비스를 재시작합니다.

$ sudo service ntp restart

동기화 확인

$ sudo ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+ec2-13-124-227- 131.130.251.107  2 u   31   64   37   12.167    0.067   3.915
 time.cloudflare 10.51.8.5        3 u  297   64   20   34.039   -7.609   0.000
*send.mx.cdnetwo 216.239.35.8     2 u   32   64   37    3.745    3.930   3.948

첫 번째 column이 ‘*‘인 서버가 현재 동기화 중인 서버입니다.

The post 우분투 18.04 LTS NTP 클라이언트 설정 appeared first on buffashe's Blog.

]]>
우분투 16.04 LTS에서 18.04 LTS로 업그레이드하기 https://blog.buffashe.com/2020/02/upgrade-ubuntu-16-04-lts-to-18-04-lts/ Tue, 11 Feb 2020 09:07:44 +0000 https://blog.buffashe.com/?p=499 우분투 16.04 Xenial Xerus에서 18.04 Bionic Beaver로 업그레이드하는 방법입니다.18.04에서 20.04로의 업그레이드는 이 글을 참고해 주세요. 업그레이드 과정에서 부팅 불가 등의 … 더 보기 "우분투 16.04 LTS에서 18.04 LTS로 업그레이드하기"

The post 우분투 16.04 LTS에서 18.04 LTS로 업그레이드하기 appeared first on buffashe's Blog.

]]>
우분투 16.04 Xenial Xerus에서 18.04 Bionic Beaver로 업그레이드하는 방법입니다.
18.04에서 20.04로의 업그레이드는 이 글을 참고해 주세요.

업그레이드 과정에서 부팅 불가 등의 문제가 발생할 수 있으니 위험을 인지하신 후에 진행하셔야 합니다.


패키지 업데이트

패키지를 최신 버전으로 업데이트합니다.

$ sudo apt update && sudo apt upgrade && sudo apt dist-upgrade

업데이트 완료 후 재부팅합니다.

$ sudo reboot now

더 이상 필요하지 않은 패키지를 삭제합니다.

$ sudo apt autoremove && sudo apt clean

업데이트 매니저 설치

update-manager-core가 설치되지 않은 경우 설치합니다.

$ sudo apt install update-manager-core

lts 릴리스로 업데이트 하기 위해 update-manager의 설정을 변경합니다.

$ sudo nano /etc/update-manager/release-upgrades

아래 내용과 같이 Prompt=lts로 변경합니다.

# Default behavior for the release upgrader.

[DEFAULT]
# Default prompting behavior, valid options:
#
#  never  - Never check for a new release.
#  normal - Check to see if a new release is available.  If more than one new
#           release is found, the release upgrader will attempt to upgrade to
#           the release that immediately succeeds the currently-running
#           release.
#  lts    - Check to see if a new LTS release is available.  The upgrader
#           will attempt to upgrade to the first LTS release available after
#           the currently-running one.  Note that this option should not be
#           used if the currently-running release is not itself an LTS
#           release, since in that case the upgrader won't be able to
#           determine if a newer release is available.
Prompt=lts

Ctrl+XYEnter 하여 저장합니다.


우분투 릴리스 업그레이드

업그레이드를 진행합니다.

$ sudo do-release-upgrade
$ sudo do-release-upgrade
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [819 B]                                                        
Get:2 Upgrade tool [1,242 kB]                                                               
Fetched 1,243 kB in 0s (0 B/s)                                                              
authenticate 'bionic.tar.gz' against 'bionic.tar.gz.gpg' 
extracting 'bionic.tar.gz'

Reading cache

Checking package manager

Continue running under SSH? 

This session appears to be running under ssh. It is not recommended 
to perform a upgrade over ssh currently because in case of failure it 
is harder to recover. 

If you continue, an additional ssh daemon will be started at port 
'1022'. 
Do you want to continue? 

Continue [yN] 

SSH를 통한 업그레이드를 권장하지 않는다는 메시지가 표시됩니다.
업그레이드 후 문제가 생길 경우 복구가 어렵기 때문입니다.
그대로 진행할 시 추가 SSH 데몬이 1022번 포트에서 실행될 것이라고 알려줍니다.
y를 입력하여 확인합니다.


Continue [yN] y

Starting additional sshd 

To make recovery in case of failure easier, an additional sshd will 
be started on port '1022'. If anything goes wrong with the running 
ssh you can still connect to the additional one. 
If you run a firewall, you may need to temporarily open this port. As 
this is potentially dangerous it's not done automatically. You can 
open the port with e.g.: 
'iptables -I INPUT -p tcp --dport 1022 -j ACCEPT' 

To continue please press [ENTER]

방화벽 설정 업데이트 가이드입니다.
업그레이드 이후 문제가 발생할 경우 1022번 포트로 SSH 연결이 가능하다는 메시지입니다.
Enter를 입력하여 확인합니다.


To continue please press [ENTER]

Reading package lists... Done
Building dependency tree        
Reading state information... Done
Hit http://kr.archive.ubuntu.com/ubuntu xenial InRelease                                    
Hit http://security.ubuntu.com/ubuntu xenial-security InRelease                             
Get:1 http://kr.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]                 
Get:2 http://kr.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]               
Fetched 216 kB in 0s (0 B/s)                                                                
Reading package lists... Done    
Building dependency tree          
Reading state information... Done

Updating repository information
Get:1 http://kr.archive.ubuntu.com/ubuntu bionic InRelease [242 kB]  

.......

Checking package manager
Reading package lists... Done    
Building dependency tree          
Reading state information... Done

Calculating the changes

Calculating the changes

Do you want to start the upgrade? 


54 installed packages are no longer supported by Canonical. You can 
still get support from the community. 

40 packages are going to be removed. 402 new packages are going to be 
installed. 1496 packages are going to be upgraded. 

You have to download a total of 1,099 M. This download will take 
about 2 minutes with your connection. 

Installing the upgrade can take several hours. Once the download has 
finished, the process cannot be canceled. 

 Continue [yN]  Details [d]

업그레이드 내용을 확인한 뒤 y를 입력하여 진행합니다.


 Continue [yN]  Details [d]y

Lock screen disabled 

Your lock screen has been disabled and will remain disabled until you 
reboot. 

To continue please press [ENTER]
Inhibiting until Ctrl+C is pressed...

우분투를 gnome-desktop 환경에서 실행중이기 때문에 재부팅 전까지 락스크린이 비활성화될 것이라고 알려줍니다.
Enter를 입력하여 확인합니다.


Configuration file '/etc/update-manager/release-upgrades'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** release-upgrades (Y/I/N/O/D/Z) [default=N] ? 

/etc/update-manager/release-upgrades가 업데이트되어 나오는 메시지입니다.
D를 입력하여 변경사항을 확인할 수 있습니다.

--- /etc/update-manager/release-upgrades        2020-02-11 16:55:07.071327392 +0900
+++ /etc/update-manager/release-upgrades.dpkg-new       2019-06-20 01:49:56.000000000 +0900
@@ -3,16 +3,14 @@
 [DEFAULT]
 # Default prompting behavior, valid options:
 #
-#  never  - Never check for a new release.
+#  never  - Never check for, or allow upgrading to, a new release.
 #  normal - Check to see if a new release is available.  If more than one new
 #           release is found, the release upgrader will attempt to upgrade to
-#           the release that immediately succeeds the currently-running
-#           release.
+#           the supported release that immediately succeeds the
+#           currently-running release.
 #  lts    - Check to see if a new LTS release is available.  The upgrader
 #           will attempt to upgrade to the first LTS release available after
-#           the currently-running one.  Note that this option should not be
-#           used if the currently-running release is not itself an LTS
-#           release, since in that case the upgrader won't be able to
-#           determine if a newer release is available.
+#           the currently-running one.  Note that if this option is used and
+#           the currently-running release is not itself an LTS release the
+#           upgrader will assume prompt was meant to be normal.
 Prompt=lts
-
(END)

주석 내용만 업데이트 되었으므로 q를 입력하여 비교 창을 닫습니다.

*** release-upgrades (Y/I/N/O/D/Z) [default=N] ? y

y를 입력하여 업데이트된 버전으로 대체하겠습니다.


Searching for obsolete software
Reading state information... Done

Remove obsolete packages? 


116 packages are going to be removed. 

Removing the packages can take several hours. 

 Continue [yN]  Details [d]

사용하지 않는 패키지를 삭제할지 묻는 메시지입니다.
y를 입력하여 삭제합니다.


System upgrade is complete.

Restart required 

To finish the upgrade, a restart is required. 
If you select 'y' the system will be restarted. 

Continue [yN] 

업그레이드 완료 메시지입니다.
y를 입력하여 재부팅합니다.


$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.4 LTS
Release:        18.04
Codename:       bionic

업그레이드가 완료된 것을 확인할 수 있습니다.

The post 우분투 16.04 LTS에서 18.04 LTS로 업그레이드하기 appeared first on buffashe's Blog.

]]>
우분투 시간대(timezone) 변경하기 https://blog.buffashe.com/2020/02/changing-ubuntu-timezone/ Thu, 06 Feb 2020 05:30:56 +0000 https://blog.buffashe.com/?p=473 우분투 18.04.4 LTS 환경에서 진행하였습니다. 현재 설정된 시간대는 timedatectl 명령어를 사용하여 확인할 수 있습니다. 현재 Etc/UTC로 설정되어 있습니다. 방법 1: … 더 보기 "우분투 시간대(timezone) 변경하기"

The post 우분투 시간대(timezone) 변경하기 appeared first on buffashe's Blog.

]]>
우분투 18.04.4 LTS 환경에서 진행하였습니다.


현재 설정된 시간대는 timedatectl 명령어를 사용하여 확인할 수 있습니다.

buffashe@buffashe-vm:~$ timedatectl
                      Local time: Thu 2020-02-06 04:46:15 UTC
                  Universal time: Thu 2020-02-06 04:46:15 UTC
                        RTC time: Thu 2020-02-06 04:46:17
                       Time zone: Etc/UTC (UTC, +0000)
       System clock synchronized: yes
systemd-timesyncd.service active: yes
                 RTC in local TZ: no

현재 Etc/UTC로 설정되어 있습니다.


방법 1: dpkg-reconfigure 사용

$ sudo dpkg-reconfigure tzdata

방향키를 사용하여 원하는 지역을 찾은 뒤 Enter키를 누릅니다.


변경할 시간대를 찾아 Enter키를 누르시면 설정이 완료됩니다.

buffashe@buffashe-vm:~$ sudo dpkg-reconfigure tzdata

Current default time zone: 'Asia/Seoul'
Local time is now:      Thu Feb  6 13:56:11 KST 2020.
Universal Time is now:  Thu Feb  6 04:56:11 UTC 2020.
 

방법 2: timedatectl 사용

원하는 시간대를 검색합니다.

$ timedatectl list-timezones

$ timedatectl list-timezones | grep Seoul
Asia/Seoul

시간대를 변경합니다.

$ sudo timedatectl set-timezone Asia/Seoul

변경된 것을 확인할 수 있습니다.

buffashe@buffashe-vm:~$ timedatectl
                      Local time: Thu 2020-02-06 14:00:59 KST
                  Universal time: Thu 2020-02-06 05:00:59 UTC
                        RTC time: Thu 2020-02-06 05:01:01
                       Time zone: Asia/Seoul (KST, +0900)
       System clock synchronized: yes
systemd-timesyncd.service active: yes
                 RTC in local TZ: no

The post 우분투 시간대(timezone) 변경하기 appeared first on buffashe's Blog.

]]>