一、网络设置
vi /etc/stsconfig/network-scripts/ifcfg-eno16777736
BOOTPROTO=none
IPADDR=192.168.10.10
PREFIX=24
GATEWAY=192.168.10.2
DNS1=114.114.114.114
重新网络:systemctl restart network
配置主机名:hostnamectl set-hostname xxx
二、关闭SELINIX 和防火墙
getenforc
setenforce 0
sed -i "s/=enforcing/=disabled/g" /etc/selinux/config
cat /etc/selinux/config
systemctl stop firewalld.service
systemctl disable firewalld.service
三、配置yum源
yum install wget
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
cp ./CentOS7-Base-163.repo /etc/yum.repos.d/CentOS-Base.repo
yum clean all
yum makecache
四、安装常用软件
wget http://mirrors.163.com/centos/7.4.1708/extras/x86_64/Packages/epel-release-7-9.noarch.rpm
yum install gcc gcc-g++ make vim bash-completion epel-release
yum install net-tools
五、配置JAVA环境变量·用文本编辑器打开/etc/profile
下载jdk:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
在profile文件末尾加入:
export JAVA_HOME=/usr/share/jdk1.8.0_14
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
cat > /etc/profile.d/mysql.sh << EOF
> export PATH=$PATH:/usr/local/mysql/bin
> EOF
cat >> /etc/hosts << EOF
192.168.1.61 docker
192.168.1.62 node1
192.168.1.63 node2
EOF
# ssh-keygen -t dsa -f ~/.ssh/id_dsa -N ""
# ssh-copy-id node1
# ssh-copy-id node2
# ssh-copy-id docker