vsclient
https://blog.csdn.net/Amandazhouzhou/article/details/79004166
首先安装centos7
(https://www.jianshu.com/p/d01409fa705e)
配置IP网络
BOOTPROTO=static改为static
ONBOOT=yes 改为yes
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=452c0ab0-3515-4163-a402-d86c70b2da50
DEVICE=ens33
ONBOOT=yes
命令 :
dhclient
ifconfig
查看ip
添加以下配置
NETMASK=255.255.255.0
IPADDR=192.168.95.135
GATEWAY=192.168.95.2
DNS1=223.5.5.5
重启网络
systemctl restart network.service
查看uuid
nmcli con show
更换yum源
(http://mirrors.163.com/.help/centos.html)
测试安装vim yum install -y vim-enhanced
安装java
export JAVA_HOME=/opt/modules/jdk1.8.0_31
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=$JAVA_HOME/lib
export PATH=$PATH:$JAVA_HOME/bin
更改hostname
cat /etc/hostname 改为自己想要的名字
Hostnamectl set-hostname slave1
关闭防火墙
停止 systemctl stop firewalld.service
关闭开机启动 systemctl disable firewalld.service
关闭selinux SELINUX=disabled
ssh互信
ssh-keygen -t rsa 三个回车 创建公钥
创建文件 权限600 authorized_keys
目录 .ssh 700
cat /etc/hosts
192.168.95.130 master
192,168.95.135 slave1
192,168.95.136 slave2
克隆虚拟机(完整克隆)
cd /etc/sysconfig/network-scripts
克隆之后删除uuid那一行
cd /etc/udev/rules.d/ 删除文件70-persistent-ipoib.rules
Ifconfig查看ip
更改ip
重启网络
systemctl restart network.service
更改hostname
安装python3.7(centos7默认版本2.7)
yum install -y bzip2
yum install -y zip unzip
(https://conda.io/miniconda.html)
export PATH=/root/miniconda3/bin:$PATH
测试 pip install kafka-python
如果想用回2.6
conda create -n py27tf python=2.7 -y -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
通过这两条命令就可以切换了
source activate py27tf
source deactivate
优秀博客参考:
<u>http://blog.vungjoe.xyz/blog/post/vungjoe/CentOS7%E9%85%8D%E7%BD%AEIP%E5%9C%B0%E5%9D%80</u>