安裝Ubuntu服務器版 + 遠程鏈接ssh +更換阿里雲源

安裝Ubuntu服務器版shell

  一、點擊 「開啓此虛擬機」,開始安裝。ubuntu

  

  二、默認選擇English,英文版安裝,直接按Enter鍵便可。服務器

  

  三、默認選擇「Install Ubuntu Server」,安裝ubuntu服務器版。ssh

  

  四、繼續默認項「English」ionic

  

  五、國家或地區咱們選擇  「Other」--> "Asia" --> "China"佈局

  

  

  

  六、繼續默認項阿里雲

  

  七、是否檢測鍵盤佈局,咱們選擇「No」加密

   

  八、鍵盤佈局所屬國家:English  ;鍵盤佈局:English  。兩項都是默認便可。spa

  

  

  九、設置主機名字,根據本身的須要來,而後按「↓」選擇「Continue」,繼續。代理

   

  十、建立新用戶:輸入新用戶全名(注意:不是登陸帳號,至關於描述)

  

  十一、設置帳戶名(該帳戶名是用來登陸的),我默認和上一項一致。

  

  十二、設置密碼和再次填入密碼

  

  

  1三、是否使用強度弱的密碼,我選擇「Yes」

  

  1四、是否加密主目錄,選擇「No」

  

  1五、時區是否正確,這裏顯示的事哈爾濱,咱們先選擇「Yes」。系統安裝好以後咱們能夠更改成上海。

  

  1六、磁盤分區,默認爲第二個選項,但爲了簡單省事,我選擇了第一個

  

  1七、選擇分區,這裏只有一個,咱們選擇默認便可。

  

  1八、是否將變動寫入硬盤,咱們選擇「Yes」

  

  1九、「若是您須要用HTTP代理來連接外部網咯,請在這裏輸入代理的信息。不然,請置空。」

          這裏我置空,而後繼續。

  

  20、稍等片刻以後,出現下面界面,選擇更新方式,咱們選擇不自動更新

  

  2一、我選擇把OpenSSH server安裝上,按空格選中,而後按「Enter」鍵確認繼續

  

  2二、將GRUB安裝至硬盤?咱們默認選擇「Yes」

  

  2三、默認繼續,系統會自動重啓,而後進入登陸界面。

   

  2四、登陸界面,至此,Ubuntu服務器版基本安裝完成。

  

 

更換阿里雲的源  下載會快一些:

  

修改阿里源爲Ubuntu 18.04默認的源

備份/etc/apt/sources.list
#備份
cp /etc/apt/sources.list /etc/apt/sources.list.bak

在/etc/apt/sources.list文件前面添加以下條目
#添加阿里源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

最後執行以下命令更新源
##更新
sudo apt-get update
sudo apt-get upgrade

另外其餘幾個國內源以下:
中科大源
##中科大源
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src 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-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates 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-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src 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-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

163源
##163源
deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse

清華源
##清華源
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

 

Ubuntu 默認不提供ssh服務:

    也就是說沒法用 Xshell 鏈接

1、安裝ssh服務
sudo apt-get install openssh-server

2、修改配置文件
sudo vi /etc/ssh/sshd_config
#PermitRootLogin without-password #註釋掉這行
PermitRootLogin yes #增長這行

#重啓服務
/etc/init.d/ssh restart
相關文章
相關標籤/搜索