Centos 7.X 安装及常规设置

一、制作USBHDD+启动

需要工具:

UltraISO(软碟通)
U盘
centos7镜像: http://www.centos.org

1567403-20181227112745024-194554419.png

二、安装(有坑)

U盘启动电脑,进入安装界面:

1567403-20181227115215094-1817225539.png

选中第一项,直接安装会报错!

原因:LABEL=CentOS\x207\x20x86_64 这个卷标长度超过了windows系统允许的长度,所以你制作U盘启动的时候你卷标没有成为CentOS 7 x86_64,因而系统因找不到安装源而报错。

按下TAB后,可以看到install的参数:
vmlinuz initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 rd.live.check quiet
  • 解决办法一:
    Windows下改短卷标,并把 "LABEL=CentOS\x207\x20x86_64" 改为 "LABEL=更改后的卷标"

  • 解决办法二:
    选中第一项按“TAB”(选第二项按“e”)编辑路径:

    vmlinuz initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 quiet
    改成
    vmlinuz initrd=initrd.img linux dd
    在结果中找出你u盘盘符,一般为:sda*
    然后热启动重启电脑,重复上述步骤并改为:
    vmlinuz initrd=initrd.img inst.stage2=hd:/dev/sda*(上一步查到的U盘盘符)
    之后可继续安装!

三、安装完成后的常规设置

关闭selinux

[root@localhost ~]# vim /etc/selinux/config

1567403-20181228115736649-25054331.png

修改yum源,base源,为阿里云的源

[root@colman ~]# curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

repo源(需要时候再修改)

[root@colman ~]# curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/epel-7.repo

修改主机名

[root@colman ~]# hostnamectl set-hostname ***(主机名)

也可直接修改配置文件: /etc/hostname

字符集/语言

[root@colman ~]# cat /etc/locale.conf
LANG="zh_CN.UTF-8"

管理服务

[root@colman ~]# systemctl disable firewalld.service
[root@colman ~]# systemctl enable firewalld.service
Created symlink from /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service to /usr/lib/systemd/system/firewalld.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/firewalld.service to /usr/lib/systemd/system/firewalld.service.
[root@colman ~]# systemctl stop firewalld.service
[root@colman ~]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:firewalld(1)

转载于:https://www.cnblogs.com/colman/p/10184012.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值