一、安装JDK
sudo apt-get install openjdk-8-jdk
二、软件下载地址
zookeeper:
https://archive.apache.org/dist/zookeeper/zookeeper-3.5.7/apache-zookeeper-3.5.7-bin.tar.gz
kafka
https://archive.apache.org/dist/kafka/0.11.0.0/kafka_2.11-0.11.0.0.tgz
-- /home/vagrant/opt/apps/kafka_2.11-0.11.0.0/bin/kafka-server-start.sh*
if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
#export KAFKA_HEAP_OPTS="-Xmx1G -Xms1G"
export KAFKA_HEAP_OPTS="-Xmx1G -Xms256M"
fi
三、环境变量
#ZK_HOME
export ZK_HOME=/home/vagrant/opt/apps/zookeeper-3.5.7
export PATH=$PATH:$ZK_HOME/bin
#KAFKA_HOME
export KAFKA_HOME=/home/vagrant/opt/apps/kafka_2.11-0.11.0.0
export PATH=$PATH:$KAFKA_HOME/bin
四、vagrant ssh 登录
修改root密码
sudo passwd
修改ssh配置
/etc/ssh/sshd_config
PermitRootLogin yes
PasswordAuthentication yes
重启sshd服务
service sshd restart
五、vagrant大概配置
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.hostname = "Study-01"
config.vm.network "private_network", ip: "10.0.0.10"
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
vb.name = "Study-01"
end
end