因爲我是最小化安裝,須要在安裝後進行一些配置linux
1. 設定啓動級別vim
[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. 因爲我是在內網環境使用,因此關閉selinuxcurl
[root@home ~]# vi /etc/selinux/config SELINUX=disabled
4. 因爲我是在內網環境使用,因此也關閉firewalloop
[root@home ~]# systemctl stop firewalld.service
[root@home ~]# systemctl disable firewalld.service
5. 設定aliyun做爲CentOS yum源url
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)spa
[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. 安裝經常使用的軟件code
yum -y install yum-utils yum-priorities epel-release yum -y install bind-utils wget vim htop
8. 更新系統server
yum -y update