[TOC] > 本文安裝的是 centos7.8 #### 1. 下載 centos7 鏡像文件 --- 阿里云centos鏡像站:[https://mirrors.aliyun.com/centos](https://mirrors.aliyun.com/centos) 本文章使用的鏡像:CentOS-7-x86_64-Minimal-2003.iso [https://mirrors.aliyun.com/centos/7.8.2003/isos/x86_64](https://mirrors.aliyun.com/centos/7.8.2003/isos/x86_64) #### 2. 使用 centos7 鏡像文件創建虛擬機 ---- **第一步:典型模式** ![](https://img.itqaq.com/art/content/1ae50c9cd0f09549d99090e8ea1cd196.png) **第二步:稍后安裝** ![](https://img.itqaq.com/art/content/2fc29cb963d728be0a538a5ef54c206f.png) **第三步:選擇將要安裝的操作系統類型** ![](https://img.itqaq.com/art/content/9b279d24d5c8ac9d48e86ef153533058.png) **第四步:設置虛擬機名稱,虛擬機文件存放位置** ![](https://img.itqaq.com/art/content/d9659dfed66326caaa2975154d90ce18.png) **第五步:使用默認的就行** ![](https://img.itqaq.com/art/content/93115482379e64d3d7fb8a2dad6b5fa2.png) **第六步:點擊 "完成"** ![](https://img.itqaq.com/art/content/c35cf72e192d4526bfb5b794fe5e297c.png) **第七步:編輯虛擬機設置,打印機一般用不到,可以移除,網絡連接將默認的 NAT 模式改為橋接模式** ![](https://img.itqaq.com/art/content/3dde3a161da5d3aea32ec177e5397f91.png) ![](https://img.itqaq.com/art/content/bdac56bb8441092f7a893f0de64afe71.png) **第八步:選擇鏡像文件** ![](https://img.itqaq.com/art/content/fa5eb37b18bd02a8eda22e246a6047a3.png) #### 3. 安裝centos7操作系統 --- **第一步:開啟虛擬機** ![](https://img.itqaq.com/art/content/e4f996e133722573197541a2fe1c60a5.png) **第二步:選擇界面語言,推薦使用默認的英文US,直接Continue進行下一步** ![](https://img.itqaq.com/art/content/288d41b008c2c8873f1290c860eea88e.png) **第三步:選擇時區** ![](https://img.itqaq.com/art/content/895be9edcadcca4d04a9e7aecbabddd9.png) 選擇上海的時區 ![](https://img.itqaq.com/art/content/40c7711dfb4bfe43d4005c70407bfa04.png) **第四步:選擇分區** a. 進入分區設置 ![](https://img.itqaq.com/art/content/756ca24002dfcb500c319407ae20622c.png) b. 選擇自定義分區 ![](https://img.itqaq.com/art/content/c229c2d393caea9ed7d0e0a0615fa4e1.png) c. LVM 切換為 標準分區,添加 `/boot` 分區 ![](https://img.itqaq.com/art/content/4003a5a43972709e825d4f2284f2a8e2.png) d. 添加交換分區 `swap`,一般為內存的兩倍 ![](https://img.itqaq.com/art/content/61a31c0170e02e825d227df148abb47a.png) e. 添加根分區 `/` ![](https://img.itqaq.com/art/content/6f06cd0820d3311662a695f233b63a0b.png) f. 分區創建完成 ![](https://img.itqaq.com/art/content/289844e7a08a01461a6fbc6947a99191.png) g. 提示對分區進行格式化,點擊同意格式化 ![](https://img.itqaq.com/art/content/10f8b230247be671403a412890e201af.png) **第五步:關閉 kdump內核崩潰轉儲機制** 進入設置 kdump 的界面 ![](https://img.itqaq.com/art/content/08077e92de482efce016e9d0a127ef4f.png) 取消勾選 ![](https://img.itqaq.com/art/content/1309d4dcd84abb87359692649c7b31b6.png) **第六步:網絡和主機名** ![](https://img.itqaq.com/art/content/28f9af83d875034b884cd316a9b82db6.png) 開啟網絡 ![](https://img.itqaq.com/art/content/4d68f6f47ca4ee5c60c0ac6b377d6245.png) **第七步:配置完成,開始安裝** 開始安裝 ![](https://img.itqaq.com/art/content/26ac59b0223ad08d89fc6a6ef4a59b2b.png) 在安裝的過程中設置超級管理員 root 的密碼 ![](https://img.itqaq.com/art/content/d3ecea97b5547410f28c818b73fb7c93.png) **第八步:重啟后即可使用** ![](https://img.itqaq.com/art/content/7c789dc043d5b5a6906b8b7fd0baed40.png) ![](https://img.itqaq.com/art/content/daceeaba89959ae1cd540f642fa9d7b1.png)