CentOS 8 安装图解
CentOS
![](/data/attachment/album/201910/09/121153tj05o5t2ee79jl63.png)


继 RHEL 8 发布之后，CentOS 社区也发布了让人期待已久的 CentOS 8，并发布了两种模式：


* CentOS stream：滚动发布的 Linux 发行版，适用于需要频繁更新的开发者
* CentOS：类似 RHEL 8 的稳定操作系统，系统管理员可以用其部署或配置服务和应用


在这篇文章中，我们会使用图解的方式演示 CentOS 8 的安装方法。


### CentOS 8 的新特性


* DNF 成为了默认的软件包管理器，同时 yum 仍然是可用的
* 使用网络管理器（`nmcli` 和 `nmtui`）进行网络配置，移除了网络脚本
* 使用 Podman 进行容器管理
* 引入了两个新的包仓库：BaseOS 和 AppStream
* 使用 Cockpit 作为默认的系统管理工具
* 默认使用 Wayland 作为显示服务器
* `iptables` 将被 `nftables` 取代
* 使用 Linux 内核 4.18
* 提供 PHP 7.2、Python 3.6、Ansible 2.8、VIM 8.0 和 Squid 4


### CentOS 8 所需的最低硬件配置:


* 2 GB RAM
* 64 位 x86 架构、2 GHz 或以上的 CPU
* 20 GB 硬盘空间


### CentOS 8 安装图解


#### 第一步：下载 CentOS 8 ISO 文件


在 CentOS 官方网站 <https://www.centos.org/download/> 下载 CentOS 8 ISO 文件。


#### 第二步： 创建 CentOS 8 启动介质（USB 或 DVD）


下载 CentOS 8 ISO 文件之后，将 ISO 文件烧录到 USB 移动硬盘或 DVD 光盘中，作为启动介质。


然后重启系统，在 BIOS 中设置为从上面烧录好的启动介质启动。


#### 第三步：选择“安装 CentOS Linux 8.0”选项


当系统从 CentOS 8 ISO 启动介质启动之后，就可以看到以下这个界面。选择“Install CentOS Linux 8.0”（安装 CentOS Linux 8.0）选项并按回车。


![Choose-Install-CentOS8](/data/attachment/album/201910/09/121203kwt4yvjxmnvzrjrp.jpg)


#### 第四步：选择偏好语言


选择想要在 CentOS 8 **安装过程**中使用的语言，然后继续。


![Select-Language-CentOS8-Installation](/data/attachment/album/201910/09/121203dhfnlfyh8p0ajbqz.jpg)


#### 第五步：准备安装 CentOS 8


这一步我们会配置以下内容：


* 键盘布局
* 日期和时间
* 安装来源
* 软件选择
* 安装目标
* Kdump


![Installation-Summary-CentOS8](/data/attachment/album/201910/09/121204djyz9iwhf7re9nrn.jpg)


如上图所示，安装向导已经自动提供了“<ruby> 键盘布局 <rt>  Keyboard </rt></ruby>”、“<ruby> 时间和日期 <rt>  Time &amp; Date </rt></ruby>”、“<ruby> 安装来源 <rt>  Installation Source </rt></ruby>”和“<ruby> 软件选择 <rt>  Software Selection </rt></ruby>”的选项。


如果你需要修改以上设置，点击对应的图标就可以了。例如修改系统的时间和日期，只需要点击“<ruby> 时间和日期 <rt>  Time &amp; Date </rt></ruby>”，选择正确的时区，然后点击“<ruby> 完成 <rt>  Done </rt></ruby>”即可。


![TimeZone-CentOS8-Installation](/data/attachment/album/201910/09/121204ed2al52p527zbzbp.jpg)


在软件选择选项中选择安装的模式。例如“<ruby> 包含图形界面 <rt>  Server with GUI </rt></ruby>”选项会在安装后的系统中提供图形界面，而如果想安装尽可能少的额外软件，可以选择“<ruby> 最小化安装 <rt>  Minimal Install </rt></ruby>”。


![Software-Selection-CentOS8-Installation](/data/attachment/album/201910/09/121205adk7zvsxxfh1av25.jpg)


这里我们选择“<ruby> 包含图形界面 <rt>  Server with GUI </rt></ruby>”，点击“<ruby> 完成 <rt>  Done </rt></ruby>”。


Kdump 功能默认是开启的。尽管这是一个强烈建议开启的功能，但也可以点击对应的图标将其关闭。


如果想要在安装过程中对网络进行配置，可以点击“<ruby> 网络与主机名 <rt>  Network &amp; Host Name </rt></ruby>”选项。


![Networking-During-CentOS8-Installation](/data/attachment/album/201910/09/121205com66etz1eql6v2q.jpg)


如果系统连接到启用了 DHCP 功能的调制解调器上，就会在启动网络接口的时候自动获取一个 IP 地址。如果需要配置静态 IP，点击“<ruby> 配置 <rt>  Configure </rt></ruby>”并指定 IP 的相关信息。除此以外我们还将主机名设置为 “linuxtechi.com”。


完成网络配置后，点击“<ruby> 完成 <rt>  Done </rt></ruby>”。


最后我们要配置“<ruby> 安装目标 <rt>  Installation Destination </rt></ruby>”，指定 CentOS 8 将要安装到哪一个硬盘，以及相关的分区方式。


![Installation-Destination-Custom-CentOS8](/data/attachment/album/201910/09/121206cs7p325477n6wdyp.jpg)


点击“<ruby> 完成 <rt>  Done </rt></ruby>”。


如图所示，我为 CentOS 8 分配了 40 GB 的硬盘空间。有两种分区方案可供选择：如果由安装向导进行自动分区，可以从“<ruby> 存储配置 <rt>  Storage Configuration </rt></ruby>”中选择“<ruby> 自动 <rt>  Automatic </rt></ruby>”选项；如果想要自己手动进行分区，可以选择“<ruby> 自定义 <rt>  Custom </rt></ruby>”选项。


在这里我们选择“<ruby> 自定义 <rt>  Custom </rt></ruby>”选项，并按照以下的方式创建基于 LVM 的分区：


* `/boot` – 2 GB (ext4 文件系统)
* `/` – 12 GB (xfs 文件系统)
* `/home` – 20 GB (xfs 文件系统)
* `/tmp` – 5 GB (xfs 文件系统)
* Swap – 1 GB (xfs 文件系统)


首先创建 `/boot` 标准分区，设置大小为 2GB，如下图所示：


![boot-partition-CentOS8-Installation](/data/attachment/album/201910/09/121206q9t4oto94am49szt.jpg)


点击“<ruby> 添加挂载点 <rt>  Add mount point </rt></ruby>”。


再创建第二个分区 `/`，并设置大小为 12GB。点击加号，指定挂载点和分区大小，点击“<ruby> 添加挂载点 <rt>  Add mount point </rt></ruby>”即可。


![slash-root-partition-centos8-installation](/data/attachment/album/201910/09/121207oyi4oogd4dcphczd.jpg)


然后在页面上将 `/` 分区的分区类型从标准更改为 LVM，并点击“<ruby> 更新设置 <rt>  Update Settings </rt></ruby>”。


![Change-Partition-Type-CentOS8](/data/attachment/album/201910/09/121207fyxo93878mi7i7xy.jpg)


如上图所示，安装向导已经自动创建了一个卷组。如果想要更改卷组的名称，只需要点击“<ruby> 卷组 <rt>  Volume Group </rt></ruby>”标签页中的“<ruby> 修改 <rt>  Modify </rt></ruby>”选项。


同样地，创建 `/home` 分区和 `/tmp` 分区，分别将大小设置为 20GB 和 5GB，并设置分区类型为 LVM。


![home-partition-CentOS8-Installation](/data/attachment/album/201910/09/121208q8kzhhuyuz3ui8l8.jpg)


![tmp-partition-centos8-installation](/data/attachment/album/201910/09/121208k20ilel7qon2iddq.jpg)


最后创建<ruby> 交换分区 <rt>  Swap Partition </rt></ruby>。


![Swap-Partition-CentOS8-Installation](/data/attachment/album/201910/09/121209lrjngsgiganzttr2.jpg)


点击“<ruby> 添加挂载点 <rt>  Add mount point </rt></ruby>”。


在完成所有分区设置后，点击“<ruby> 完成 <rt>  Done </rt></ruby>”。


![Choose-Done-after-manual-partition-centos8](/data/attachment/album/201910/09/121209u930opgp386p3p9m.jpg)


在下一个界面，点击“<ruby> 应用更改 <rt>  Accept changes </rt></ruby>”，以上做的更改就会写入到硬盘中。


![Accept-changes-CentOS8-Installation](/data/attachment/album/201910/09/121211uwkri3puh3dhuh8u.jpg)


#### 第六步：选择“开始安装”


完成上述的所有更改后，回到先前的安装概览界面，点击“<ruby> 开始安装 <rt>  Begin Installation </rt></ruby>”以开始安装 CentOS 8。


![Begin-Installation-CentOS8](/data/attachment/album/201910/09/121211nk6hnlccu2ahc2xw.jpg)


下面这个界面表示安装过程正在进行中。


![Installation-progress-centos8](/data/attachment/album/201910/09/121211nt8jejvnjb9xnbht.jpg)


要设置 root 用户的口令，只需要点击 “<ruby> root 口令 <rt>  Root Password </rt></ruby>”选项，输入一个口令，然后点击“<ruby> 创建用户 <rt>  User Creation </rt></ruby>”选项创建一个本地用户。


![Root-Password-CentOS8-Installation](/data/attachment/album/201910/09/121212i6b635335of6h3up.jpg)


填写新创建的用户的详细信息。


![Local-User-Details-CentOS8](/data/attachment/album/201910/09/121212id94d9k9kju9j0tz.jpg)


在安装完成后，安装向导会提示重启系统。


![CentOS8-Installation-Progress](/data/attachment/album/201910/09/121213zl22jvs619sq6p6w.jpg)


#### 第七步：完成安装并重启系统


安装完成后要重启系统。只需点击“<ruby> 重启 <rt>  Reboot </rt></ruby>”按钮。


![Installation-Completed-CentOS8](/data/attachment/album/201910/09/121213zo84qfefagpr38q2.jpg)


注意：重启完成后，记得要把安装介质断开，并将 BIOS 的启动介质设置为硬盘。


#### 第八步：启动新安装的 CentOS 8 并接受许可协议


在 GRUB 引导菜单中，选择 CentOS 8 进行启动。


![Grub-Boot-CentOS8](/data/attachment/album/201910/09/121213rr1ys3h7r7r57x08.jpg)


同意 CentOS 8 的许可证，点击“<ruby> 完成 <rt>  Done </rt></ruby>”。


![Accept-License-CentOS8-Installation](/data/attachment/album/201910/09/121214x4dif5d5g64uu1su.jpg)


在下一个界面，点击“<ruby> 完成配置 <rt>  Finish Configuration </rt></ruby>”。


![Finish-Configuration-CentOS8-Installation](/data/attachment/album/201910/09/121214koqwuozbb9brogw8.jpg)


#### 第九步：配置完成后登录


同意 CentOS 8 的许可证以及完成配置之后，会来到登录界面。


![Login-screen-CentOS8](/data/attachment/album/201910/09/121215td78fmhb661ffl17.jpg)


使用刚才创建的用户以及对应的口令登录，按照提示进行操作，就可以看到以下界面。


![CentOS8-Ready-Use-Screen](/data/attachment/album/201910/09/121216fi9anhzio4pnnpnp.jpg)


点击“<ruby> 开始使用 CentOS Linux <rt>  Start Using CentOS Linux </rt></ruby>”。


![Desktop-Screen-CentOS8](/data/attachment/album/201910/09/121216c344z3khvh04kphe.jpg)


以上就是 CentOS 8 的安装过程，至此我们已经完成了 CentOS 8 的安装。


欢迎给我们发送评论。




---


via: <https://www.linuxtechi.com/centos-8-installation-guide-screenshots/>


作者：[Pradeep Kumar](https://www.linuxtechi.com/author/pradeep/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[HankChow](https://github.com/HankChow) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
After **RHEL 8** release, **CentOS** community has released its most awaited Linux distribution as **CentOS 8**. It is released into two forms:

**CentOS stream**– It is designed for the developers where they will get the updates quite frequently.**CentOS**– It is RHEL 8 like stable OS where sysadmin can install and configure the servers and applications.

In this article, we will demonstrate how to install CentOS 8 Server step by step with screenshots.

#### New features in CentOS 8


- DNF is the default package manager though yum can also be used.
- Network configuration will be controlled by Network Manager (nmcli & nmtui) as network scripts are removed.
- Podman utility to manage containers
- Introduction of two new packages repositories: BaseOS and AppStream
- Cockpit available as default server management tool
- Wayland is the default display server
- Iptables are replaced by nftables
- Linux Kernel 4.18
- PHP 7.2, Python 3.6, Ansible 2.8, VIM 8.0 and Squid 4

#### Minimum System Requirements for CentOS 8

- 2 GB RAM
- 2 GHz or Higher Processor
- 20 GB Hard Disk
- 64-bit x86 System

#### CentOS 8 Installation Steps with Screenshots

#### Step:1) Download CentOS 8 ISO File

Download CentOS 8 ISO file from its official site,

[https://www.centos.org/download/](https://www.centos.org/download/)

#### Step:2) Create CentOS 8 bootable media (USB / DVD)

Once you have downloaded CentOS 8 iso file, burn it either into USB stick or in DVD to make it bootable.

Reboot the system on which you want to install CentOS 8, change the boot medium either as USB or DVD from bios settings.

#### Step:3) Choose “Install CentOS Linux 8.0” option

When the system boots up with CentOS 8 bootable media, then we will get the following screen, choose “**Install CentOS Linux 8.0**” and hit enter,

#### Step:4) Select your preferred language

Choose the language that suits to your CentOS 8 installation and then click on Continue,

#### Step:5) Preparing CentOS 8 Installation

In this step we will configure the followings:

- Keyboard Layout
- Date / Time
- Installation Source
- Software Selection
- Installation Destination
- Kdump

As we can see in above window, installer has automatically pick ‘**Keyboard**’ layout, ‘**Time & Date**’, ‘**Installation Source**’ and ‘**Software Selection’.**

If you want to change any of these settings, then click on their respective icon, let’s assume we want to change Time & Date of system, so click on ‘**Time & Date**’ and choose the time zone that suits to your installation and then click on **Done**

Choose your preferred option from “**Software Selection**“, in case you want to install server with GUI then choose “**Server with GUI**” option and if you want to do minimal installation then choose “**Minimal Install**“.

In this tutorial we will go with “**Server with GUI**” option, click on Done

**Kdump** is enabled by default, if wish to disable it then click on its icon and disable it but it is strongly recommended one should enable kdump.

If you wish to configure networking during the installation, then click on “**Network & Host Name**”

In case your system is connected to modem where DHCP is running then it will automatically pick the ip whenever we enable the interface and if you wish to configure the static ip then click on ‘**Configure**‘ and specify IP details there and apart from this we have also set host name as “**linuxtechi.com**“.

Once you are done with network changes, click on Done,

Now finally configure ‘**Installation Destination**‘, in this step we will specify on which disk we will install CentOS 8 and what would be its partition scheme.

Click on Done

As we can see I have 40 GB disk space for CentOS 8 installation, here we have two options to create partition scheme, if you want installer to create automatic partition on 40 GB disk space then choose “**Automatic**” from **Storage Configuration** and if you want to create partitions manually then choose “**Custom**” option.

In this tutorial I will create custom partitions by choosing “Custom” option. I will create following LVM based partitions,

- /boot – 2 GB (ext4 file system)
- / – 12 GB (xfs file system)
- /home – 20 GB (xfs file system)
- /tmp – 5 GB (xfs file system)
- Swap – 1 GB

First create /boot as standard partition of size 2 GB, steps are shown below,

Click on “**Add mount point**”

Create second partition as / of size 12 GB on LVM, click on ‘+’ symbol and specify mount point and size and then click on “Add mount point”

In next screen change Partition Type from standard to LVM for / partition and click on update settings

As we can see above, installer has automatically created a volume group, if want to change the name of that volume group then click on “**Modify**” option from “**Volume Group**” Tab

Similarly create next partitions as /home and /tmp of size 20 GB and 5 GB respectively and also change their partition type from standard to **LVM**,

Finally create swap partition,

Click on “Add mount point”

Once you are done with all partition creations then click on Done,

In the next window, click on “**Accept changes**“, it will write the changes to disk,

#### Step:6) Choose “Begin Installation”

Once we Accept the changes in above window then we will move back to installation summary screen, there click on “**Begin Installation**” to start the installation

Below screen confirms that installation has been started,

To set root password, click on “**Root Password**” option and then specify the password string and Click on “**User creation**” option to create a local user

Local User details,

Installation is progress and once it is completed, installer will prompt us to reboot the system

#### Step:7) Installation Completed and reboot system

Once the installation is completed, reboot your system, Click on Reboot

**Note:** After the reboot, don’t forget to remove the installation media and set the boot medium as disk from bios.

#### Step:8) Boot newly installed CentOS 8 and Accept License

From the grub menu, select the first option to boot CentOS 8,

Accept CentOS 8 License and then click on Done,

In the next screen, click on “**Finish Configuration**”

#### Step:9) Login Screen after finishing the configuration

We will get the following login screen after accepting CentOS 8 license and finishing the configuration

Use the same credentials of the user that you created during the installation. Follow the screen instructions and then finally we will get the following screen,

Click on “**Start Using CentOS Linux**”

That’s all from this tutorial, this confirms we have successfully installed CentOS 8. Please do share your valuable feedback and comments.

**Read More** : **How to Install and Use Cockpit on CentOS 8 / RHEL 8**

**Also Read** : [Top 7 Security Hardening Tips for CentOS 8 / RHEL 8 Server](https://www.linuxtechi.com/harden-secure-centos-8-rhel-8-server/)

AbrarSwap partition type is not xfs/ext{2,3,4} but just swap.

Pradeep KumarHi Abrar,

Thank you for pointing out the typo, i have corrected it now.

CyberNerdWhat about guest addition installation for CentOS 8 guest in host Mac OS?

Robert FallowsHi Thanks for this. Helped a lot. I had been fighting the whole automatic partioning setup. I think this has solved it. I am in the process of installing again (I hate to say how many). I have a 400GB drive in an old mac that I am going to be loading with a lot of pdfs to be served up. I used your method and expanded it to a 400 GB scheme…. Hopefully it works. I really don’t understand how or why the automatic partioning leaves the bulk of the 400 GB as unavailable free space… oh well. I watch you on YouTube….. always interesting although a little beyond me most of the time. Also did folding@home for a few months but had to stop about a week ago

luckyhow to create a partitioning the disk after installation of centos8.2

Pradeep KumarAfter the CentOS 8.x installation, you can use fdisk or parted utility to create partition on new disks.

Paul GriffinPradeep, many thanks for a great tutorial. Much appreciated.