Upgrade Version Ubuntu 16.04 LTS to 18.04 LTS

ช่วงนี้ลองเล่น Open NSFW ของ Yahoo ในการทำ Adult Image Detection แต่ทำบน Windows ค่อนข้างจะยุ่งยาก เลยจะลองบน Ubuntu โดยใช้ VM ที่มีอยู่ แต่เป็น Ubuntu 16.04 ซึ่ง Open NSFW ต้องการ Ubuntu 17.04 ขึ้นไป เราจึงจะมาทำการ Upgrade Version Ubuntu กัน


Get Started

  • ตรวจสอบ Linux Distribution
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:        16.04
Codename:       bionic
  • ทำการ Upgrade และ Upgrade เวอร์ชั่นปัจจุบันก่อน Ubuntu 16.04
# apt-get update && apt-get upgrade -y
  • ติดตั้ง Ubuntu Update Manager
# apt-get install update-manager-core -y
  • ทำการแก้ไขไฟล์ Configuration ให้ใช้ค่า Default
# vi /etc/update-manager/release-upgrades
# 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
  • ทำการ Upgrade Version Ubuntu 16.04 LTS เป็น 18.04 LTS แล้วคลิก Y
# do-release-upgrade -d
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [819 B]
Get:2 Upgrade tool [1,246 kB]
Fetched 1,247 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] y
  •  คลิก Enter
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]
  •  คลิก Y เพื่อเริ่มทำการ Upgrade
Do you want to start the upgrade?


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

41 packages are going to be removed. 400 new packages are going to be
installed. 1532 packages are going to be upgraded.

You have to download a total of 1,050 M. This download will take
about 6 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
  • คลิก Y เพื่อทำการ Remove Package
Remove obsolete packages?


124 packages are going to be removed.

Removing the packages can take several hours.

 Continue [yN]  Details [d] y
  • คลิก Y เพื่อทำการ Reboot
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
  • ตรวจสอบ Linux Distribution อีกครั้งหนึ่ง
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.2 LTS
Release:        18.04
Codename:       bionic

อ่านเพิ่มเติม : https://bit.ly/2H1bIHT


Leave a Reply

Your email address will not be published. Required fields are marked *