Windows: ipconfig




TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="static" # dhcp 改为 static
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="ens33"
UUID="48795094-300b-4786-ad60-8c1e08684abc"
DEVICE="ens33"
ONBOOT="yes"
IPADDR=192.168.86.152 # 当前主机ip
GATEWAY=192.168.86.2 # 网关
NETMASK=255.255.255.0 # 掩码
DNS1=8.8.8.8 # DNS服务器
DNS2=8.8.4.4 # DNS服务器
有注释文字的那一行进行相应修改
NETWORKING=yes
nameserver 8.8.8.8
systemctl stop firewalld # 临时关闭防火墙
systemctl disable firewalld # 禁止开机启动
service network restart
临时关闭 swapoff -a
永久关闭 sed -ri ‘s/SELINUX=enforcing/SELINUX=disabled/’ /etc/selinux/config
查看状态 getenforce
临时关闭 setenforce 0
永久关闭 vi /etc/selinux/config 修改 SELINUX=disabled
yum install net-tools –y
用于查看ifconfig等命令工具
rm -rf /var/run/yum.pid
yum install openssh-server –y
systemctl start sshd.service
systemctl enable sshd.service
yum install -y bash-completion vim lrzsz expect net-tools nc nmap tree dos2unix htop iftop iotop unzip telnet sl psmisc nethogs glances bc ntpdate openldap openldap-devel wget
yum install ntpdate -y
ntpdate time.windows.com
设置时区,master、node机器都需执行,时间统一
timedatectl set-timezone Asia/Shanghai
设置master主机名
hostnamectl set-hostname master
设置node主机名
hostnamectl set-hostname node #node执行
下载yum源
curl -Lo ius-release-el7.rpm https://repo.ius.io/ius-release-el7.rpm
yum -y install ius-release-el7.rpm
yum -y install git224
注意这个源里面git版本会更新。现在已经变成git236了
yum install git236
git version