1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
| $ systemctl disable firewalld --now $ systemctl disable NetworkManager --now
$ vi /etc/sysconfig/network-scripts/ifcfg-eth0 BOOTPROTO=dhcp UUID=da56a6a0-4ee1-4ffe-9e6e-50cc6f072286 NAME=eth0 DEVICE=eth0 ONBOOT=yes $ vi /etc/sysconfig/network-scripts/ifcfg-eth1 BOOTPROTO=static NAME=eth1 DEVICE=eth1 ONBOOT=yes IPADDR=192.168.7.21 NETMASK=255.255.255.0 $ systemctl restart network
$ hostnamectl set-hostname centos21 $ vi /etc/hosts 192.168.7.21 centos21
$ vi /etc/selinux/config SELINUX=disabled
$ mkdir /etc/yum.repos.d/backup $ mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/backup $ wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo $ yum repolist $ yum update $ yum upgrade -y $ yum clean all $ yum makecache
$ yum -y install vim wget net-tools telnet bash-completion
$ yum -y install ntp ntpdate $ ntpdate cn.pool.ntp.org $ hwclock --systohc
$ vim .bashrc PS1="\[\e[1;35m\][\u@\h \W]\\$\[\e[0m\] "
|