Linux 过去主要作为服务器运行,但经过几年的发展,其用户界面有了很大的改善。如今,Linux 已经成为美观易用,用户友好的桌面操作系统。在某些方面,Linux 甚至赶超Windows 和 Mac 成为用户首,主要体现: 安全性、高可用性、免费、开源等等下面我一Centos 8.1的安装作为一个参考:

1、首先我们需要准备一个16G 的U盘。点击下载系统地址==>CentOS-8.1.1911-x86_64-dvd1 
watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70
2、把下载下来的Centos刻录到U盘中去,推荐工具: Win32DiskImager.exe, 开始刻录
watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70

3、在系统磁盘中保留空闲位置来安装Centos, 一般50G就够了。watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70

4、准备工作大概做完了,其中就主要的U盘,工具

20200425014940433.png

5、开始安装之前还需要把自己的电脑设置为U盘启动。就跟安装系统一样。因为每款电脑的Boss不一样,此步骤省略,可根据自己的电脑品牌自己去百度一下,一般是f2、esc、f8、f12、delete进入BOSS,需要自行解决。

6、设置完U盘启动之后开始安装: 把刚刚刻录的U盘插入电脑,启动之后如下图:watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70

下面的步骤很重要,不要慌,慢慢来。咱不错一步就行了watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70

a) 首先我们来设置网络:点击设置网络进去如下图:watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70

b) 选择时区:选择时区域为上海-设置,点击进去如下图:watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70

c) 设置分区,可以自己定义分区大小,也可以直接使用一个分区。我这里简单自定义一下:watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70

d) 到上面完成了分区设置,下面我们选择图形界面的安装: watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70

e) 安装完成之后,需要拔出U盘,然后重启,否者默认U盘启动会重新进入安装界面:

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70

f) 重启之后需要接受服务条款,打一个 √  就好了,如下图:watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70

g) 是不是大功告成了centos,其实还没完成,在重启的时候有没有发现自己的Windows引导没了,无法启动Windows:watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70

h) 修复Windows引导,我们把开始刻录的CentosU盘插入电脑默认U盘启动,通过救援模式来修复Windows引导:watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70

需要输入:chroot /mnt/sysimage

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70

然后需要输入: /sbin/grub2-install /dev/sda

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70

然后输入exit退出bash-4.4#: exit

然后输入命令重启(输入完命令之后立马把U盘拔掉):reboot

其实还没结束,然后需要去Centos 引导Win 10,进入Centos 打开命令窗口执行一下命令

1、安装epel源:yum -y install epel-release

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70

2、可能大家发现了Windows和linux的磁盘格式不一样,
      需要安装工具来读取Windows文件, 执行命令:yum -y install ntfs-3g

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70

3、最后就是引导Windows 10 ,执行命令:grub2-mkconfig -o /boot/grub2/grub.cfg
watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70

4、附加:修改引导名称、设置默认引导、查询默认启动引导:

    4.1 修改引导名称, 拖到最下面, 执行命令: vim /boot/grub2/grub.cfg  然后i进入编辑,按esc-->:wq保存退出

20200425025701462.pngwatermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70

    4.2 设置默认启动项(Windows 10是我修改之后的引导名):grub2-set-default 'Windows 10'

    4.3 查询默认启动项:grub2-editenv list    应该下面输出: saved_entry=Windows 10,说明设置成功

最后我们来重启:reboot

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70

watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwMDU4MzIx,size_16,color_FFFFFF,t_70

大功告成..........................................................................................................................!

下面推荐一些我其它的文章,适合新手:

Centos 8 挂载USB(u盘)

Centos 8 安装google浏览器(yum)

Centos 8 安装Maven

Centos 8 安装向日葵(sunloginclient-10.0.0-1)

更多文章

 

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐