腾讯云Ubuntu Server 16.04.1 LTS升级系统到Ubuntu 18.04.1 LTS

发布时间:2025-12-09 11:46:18 浏览次数:1

说明:系统为腾讯云Ubuntu Server 16.04.1 LTS目的:演示系统由Ubuntu Server 16.04.1升级到Ubuntu Server 18.0过程中遇到的问题与解决方式(非完美升级,仅供参考)。注意:非完美升级,仅供参考  1,升级系统过程中配置openssh-server的确认提示:     如选择第二项(保持当前版本),会出现SSH无法连接的问题(SSH服务启动错误),需要用VNS连接登录,并重装openssh-server;     如选择第一项(安装新版本),则系统升级重启后,SSH可正常连接登录系统。  2,升级后apt update会报错 【临时解决方案】:      需要修改DNS(/etc/resolv.conf),可在升级前查看并备份此文件,升级后还原。      系统升级后/etc/resolv.conf文件修改前:      nameserver 127.0.0.53      系统升级后/etc/resolv.conf文件修改后(可在升级前查看并备份此文件,升级后还原):      nameserver 10.112.65.31      nameserver 10.112.65.32  * /etc/resolv.conf【不建议修改:This file is managed by man:systemd-resolved(8). Do not edit】

1、SSH 登录Ubuntu 16.04.1 LTS

ubuntu@VM-000-000-ubuntu:~$ ssh ubuntu@000.00.00.00ubuntu@000.00.00.00's password:Welcome to Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-130-generic x86_64) * Documentation:  https://help.ubuntu.com * Management:     https://landscape.canonical.com * Support:        https://ubuntu.com/advantageNew release '18.04.1 LTS' available.Run 'do-release-upgrade' to upgrade to it.Last login: Fri Nov 23 21:09:29 2018 from 000.000.000.00

2、更新软件

ubuntu@VM-000-000-ubuntu:~$ sudo apt update && sudo apt upgradeHit:1 http://mirrors.tencentyun.com/ubuntu xenial InReleaseHit:2 http://mirrors.tencentyun.com/ubuntu xenial-security InReleaseHit:3 http://mirrors.tencentyun.com/ubuntu xenial-updates InReleaseReading package lists... DoneBuilding dependency treeReading state information... Done221 packages can be upgraded. Run 'apt list --upgradable' to see them.Reading package lists... DoneBuilding dependency treeReading state information... DoneCalculating upgrade... DoneThe following NEW packages will be installed:  libdrm-common libsnappy1v5 libxmlsec1 libxmlsec1-openssl libxslt1.1 linux-headers-4.4.0-139  linux-headers-4.4.0-139-generic linux-image-4.4.0-139-generic linux-image-extra-4.4.0-139-generic  ubuntu-advantage-toolsThe following packages will be upgraded:  accountsservice amd64-microcode apparmor apt apt-transport-https apt-utils base-files bind9-host binutils bsdutils  btrfs-tools cloud-guest-utils cloud-initramfs-copymods cloud-initramfs-dyn-netconf console-setup console-setup-linux  coreutils cpp-5 crash cryptsetup cryptsetup-bin curl dbus distro-info-data dns-root-data dnsmasq-base dnsutils dpkg  dpkg-dev friendly-recovery fuse g++-5 gcc-5 gcc-5-base gettext-base git git-man gnupg gpgv grub-common  grub-legacy-ec2 grub-pc grub-pc-bin grub2-common hdparm ifupdown init init-system-helpers initramfs-tools  initramfs-tools-bin initramfs-tools-core intel-microcode iproute2 isc-dhcp-common kbd kdump-tools kexec-tools  keyboard-configuration klibc-utils kmod krb5-locales language-selector-common less libaccountsservice0  libapparmor-perl libapparmor1 libapt-inst2.0 libapt-pkg5.0 libasan2 libasprintf0v5 libatomic1 libaudit-common  libaudit1 libbind9-140 libblkid1 libc-bin libcc1-0 libcilkrts5 libcryptsetup4 libcurl3-gnutls libdbus-1-3  libdns-export162 libdns162 libdpkg-perl libdrm2 libfdisk1 libfuse2 libgcc-5-dev libglib2.0-0 libglib2.0-data  libgnutls-openssl27 libgnutls30 libgomp1 libgssapi-krb5-2 libisc-export160 libisc160 libisccc140 libisccfg140  libitm1 libk5crypto3 libklibc libkmod2 libkrb5-3 libkrb5support0 libldap-2.4-2 liblsan0 liblwres141 libmount1  libmpx0 libmspack0 libnuma1 libp11-kit0 libpam-modules libpam-modules-bin libpam-runtime libpam-systemd libpam0g  libparted2 libpci3 libplymouth4 libpng12-0 libpolkit-agent-1-0 libpolkit-backend-1-0 libpolkit-gobject-1-0  libpython-stdlib libpython2.7-minimal libpython2.7-stdlib libpython3.5 libpython3.5-minimal libpython3.5-stdlib  libquadmath0 libsasl2-2 libsasl2-modules libsasl2-modules-db libseccomp2 libslang2 libsmartcols1 libstdc++-5-dev  libstdc++6 libsystemd0 libtsan0 libubsan0 libudev1 libuuid1 libx11-6 libx11-data libxml2 linux-base linux-crashdump  linux-firmware linux-generic linux-headers-generic linux-image-generic linux-libc-dev locales logrotate lshw lxcfs  lxd lxd-client makedev makedumpfile mdadm mount multiarch-support nano ntp open-iscsi open-vm-tools openssh-client  openssh-server openssh-sftp-server openssl os-prober overlayroot parted pciutils plymouth plymouth-theme-ubuntu-text  policykit-1 python python-apt-common python-cryptography python-minimal python-openssl python-requests  python-urllib3 python2.7 python2.7-minimal python3-apt python3-problem-report python3-requests  python3-software-properties python3-update-manager python3-urllib3 python3.5 python3.5-minimal resolvconf  shared-mime-info snapd software-properties-common sosreport squashfs-tools systemd systemd-sysv tzdata  ubuntu-core-launcher ubuntu-minimal ubuntu-server ubuntu-standard udev unattended-upgrades update-manager-core  update-notifier-common util-linux uuid-runtime vlan wireless-regdb xdg-user-dirs xfsprogs zlib1g221 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.Need to get 230 MB of archives.After this operation, 360 MB of additional disk space will be used.Do you want to continue? [Y/n]yGet:1 http://mirrors.tencentyun.com/ubuntu xenial-updates/main amd64 base-files amd64 9.4ubuntu4.7 [65.9 kB]Get:2 http://mirrors.tencentyun.com/ubuntu xenial-updates/main amd64 bsdutils amd64 1:2.27.1-6ubuntu3.6 [51.2 kB]Get:3 http://mirrors.tencentyun.com/ubuntu xenial-updates/main amd64 coreutils amd64 8.25-2ubuntu3~16.04 [1,174 kB].........Get:228 http://mirrors.tencentyun.com/ubuntu xenial-updates/main amd64 xfsprogs amd64 4.3.0+nmu1ubuntu1.1 [597 kB]Get:229 http://mirrors.tencentyun.com/ubuntu xenial-updates/main amd64 ubuntu-server amd64 1.361.2 [2,560 B]Get:230 http://mirrors.tencentyun.com/ubuntu xenial-updates/main amd64 unattended-upgrades all 0.90ubuntu0.9 [32.3 kB]Get:231 http://mirrors.tencentyun.com/ubuntu xenial-updates/main amd64 wireless-regdb all 2018.05.09-0ubuntu1~16.04.1 [11.7 kB]Fetched 230 MB in 5s (40.1 MB/s)Extracting templates from packages: 100%Preconfiguring packages ...(Reading database ... 66624 files and directories currently installed.)Preparing to unpack .../base-files_9.4ubuntu4.7_amd64.deb ...Unpacking base-files (9.4ubuntu4.7) over (9.4ubuntu4.2) ...Processing triggers for man-db (2.7.5-1) ...Processing triggers for install-info (6.1.0.dfsg.1-5) ...Processing triggers for plymouth-theme-ubuntu-text (0.9.2-3ubuntu13.1) ............Installing new version of config file /etc/console-setup/compose.ISO-8859-4.inc ...Installing new version of config file /etc/console-setup/compose.ISO-8859-7.inc ...Installing new version of config file /etc/console-setup/compose.ISO-8859-9.inc ...Setting up console-setup (1.108ubuntu15.4) ...update-initramfs: deferring update (trigger activated)Setting up ubuntu-minimal (1.361.2) ...Processing triggers for libc-bin (2.23-0ubuntu10) ...Processing triggers for systemd (229-4ubuntu21.9) ...Processing triggers for ureadahead (0.100.0-19) ...Processing triggers for resolvconf (1.78ubuntu6) ...Processing triggers for initramfs-tools (0.122ubuntu8.13) ...update-initramfs: Generating /boot/initrd.img-4.4.0-139-genericcryptsetup: WARNING: failed to detect canonical device of /dev/vda1cryptsetup: WARNING: could not determine root device from /etc/fstabW: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
更新过程确的认提示1
更新过程的确认提示2
更新过程的确认提示3
ubuntu@VM-000-000-ubuntu:~$ sudo apt dist-upgradeReading package lists... DoneBuilding dependency treeReading state information... DoneCalculating upgrade... Done0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

3、升级系统

ubuntu@VM-000-000-ubuntu:~$ sudo do-release-upgradeChecking for a new Ubuntu release.........Reading cacheChecking package managerContinue running under SSH?This session appears to be running under ssh. It is not recommendedto perform a upgrade over ssh currently because in case of failure itis harder to recover.If you continue, an additional ssh daemon will be started at port'1022'.Do you want to continue?Continue [yN]yStarting additional sshdTo make recovery in case of failure easier, an additional sshd willbe started on port '1022'. If anything goes wrong with the runningssh you can still connect to the additional one.If you run a firewall, you may need to temporarily open this port. Asthis is potentially dangerous it's not done automatically. You canopen the port with e.g.:'iptables -I INPUT -p tcp --dport 1022 -j ACCEPT'To continue please press [ENTER]Reading package lists... DoneBuilding dependency treeReading state information... DoneHit http://mirrors.tencentyun.com/ubuntu xenial InReleaseHit http://mirrors.tencentyun.com/ubuntu xenial-security InReleaseHit http://mirrors.tencentyun.com/ubuntu xenial-updates InReleaseFetched 0 B in 0s (0 B/s)Reading package lists... DoneBuilding dependency treeReading state information... DoneUpdating repository informationNo valid mirror foundWhile scanning your repository information no mirror entry for theupgrade was found. This can happen if you run an internal mirror orif the mirror information is out of date.Do you want to rewrite your 'sources.list' file anyway? If you choose'Yes' here it will update all 'xenial' to 'bionic' entries.If you select 'No' the upgrade will cancel.Continue [yN]y.........Get:45 http://mirrors.tencentyun.com/ubuntu bionic-updates/multiverse amd64 Packages [5,692 B]Get:46 http://mirrors.tencentyun.com/ubuntu bionic-updates/multiverse i386 Packages [5,844 B]Get:47 http://mirrors.tencentyun.com/ubuntu bionic-updates/multiverse Translation-en [3,176 B]Fetched 38.9 MB in 6s (6,299 kB/s)Checking package managerReading package lists... DoneBuilding dependency treeReading state information... DoneCalculating the changesCalculating the changesDo you want to start the upgrade?3 installed packages are no longer supported by Canonical. You canstill get support from the community.3 packages are going to be removed. 127 new packages are going to beinstalled. 476 packages are going to be upgraded.You have to download a total of 346 M. This download will take about54 seconds with your connection.Installing the upgrade can take several hours. Once the download hasfinished, the process cannot be canceled. Continue [yN]  Details [d]y.........Get:601 http://mirrors.tencentyun.com/ubuntu bionic-updates/main amd64 ssh-import-id all 5.7-0ubuntu1.1 [10.9 kB]Get:602 http://mirrors.tencentyun.com/ubuntu bionic-updates/main amd64 vlan amd64 1.9-3.2ubuntu6 [30.7 kB]Get:603 http://mirrors.tencentyun.com/ubuntu bionic/main amd64 zerofree amd64 1.0.4-1 [8,112 B]Fetched 346 MB in 6s (22.6 MB/s)UpgradingFetched 0 B in 0s (0 B/s)  MarkInstall libc6 [ amd64 ] < 2.23-0ubuntu10 -> 2.27-3ubuntu1 > ( libs ) FU=1    MarkInstall locales [ amd64 ] < 2.23-0ubuntu10 -> 2.27-3ubuntu1 > ( libs ) FU=0    Installing libc-bin as Depends of locales      MarkInstall libc-bin [ amd64 ] < 2.23-0ubuntu10 -> 2.27-3ubuntu1 > ( libs ) FU=0Starting pkgProblemResolver with broken count: 0Starting 2 pkgProblemResolver with broken count: 0DoneUpgradingFetched 0 B in 0s (0 B/s)Preconfiguring packages ...Preconfiguring packages ...Preconfiguring packages ...Preconfiguring packages ...(Reading database ... 99266 files and directories currently installed.)Preparing to unpack .../libc-dev-bin_2.27-3ubuntu1_amd64.deb ...Unpacking libc-dev-bin (2.27-3ubuntu1) over (2.23-0ubuntu10) ...Progress: [  7%]Preparing to unpack .../libc6-dev_2.27-3ubuntu1_amd64.deb ...Progress: [ 15%]Unpacking libc6-dev:amd64 (2.27-3ubuntu1) over (2.23-0ubuntu10) ...Progress: [ 23%]Preparing to unpack .../locales_2.27-3ubuntu1_all.deb ...Unpacking locales (2.27-3ubuntu1) over (2.23-0ubuntu10) ............Calculating the changesCalculating the changesUpgradingFetched 0 B in 0s (0 B/s)Extracting templates from packages: 100%Preconfiguring packages ...Extracting templates from packages: 100%Preconfiguring packages ...Extracting templates from packages: 100%Preconfiguring packages ...Extracting templates from packages: 100%Preconfiguring packages ...(Reading database ... 99341 files and directories currently installed.)Preparing to unpack .../base-files_10.1ubuntu2.3_amd64.deb ...Unpacking base-files (10.1ubuntu2.3) over (9.4ubuntu4.7) ...Processing triggers for plymouth-theme-ubuntu-text (0.9.2-3ubuntu13.5) ...update-initramfs: deferring update (trigger activated)Processing triggers for install-info (6.1.0.dfsg.1-5) ...Processing triggers for man-db (2.7.5-1) ...Processing triggers for initramfs-tools (0.122ubuntu8.13) ...update-initramfs: Generating /boot/initrd.img-4.4.0-139-genericcryptsetup: WARNING: failed to detect canonical device of /dev/vda1cryptsetup: WARNING: could not determine root device from /etc/fstabW: mdadm: /etc/mdadm/mdadm.conf defines no arrays.Setting up base-files (10.1ubuntu2.3) ...Installing new version of config file /etc/debian_version ...Installing new version of config file /etc/issue ...Installing new version of config file /etc/issue.net ...Installing new version of config file /etc/lsb-release ...Updating /etc/profile to current default.motd-news.service is a disabled or a static unit, not starting it.Processing triggers for plymouth-theme-ubuntu-text (0.9.2-3ubuntu13.5) ...update-initramfs: deferring update (trigger activated)Processing triggers for initramfs-tools (0.122ubuntu8.13) ...update-initramfs: Generating /boot/initrd.img-4.4.0-139-genericcryptsetup: WARNING: failed to detect canonical device of /dev/vda1cryptsetup: WARNING: could not determine root device from /etc/fstabW: mdadm: /etc/mdadm/mdadm.conf defines no arrays.(Reading database ... 99348 files and directories currently installed.)Preparing to unpack .../debianutils_4.8.4_amd64.deb ...Unpacking debianutils (4.8.4) over (4.7) ...Processing triggers for man-db (2.7.5-1) ...Setting up debianutils (4.8.4) ...(Reading database ... 99348 files and directories currently installed.)Preparing to unpack .../bash_4.4.18-2ubuntu1_amd64.deb ...Unpacking bash (4.4.18-2ubuntu1) over (4.3-14ubuntu1.2) ...Processing triggers for install-info (6.1.0.dfsg.1-5) ...Processing triggers for man-db (2.7.5-1) ...Setting up bash (4.4.18-2ubuntu1) ...Configuration file '/etc/bash.bashrc' ==> 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.*** bash.bashrc (Y/I/N/O/D/Z) [default=N] ?N.........Installing new version of config file /etc/pam.d/systemd-user ...Installing new version of config file /etc/systemd/journald.conf ...Installing new version of config file /etc/systemd/logind.conf ...Installing new version of config file /etc/systemd/resolved.conf ...Configuration file '/etc/systemd/system.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.*** system.conf (Y/I/N/O/D/Z) [default=N] ?N.........Setting up procps (2:3.3.12-3ubuntu1.1) ...Installing new version of config file /etc/init.d/procps ...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.........
升级系统过程中的确认提示1
.........Installing new version of config file /etc/dhcp/dhclient-exit-hooks.d/ntp ...Installing new version of config file /etc/init.d/ntp ...Configuration file '/etc/ntp.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.*** ntp.conf (Y/I/N/O/D/Z) [default=N] ?N.........
升级系统过程中的确认提示:配置SSH,选择第一项(安装新版本:升级后可正常SSH登录,选第二项(保留原版本:升级后SSH无法登录,需VNC登录)。
.........Installing new version of config file /etc/apparmor.d/usr.sbin.rsyslogd ...Installing new version of config file /etc/init.d/rsyslog ...Configuration file '/etc/logrotate.d/rsyslog' ==> 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.*** rsyslog (Y/I/N/O/D/Z) [default=N] ?N.........
.........Setting up libsnappy1v5:amd64 (1.1.7-1) ...Setting up resolvconf (1.79ubuntu10) ...Configuration file '/etc/resolvconf/resolv.conf.d/head' ==> 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.*** head (Y/I/N/O/D/Z) [default=N] ?N........./etc/kernel/postinst.d/zz-update-grub:Generating grub configuration file ...Found linux image: /boot/vmlinuz-4.15.0-39-genericFound initrd image: /boot/initrd.img-4.15.0-39-genericFound linux image: /boot/vmlinuz-4.4.0-139-genericFound initrd image: /boot/initrd.img-4.4.0-139-genericFound linux image: /boot/vmlinuz-4.4.0-130-genericFound initrd image: /boot/initrd.img-4.4.0-130-genericdoneProcessing triggers for sgml-base (1.29) ...Processing triggers for resolvconf (1.79ubuntu10) ...Reading package lists... DoneBuilding dependency treeReading state information... DoneSearching for obsolete softwareReading state information... DoneRemove obsolete packages?39 packages are going to be removed. Continue [yN]  Details [d]y ... ... ...Purging configuration files for linux-image-4.4.0-139-generic (4.4.0-139.165) ...Examining /etc/kernel/postrm.d .run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-genericrun-parts: executing /etc/kernel/postrm.d/kdump-tools 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-genericrun-parts: executing /etc/kernel/postrm.d/x-grub-legacy-ec2 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-genericrun-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-genericRemoving python-ndg-httpsclient (0.4.4-1) ...Removing python-pyasn1 (0.4.2-3) ...Removing tcpd (7.6.q-27) ...Processing triggers for man-db (2.8.3-2ubuntu0.1) ...System upgrade is complete.Restart requiredTo finish the upgrade, a restart is required.If you select 'y' the system will be restarted.Continue [yN]y

4、SSH登录系统

如连接失败,多尝试几次。

ubuntu@VM-000-000-ubuntu:~$ ssh ubuntu@000.00.00.00The authenticity of host '000.00.00.00 (000.00.00.00)' can't be established.ECDSA key fingerprint is SHA256:0QC1fWjbAjJ1prAQLGAgUGYLvaDAZ88MQuYO0kbdxxw.Are you sure you want to continue connecting (yes/no)? yesFailed to add the host to the list of known hosts (/home/ubuntu/.ssh/known_hosts).Connection closed by 000.00.00.00 port 22ubuntu@000.000.00.00's password:Welcome to Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-39-generic x86_64) * Documentation:  https://help.ubuntu.com * Management:     https://landscape.canonical.com * Support:        https://ubuntu.com/advantage  System information as of Fri Nov 23 22:21:28 CST 2018  System load:  0.03              Processes:           83  Usage of /:   5.1% of 49.09GB   Users logged in:     0  Memory usage: 6%                IP address for eth0: 00.000.000.000  Swap usage:   0%Last login: Fri Nov 23 21:09:56 2018 from 000.000.00.00

5、修改DNS【临时方案】

ubuntu@VM-000-000-ubuntu:~$ sudo apt updateErr:1 http://mirrors.tencentyun.com/ubuntu bionic InRelease  Temporary failure resolving 'mirrors.tencentyun.com'Err:2 http://mirrors.tencentyun.com/ubuntu bionic-security InRelease  Temporary failure resolving 'mirrors.tencentyun.com'Err:3 http://mirrors.tencentyun.com/ubuntu bionic-updates InRelease  Temporary failure resolving 'mirrors.tencentyun.com'Reading package lists... DoneBuilding dependency treeReading state information... DoneAll packages are up to date.W: Failed to fetch http://mirrors.tencentyun.com/ubuntu/dists/bionic/InRelease  Temporary failure resolving 'mirrors.tencentyun.com'W: Failed to fetch http://mirrors.tencentyun.com/ubuntu/dists/bionic-security/InRelease  Temporary failure resolving 'mirrors.tencentyun.com'W: Failed to fetch http://mirrors.tencentyun.com/ubuntu/dists/bionic-updates/InRelease  Temporary failure resolving 'mirrors.tencentyun.com'W: Some index files failed to download. They have been ignored, or old ones used instead.ubuntu@VM-000-000-ubuntu:~$ systemd-resolve --statusGlobal          DNSSEC NTA: 10.in-addr.arpa                      16.172.in-addr.arpa                      168.192.in-addr.arpa                      17.172.in-addr.arpa                      18.172.in-addr.arpa                      19.172.in-addr.arpa                      20.172.in-addr.arpa                      21.172.in-addr.arpa                      22.172.in-addr.arpa                      23.172.in-addr.arpa                      24.172.in-addr.arpa                      25.172.in-addr.arpa                      26.172.in-addr.arpa                      27.172.in-addr.arpa                      28.172.in-addr.arpa                      29.172.in-addr.arpa                      30.172.in-addr.arpa                      31.172.in-addr.arpa                      corp                      d.f.ip6.arpa                      home                      internal                      intranet                      lan                      local                      private                      testLink 2 (eth0)      Current Scopes: none       LLMNR setting: yesMulticastDNS setting: no      DNSSEC setting: no    DNSSEC supported: no
sudo vi /etc/resolv.conf# This file is managed by man:systemd-resolved(8). Do not edit.## This is a dynamic resolv.conf file for connecting local clients to the# internal DNS stub resolver of systemd-resolved. This file lists all# configured search domains.## Run "systemd-resolve --status" to see details about the uplink DNS servers# currently in use.## Third party programs must not access this file directly, but only through the# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,# replace this symlink by a static file or a different symlink.## See man:systemd-resolved.service(8) for details about the supported modes of# operation for /etc/resolv.conf.nameserver 127.0.0.53
#nameserver 127.0.0.53nameserver 10.112.65.31nameserver 10.112.65.32
ubuntu@VM-000-000-ubuntu:~$ sudo apt updateHit:1 http://mirrors.tencentyun.com/ubuntu bionic InReleaseHit:2 http://mirrors.tencentyun.com/ubuntu bionic-security InReleaseHit:3 http://mirrors.tencentyun.com/ubuntu bionic-updates InReleaseReading package lists... DoneBuilding dependency treeReading state information... DoneAll packages are up to date.

* 此修改方案为临时方案(/etc/resolv.conf文件系统重启后会自动还原),最终方案待定,下方为腾讯云原装Ubuntu 18.04.1 LTS系统镜像 systemd-resolve --status执行结果,仅供参考。

ubuntu@VM-000-000-ubuntu:~$ systemd-resolve --statusGlobal          DNSSEC NTA: 10.in-addr.arpa                      16.172.in-addr.arpa                      168.192.in-addr.arpa                      17.172.in-addr.arpa                      18.172.in-addr.arpa                      19.172.in-addr.arpa                      20.172.in-addr.arpa                      21.172.in-addr.arpa                      22.172.in-addr.arpa                      23.172.in-addr.arpa                      24.172.in-addr.arpa                      25.172.in-addr.arpa                      26.172.in-addr.arpa                      27.172.in-addr.arpa                      28.172.in-addr.arpa                      29.172.in-addr.arpa                      30.172.in-addr.arpa                      31.172.in-addr.arpa                      corp                      d.f.ip6.arpa                      home                      internal                      intranet                      lan                      local                      private                      testLink 3 (eth0)      Current Scopes: DNS       LLMNR setting: yesMulticastDNS setting: no      DNSSEC setting: no    DNSSEC supported: no         DNS Servers: 10.112.65.31                      10.112.65.32

其他:SSH无法连接服务器,VNC连接

注:如升级系统系统重启后SSH无法连接(等待比较长时间后),需通过VNC登录到服务器,卸载重装SSH。

其他:重装SSH

sudo apt update && sudo apt upgradesudo apt purge openssh-serversudo apt install openssh-server
ubuntu 16.04 lts
需要做网站?需要网络推广?欢迎咨询客户经理 13272073477