以前寫到如何建立一個虛擬機環境,在VMware上建立linux。html
上一塊參考連接:http://www.javashuo.com/article/p-btohtmei-na.htmllinux
此文主要講Centos7的安裝,包括分區,基本設置,密碼設置,安裝功能選擇。web
1、相關附件
Centos7下載地址:https://mirrors.aliyun.com/centos-vault/7.6.1810/isos/x86_64/CentOS-7-x86_64-DVD-1810.torrentwindows
VMware下載地址:https://my.vmware.com/cn/web/vmware/downloads/info/slug/desktop_end_user_computing/vmware_workstation_pro/15_0centos
菜鳥教程linux板塊:https://www.runoob.com/linux/linux-tutorial.html網絡
2、環境準備
系統鏡像-centos7.6-X64-1810post
平臺-虛擬機-VMwareworkstation15(PRO)學習
安裝vmware的主機-WIN2012R2數據中心版優化
3、Linux系統安裝的基本設置
Linux鏡像:Centos7.6-1810-X64 64位版,Centos7.6版centos7
Linux系統安裝基本設置:1.語言設置-中文;包括時區選擇,
4、分區詳解
在分區前,先理解這一部分。
Linux的系統分區--
LVM:能夠用於動態分區(例如C盤不足了,D盤拉10G分過去這種意思)Linux系統用於對硬盤分區進行管理的一種機制,理論性較強,其建立初衷是爲了解決硬盤設備在建立分區後不易修改分區大小的缺陷
標準分區:顧名思義,標準的分區格式。
文件系統EXT3/4與xfs區別:EXT3是比較老的技術,EXT4是比較新的技術,XFS是如今流行的技術,區別就是目錄與容量的大小區別,建議使用EXT4與XFS。
boot:啓動文件的位置,通常不會去動它,設置1個G足夠了。掛載點/boot,容量1024MB,設備類型標準分區,文件系統xfs
swap:虛擬內存,相似於windows下的虛擬內存,系統會在內存不足時頂上用,通常設置跟內存大小同樣或者一半。掛載點--,容量4096mb,設備類型lvm,文件系統swap
根目錄/:linux最經常使用的一個目錄/,相似於window下的C盤,分大一點,50G。掛載點/,容量50G,設備類型lvm,文件系統xfs
home:能夠當成windwos下用戶目錄或者D盤來理解,通常安裝軟件與存放文件建議放在此位置。掛載點/home,容量45G,設備類型lvm,文件系統xfs
分區設置,例如100G
![](http://static.javashuo.com/static/loading.gif)
補充:linux經常使用目錄結構
![](http://static.javashuo.com/static/loading.gif)
5、具體操做
1.虛擬機掛載系統鏡像:打開VMware,選擇虛擬機-「編輯虛擬機設置」-CD/DVD-勾選「使用ISO映像文件」-CentOS-7-x86_64-DVD-1810
![](http://static.javashuo.com/static/loading.gif)
2.開啓虛擬機,選擇「Install Centos 7」(若是沒有這步或者報錯,檢查ISO鏡像的下載與本機BIOS是否開啓CPU虛擬化VT),等待進入安裝
![](http://static.javashuo.com/static/loading.gif)
3.在等待屏幕上一串英文閃事後,會正式進入安裝界面。
![](http://static.javashuo.com/static/loading.gif)
4.開始設置,語言-中文;時區亞洲-上海;鍵盤-漢語。
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
5.接下來最重要的一項,分區。下拉滾動條,選擇系統-「安裝位置」,不要自動分區。
點擊「我要配置分區」-下方「+」,依次添加分區及格式
分區設置,例如100G
- 磁盤分區(100G)
- /boot 啓動盤 標準分區 (1G)
- /swap 虛擬內存 swap (4G)
- / 根目錄 lvm (50G)
- /home 用戶目錄 lvm (45G)
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
6.軟件選擇,這裏不用糾結,既然咱們是學習,其實怎麼勾選均可以。最好仍是勾選帶圖形化界面的。
建議勾選:KDE plasma workspaces;目前比較流行的一個桌面版,功能根據須要吧,若是你想操做一下桌面版,就開啓一些桌面版的功能。
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
7.網絡和主機名:把ens33網卡打開。配置的話,若是知道本身網卡的能夠在這裏手動配置,若是不知道也不着急,待會進入系統也能夠配置。
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
8.完成後點擊開始安裝。安裝時設置ROOT密碼,與建立用戶。而後等待安裝。
記住,這裏設置的密碼是ROOT的。用戶名ROOT,密碼:本身設置的。ROOT是linux最高權限的用戶,相似於Windows下的administrator。必定記住這個密碼。
能夠不建立用戶,也能夠隨便建立,記住ROOT就好了。
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
9.耐心等待後,安裝完成,單擊重啓。
![](http://static.javashuo.com/static/loading.gif)
10.重啓後,接收協議,進入開機界面,至此Centos7.6的安裝基本完成。
![](http://static.javashuo.com/static/loading.gif)
11.輸入ROOT與密碼,進入系統看一看。
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
至此一臺linux-Centos7.6已經安裝完畢,接下來就能夠自由發揮
在自由發揮前,會補充幾個優化的技巧,後續博客中也會分段寫一些centos的配置與設置