一、Ubuntu Server 16.10 LTS 系統安裝
Ubuntu 16.10 分為 桌面版 (desktop)和服務器版(Server)。兩者對於用戶而言,最大的區別在於桌面版有圖形操作界面,而服務器版本只能使用命令行來對系統進行控制 (目前服務器版本也可以在安裝完成后,自行添加圖形界面)。從使用者的角度來說,由於舍棄了圖形界面,並且擁有更為穩定的更新支持,服務器版本更加適用於長期、穩定和低功耗(降低服務器的使用量,內存、CPU、顯卡等)的運行並向外界提供服務,而桌面版的Ubuntu則更適合用於日常的辦公和娛樂。以下的回答摘自Ubuntu Documentation。
What's the difference between desktop and server?
1. The first difference is in the CD contents. The "Server" CD avoids including what Ubuntu considers desktop packages (packages like X, Gnome or KDE), but does include server related packages (Apache2, Bind9 and so on). Using a Desktop CD with a minimal installation and installing, for example, apache2 from the network, one can obtain the exact same result that can be obtained by inserting the Server CD and installing apache2 from the CD-ROM. (服務器版本的安裝包內含服務器基礎應用,例如 Apache2, Bind9;而桌面版本的安裝包則包含Gnome,KDE, X 等應用)
2. The Ubuntu Server Edition installation process is slightly different from the Desktop Edition. Since by default Ubuntu Server doesn't have a GUI, the process is menu driven, very similar to the Alternate CD installation process. (安裝的過程不同,服務器版本由於沒有圖形界面,安裝的過程是通過菜單選項來進行的。這個我們接下去會接觸到)
3. Before 12.04, Ubuntu server installs a server-optimized kernel by default. Since 12.04, there is no difference in kernel between Ubuntu Desktop and Ubuntu Server since linux-image-server is merged into linux-image-generic. (12.04 之前的服務器版本是使用了服務器優化的內核的,而12.04之后,桌面版和服務器版本的內核就沒有什么區別了。)
4. For Ubuntu LTS releases before 12.04, the Ubuntu Desktop Edition only receives 3 years of support. This was increased to 5 years in Ubuntu LTS 12.04 In contrast, all Ubuntu LTS Server Edition releases are supported for 5 years.(12.04之前的桌面版只有3年的支持服務,而所有的服務器版本都擁有5年的支持更新服務。)
我使用的安裝環境是VMware vSphere Clinet, 是針對服務器集群應用的虛擬機環境。用啟動盤成功引導之后,出現下面的界面。選擇安裝語言English (目前在虛擬機內安裝Ubuntu 14之后的服務器版本均不能選擇中文(簡體)選項,會在安裝過程中出現異常而導致安裝失敗。)





































二、開啟管理員Root賬號
一般我們在服務器內的操作都需要通過管理員Root賬號來進行。
sudo passwd root #啟用Root賬號並設置密碼, 根據提示輸入兩次密碼
su root #從普通用戶切換到root用戶,根據提示輸入root密碼
su moodletsg #從root用戶切回到普通用戶,在 su 之后輸入你自己的用戶名
sudo passwd -l root #禁用root賬號,要重啟則輸入 sudo passwd root 再次設置密碼
三、設置網絡環境
1、首先查看下當前的網絡環境
ifconfig # 查看當前的網絡連接情況,類似於Windows命令提示符環境下的 ipconfig

2、配置網絡
通過nano來編輯網絡配置文件,該文件位於/etc/network下,文件名為interface
nano /etc/network/interface

當前的網絡IP獲取方式為 DHCP模式,我們的服務器需要采用固定IP來使外部用戶使用服務器上提供的服務。修改#The primary network interface 下的內容:
auto ens192
iface ens192 inet static #inet static 設定為靜態IP
address 172.30.10.140 #設定靜態IP地址,可根據ifconfig中的IP地址信息來填寫
netmask 255.255.255.0 #子網掩碼,根據你的網段設置來填寫
gateway 172.30.10.1 #網關,根據你的服務器所在網段的網關地址來填寫
dns-nameservers 172.20.123.9 #設置DNS
dns-nameservers 8.8.8.8
Ctrl + o #保存配置
Ctrl + x #退出
service networking restart #重啟網絡,應用新配置。如果出現新配置未生效,則需要重啟服務器。
如果在設置完成后發現仍然無法上網,則需要查看DNS緩存配置
nano /etc/resolv.conf #在命令行中輸入,來編輯DNS緩存配置文件
nameserver 172.20.123.9 #設置首選DNS
nameserver 8.8.8.8 #設置備用DNS
Ctrl + o
Ctrl + x

三、更新
在正式開始使用Ubuntu Server之前,對軟件源和軟件包進行更新,以便於后續的軟件安裝。
apt-get update #更新源
apt-get upgrade #更新軟件包
作者:蔣承愛拖延
鏈接:http://www.jianshu.com/p/febb39acabd2#
來源:簡書
著作權歸作者所有。商業轉載請聯系作者獲得授權,非商業轉載請注明出處。