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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
| 按Tab键 quiet net.ifnames=0 biosdevname=0
vi /etc/sysconfig/network-scripts/ifcfg-eth0 删除UUID BOOTPROTO=dhcp => BOOTPROTO=static 或者 BOOTPROTO=none ONBOOT=no => ONBOOT=yes IPADDR=10.0.0.100 NETMASK=255.255.255.0 GATEWAY=10.0.0.2 DNS1=223.5.5.5
vi /etc/sysconfig/network-scripts/ifcfg-eth1 删除UUID BOOTPROTO=dhcp => BOOTPROTO=static 或者 BOOTPROTO=none ONBOOT=no => ONBOOT=yes IPADDR=172.16.1.100 NETMASK=255.255.255.0
systemctl restart network
[root@localhost ~] [root@localhost ~]
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
[root@localhost ~]
yum install net-tools vim tree htop iftop gcc gcc-c++ glibc iotop lrzsz sl wget unzip telnet nmap nc psmisc dos2unix bash-completion bash-completion-extra sysstat rsync nfs- utils httpd-tools -y
[root@localhost ~]
[root@localhost ~]
[root@localhost ~]
[root@localhost ~]
[root@localhost ~]
[root@lb01 ~] [root@lb01 ~]
echo '* - nofile 65535' >> /etc/security/limits.conf
#!/bin/bash read -p "Please input HOSTNAME:" h read -p "Please input IP:" IP
hostnamectl set-hostname $h sed -i "s#100#$IP#g" /etc/sysconfig/network-scripts/ifcfg-eth{0,1}
|