Ubuntu Server / do-release-upgrade / 버전 업그레이드 명령어

Ubuntu 새 버전이 나오면 어떻게 업그레이드를 할까? 새로 설치하고 다시 설정하는 게 제일 좋지만, 설정할 게 많다면 바로 업그레이드를 할 수도 있다.

업그레이드는 do-release-upgrade 명령어로 한다.

do-release-upgrade -h
Usage: do-release-upgrade [options]
Options:
  -h, --help            show this help message and exit
  -V, --version         Show version and exit
  -d, --devel-release   If using the latest supported release, upgrade to the
                        development release
  --data-dir=DATA_DIR   Directory that contains the data files
  -p, --proposed        Try upgrading to the latest release using the upgrader
                        from $distro-proposed
  -m MODE, --mode=MODE  Run in a special upgrade mode. Currently 'desktop' for
                        regular upgrades of a desktop system and 'server' for
                        server systems are supported.
  -f FRONTEND, --frontend=FRONTEND
                        Run the specified frontend
  -c, --check-dist-upgrade-only
                        Check only if a new distribution release is available
                        and report the result via the exit code
  --allow-third-party   Try the upgrade with third party mirrors and
                        repositories enabled instead of commenting them out.
  -q, --quiet

주의할 점은...

  • 만일의 사태에 대비해서 중요한 자료와 설정은 백업한다.
  • SSH로 원격 접속하여 업그레이드하는 것은 권장하지 않는다. 연결이 끊길 수 있으므로 컴퓨터에서 직접 한다.(하지만, SSH로도 잘 되기는 한다.)
  • 업그레이드를 마치면 재부팅을 해야 한다.
  • 클라우드 서비스에 있는 가상 머신의 경우 버전 업그레이드를 권장하지 않거나 금지하기도 한다. 서비스 제공자에게 미리 문의하는 게 좋다.
같은 카테고리의 다른 글
Ubuntu 18.04 Server / Apache / 사용자 인증 만드는 방법

Ubuntu 18.04 Server / Apache / 사용자 인증 만드는 방법

웹사이트의 콘텐츠를 특정 사용자만 볼 수 있게 하는 방법은 여러 가지가 있습니다. 만약 웹서버에 대한 충분한 권한이 있다면, Apache를 이용하여 구현할 수 있습니다. 비밀번호 파일 만들기 비밀번호 파일은 htpasswd 명령어로 만듭니다. /home/auth/ 디렉토리에 passwords라는 이름의 파일을 만들고, 사용자 user1의 비밀번호를 정하고 싶다면 다음과 같이 명령합니다. # htpasswd -c /home/auth/passwords user1 .htaccess 파일 만들기 웹사이트의 루트 ...

Ubuntu 16.04 Server / logrotate 설치하고 설정하기

우분투(Ubuntu)는 여러 작업의 내용을 로그(Log) 파일로 남깁니다. 예를 들어 웹서버 운영과 관련된 로그는 /var/log/apache2에 있습니다. 로그는 기본적으로 하나의 파일에 계속 추가하는 것이어서, 시간이 지날수록 파일의 크기가 커집니다. 로그 파일의 크기가 너무 커지면, 시스템이 느려지거나 다운되기도 합니다. 이러한 문제를 해결해주는 패키지가 logrotate입니다. 로그 파일이 일정 기준을 충족하면 기존 로그 파일을 다른 이름으로 변경하여 저장하고 ...

Ubuntu 16.04 Server / 고정 IP 설정하는 방법

네트워크 설정 파일은 /etc/network/interfaces이다. 우분투를 DHCP로 설치했다면 설정 파일의 내용은 다음과 비슷하게 되어 있다. # The primary network interface auto enp0s3 iface enp0s3 inet dhcp 이를 다음처럼 변경하고 저장한다. xxx.xxx.xxx.xxx는 네트워크 환경에 맞게 수정한다. # The primary network interface auto enp0s3 iface enp0s3 inet static address xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx gateway xxx.xxx.xxx.xxx dns-nameservers xxx.xxx.xxx.xxx 다음과 같이 명령하여 네트워크를 재시작한다. systemctl restart networking.service 만약 위와 같이 해도 ...

Ubuntu 16.04 / Apache / javascript 폴더 접근이 안되는 문제 해결하는 방법

javascript 폴더 접근 불가 우분투(Ubuntu)에서 아파치(Apache)로 웹서버를 운영할 때 이상한 문제가 하나 발생합니다. 사이트 경로에 javascript가 있으면 forbidden 에러가 나는 것입니다. Forbidden You don't have permission to access /javascript/ on this server. 이 문제가 발생하는 이유는 자바스크립트 설정 때문입니다. /etc/apache2/conf-available/javascript-common.conf에 다음과 같은 코드가 있습니다. Alias /javascript /usr/share/javascript/ javascript로 접속하면 /usr/share/javascript/로 연결시키라는 뜻입니다. 사이트 접속자는 /usr/share/javascript/에 접속 권한이 없으므로 forbidden 에러가 ...

Ubuntu 16.04 Server / PHP / 메모리 늘리는 방법

PHP 설정은 php.ini에서 한다. Ubuntu 16.04에서 php.ini의 위치는 /etc/php/7.0/apache2/php.ini 이다. PHP 버전에 따라 7.0은 다른 숫자일 수 있다. 메모리를 늘리기 위해 수정해야 할 것은 memory_limit이다. 기본값은 128M이다. 128을 적절히 변경한다. memory_limit = 128M 변경한 설정이 적용되도록 하려면 웹서버를 다시 시작하거나 다시 로드한다. Apache 웹서버라면 다음과 같이 명령하여 다시 시작할 수 있고, # service apache2 restart 다음과 같이 ...

Ubuntu 18.04 / 메모

SSH 설정 설정 파일 /etc/ssh/sshd_config 포트 변경하기 다음 코드를 #Port 22 다음처럼 바꾼다. Port 1234 포트 번호는 자신이 원하는 것으로... root 계정 로그인 가능하게 만들기 다음 코드를 #PermitRootLogin prohibit-password 다음처럼 만든다. PermitRootLogin yes 설정 변경 적용하기 service ssh restart

Ubuntu 22.04 Server / 백신 프로그램 ClamAV 설치 및 사용법

ClamAV ClamAV는 리눅스에서 사용할 수 있는 백신 프로그램이다. 우분투 패키지에 포함되어 있으므로 apt 명령으로 쉽게 설치하고 사용할 수 있다. 설치 # apt install clamav 사용법 데이터베이스 업데이트 clamav-freshclam 서비스를 중지한다. # systemctl stop clamav-freshclam freshclam 명령으로 업데이트한다. # freshclam clamav-freshclam 서비스를 시작한다. # systemctl start clamav-freshclam 검사 home 디렉토리와 그 하위 디렉토리를 검사한다. # clamscan -r /home 검사 결과는 다음처럼 나온다. ----------- SCAN SUMMARY ----------- Known viruses: ...

Ubuntu Server / 메모

MariaDB / 포트 변경 MariaDB의 기본 접속 포트는 3306입니다. 이를 다른 포트로 변경하고 싶다면 /etc/mysql/mariadb.conf.d/50-server.cnf를 수정합니다. port = 3306 을 찾아서 원하는 포트로 변경한 후 저장합니다. 그리고 MariaDB를 재시작합니다. service mysql restart MariaDB / Can't connect to MySQL server on ... (10061) 다음과 같은 에러를 만났다면... Can't connect to MySQL server on ... (10061) /etc/mysql/mariadb.conf.d/50-server.cnf에 있는 bind-address = 127.0.0.1 를 ...

Ubuntu 16.04 / phpMyAdmin / 특정 IP에서만 접속 가능하게 만드는 방법

우분투 16.04에서 phpMyAdmin을 패키지로 설치했을 때, 기본 설정은 모든 IP에서 접속 가능입니다. 만약 특정 IP에서만 접속 가능하게 하려면 /etc/apache2/conf-available/phpmyadmin.conf에 다음 코드를 추가합니다. <Directory /usr/share/phpmyadmin> Order deny,allow Deny from all Allow from xxx.xxx.xxx.xxx </Directory> xxx.xxx.xxx.xxx는 접속하려는 IP로 바꿉니다. 여러 IP를 설정하고 싶을 때는 띄어쓰기로 구분합니다. <Directory /usr/share/phpmyadmin> Order deny,allow Deny from all ...

Ubuntu 20.04 / 글꼴 설치하는 방법

Ubuntu 20.04 / 글꼴 설치하는 방법

Ubuntu 20.04 Desktop 설치하려는 글꼴을 더블 클릭하거나, 글꼴 선택 후 엔터키를 누르거나, 마우스 우클릭 후 를 클릭합니다. 상단에 있는 를 클릭합니다. 설치가 완료되면 으로 바뀝니다. 글꼴이 잘 설치되었는지 확인합니다.