[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 鏡像文件創(chuàng)建虛擬機(jī) ---- **第一步:典型模式** ![](https://img.itqaq.com/art/content/1ae50c9cd0f09549d99090e8ea1cd196.png) **第二步:稍后安裝** ![](https://img.itqaq.com/art/content/2fc29cb963d728be0a538a5ef54c206f.png) **第三步:選擇將要安裝的操作系統(tǒng)類型** ![](https://img.itqaq.com/art/content/9b279d24d5c8ac9d48e86ef153533058.png) **第四步:設(shè)置虛擬機(jī)名稱,虛擬機(jī)文件存放位置** ![](https://img.itqaq.com/art/content/d9659dfed66326caaa2975154d90ce18.png) **第五步:使用默認(rèn)的就行** ![](https://img.itqaq.com/art/content/93115482379e64d3d7fb8a2dad6b5fa2.png) **第六步:點(diǎn)擊 "完成"** ![](https://img.itqaq.com/art/content/c35cf72e192d4526bfb5b794fe5e297c.png) **第七步:編輯虛擬機(jī)設(shè)置,打印機(jī)一般用不到,可以移除,網(wǎng)絡(luò)連接將默認(rèn)的 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操作系統(tǒng) --- **第一步:開啟虛擬機(jī)** ![](https://img.itqaq.com/art/content/e4f996e133722573197541a2fe1c60a5.png) **第二步:選擇界面語(yǔ)言,推薦使用默認(rèn)的英文US,直接Continue進(jìn)行下一步** ![](https://img.itqaq.com/art/content/288d41b008c2c8873f1290c860eea88e.png) **第三步:選擇時(shí)區(qū)** ![](https://img.itqaq.com/art/content/895be9edcadcca4d04a9e7aecbabddd9.png) 選擇上海的時(shí)區(qū) ![](https://img.itqaq.com/art/content/40c7711dfb4bfe43d4005c70407bfa04.png) **第四步:選擇分區(qū)** a. 進(jìn)入分區(qū)設(shè)置 ![](https://img.itqaq.com/art/content/756ca24002dfcb500c319407ae20622c.png) b. 選擇自定義分區(qū) ![](https://img.itqaq.com/art/content/c229c2d393caea9ed7d0e0a0615fa4e1.png) c. LVM 切換為 標(biāo)準(zhǔn)分區(qū),添加 `/boot` 分區(qū) ![](https://img.itqaq.com/art/content/4003a5a43972709e825d4f2284f2a8e2.png) d. 添加交換分區(qū) `swap`,一般為內(nèi)存的兩倍 ![](https://img.itqaq.com/art/content/61a31c0170e02e825d227df148abb47a.png) e. 添加根分區(qū) `/` ![](https://img.itqaq.com/art/content/6f06cd0820d3311662a695f233b63a0b.png) f. 分區(qū)創(chuàng)建完成 ![](https://img.itqaq.com/art/content/289844e7a08a01461a6fbc6947a99191.png) g. 提示對(duì)分區(qū)進(jìn)行格式化,點(diǎn)擊同意格式化 ![](https://img.itqaq.com/art/content/10f8b230247be671403a412890e201af.png) **第五步:關(guān)閉 kdump內(nèi)核崩潰轉(zhuǎn)儲(chǔ)機(jī)制** 進(jìn)入設(shè)置 kdump 的界面 ![](https://img.itqaq.com/art/content/08077e92de482efce016e9d0a127ef4f.png) 取消勾選 ![](https://img.itqaq.com/art/content/1309d4dcd84abb87359692649c7b31b6.png) **第六步:網(wǎng)絡(luò)和主機(jī)名** ![](https://img.itqaq.com/art/content/28f9af83d875034b884cd316a9b82db6.png) 開啟網(wǎng)絡(luò) ![](https://img.itqaq.com/art/content/4d68f6f47ca4ee5c60c0ac6b377d6245.png) **第七步:配置完成,開始安裝** 開始安裝 ![](https://img.itqaq.com/art/content/26ac59b0223ad08d89fc6a6ef4a59b2b.png) 在安裝的過程中設(shè)置超級(jí)管理員 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)