由于我是最小化安装,需要在安装后进行一些配置

1. 设定启动级别

[root@home ~]# systemctl set-default multi-user.target

2. 设定网络

[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=no
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eth0
UUID=54a33101-00eb-41223-9c65-cd7c03adb019
DEVICE=eth0
ONBOOT=yes
IPADDR=10.108.1.15
PREFIX=24
GATEWAY=10.108.1.1
DNS1=10.108.1.1
IPV6_PRIVACY=no

3. 由于我是在内网环境使用,所以关闭selinux

[root@home ~]# vi /etc/selinux/config
SELINUX=disabled

4. 由于我是在内网环境使用,所以也关闭firewall

[root@home ~]# systemctl stop firewalld.service
[root@home ~]# systemctl disable firewalld.service

5. 设定aliyun作为CentOS yum源

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum makecache

6. 挂载ISO作为RHEL yum源 (Red Hat Enterprise Linux)

[root@home ~]# mkdir /mnt/rhel
[root@home ~]# mount -o loop -t iso9660 /opt/rhel-server-7.4-x86_64-dvd.iso /mnt/rhel
[root@home ~]# vi /etc/yum.repos.d/rhel.repo
[rhel]
name=rhel
baseurl=file:///mnt/rhel
gpgcheck=0
enabled=1
[root@home ~]# yum repolist

7. 安装常用的软件

yum -y install yum-utils yum-priorities epel-release 
yum -y install bind-utils wget vim htop


8. 更新系统

yum -y update

相关文章:

  • 2022-12-23
  • 2022-03-09
  • 2021-07-11
  • 2021-08-01
  • 2021-05-22
  • 2021-05-13
  • 2021-07-09
  • 2022-01-15
猜你喜欢
  • 2021-04-19
  • 2021-08-28
  • 2022-12-23
  • 2021-10-27
  • 2021-09-28
  • 2021-08-09
相关资源
相似解决方案