天天看點

Ubuntu Server 18.04.3 LTS 安裝圖形界面

Ubuntu Server 18.04.3 LTS 使用U盤安裝方式安裝後,預設是沒有圖形界面的,但是因為習慣了一些圖形畫界面,是以還是嘗試安裝了熟悉的gnome桌面。

Ubuntu Server 18.04.3 LTS 安裝圖形界面

安裝步驟

  1. 先配置好可用的國内鏡像,備份

    mv sources.list sources.list.bak

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://cn.archive.ubuntu.com/ubuntu bionic main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu bionic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://cn.archive.ubuntu.com/ubuntu bionic-updates main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu bionic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://cn.archive.ubuntu.com/ubuntu bionic universe
# deb-src http://cn.archive.ubuntu.com/ubuntu bionic universe
deb http://cn.archive.ubuntu.com/ubuntu bionic-updates universe
# deb-src http://cn.archive.ubuntu.com/ubuntu bionic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://cn.archive.ubuntu.com/ubuntu bionic multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu bionic multiverse
deb http://cn.archive.ubuntu.com/ubuntu bionic-updates multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu bionic-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://cn.archive.ubuntu.com/ubuntu bionic-backports main restricted universe multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu bionic-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner

deb http://cn.archive.ubuntu.com/ubuntu bionic-security main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu bionic-security main restricted
deb http://cn.archive.ubuntu.com/ubuntu bionic-security universe
# deb-src http://cn.archive.ubuntu.com/ubuntu bionic-security universe
deb http://cn.archive.ubuntu.com/ubuntu bionic-security multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu bionic-security multiverse
           
  1. 編輯

    sudo vi /etc/apt/sources.list

    檔案,清空檔案内容,填充下面的清華大學鏡像位址,儲存退出 :wq
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
	deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
	deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
	deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
	deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
	
	deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
	deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
	deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
	deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
	deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
           
  1. 打開終端視窗并發出指令:

    sudo apt-get install ubuntu-gnome-desktop

    輸入您的sudo密碼。上面的指令将獲得大量的依賴,并要求您确定安裝。出現提示時,鍵入“y”,安裝将繼續。安裝完成後,您應該重新啟動伺服器。當機器啟動時,它會将您登入到圖形登入螢幕上,在那裡您可以登入并享受GNOME桌面。

安裝過程中遇到的問題

  • The method driver /usr/lib/apt/methods/https could not be found

Sounds like you may have added some https sources. Since there are no https sources in your sources.list, it would be something in /etc/apt/sources.list.d/.

You may also be dealing with a proxy that always redirects to https.

You can add support for https apt sources by installing a couple of packages:

apt-get install apt-transport-https ca-certificates

If your apt-get is too broken to do this, you can download the package directly and install it with dpkg -i. Any additional dependencies of that package can be tracked down and fetched similarly (dpkg will let you know if anything is missing).

If it still doesn’t work, you might try editing the source entry to use http instead of https, or just remove it and start over following the source maintainer’s instructions.
  • The method driver /usr/lib/apt/methods/https could not be found
  • Unable to correct problems, you have held broken packages
  • How to fix -bash: aptitude: command not found Error
  • sed 字元串替換
  • Ubuntu系統在終端中重新開機與關機
  • Linux 伺服器上建立使用者并配置設定權限-不錯
  • 關于linux下/srv、/var和/tmp的職責區分
    伺服器被用作Web開發時,html檔案更應該被放在/srv/www下,而不是/var/www下(因為/srv目錄是新标準中才有的,出現較晚;而且Apache将/var/www設為了web預設目錄,是以現在絕大多數人都把web檔案放在/var/www,這是個曆史遺留問題)。

參考原文

-如何在Ubuntu Server 18.04上安裝GNOME桌面

相關資料

  • Ubuntu系統中apt-get和aptitude的使用-總結的很好
  • ubuntu包管理指令apt和dpkg的用法
  • aptitude (Debian系統的包管理工具)
  • /ubuntu/pool/main/a/apt

Ubuntu 鏡像使用幫助

# 預設注釋了源碼鏡像以提高 apt update 速度,如有需要可自行取消注釋
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse

# 預釋出軟體源,不建議啟用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse