Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/centos-7.4"
config.vm.hostname = "co74redis"
config.vm.network :public_network, ip:"192.168.1.116"
config.vm.network "private_network", ip: "192.168.55.116", :netmask => "255.255.255.0"
config.vm.provider :virtualbox do |vbox|
vbox.name = "co74redis"
vbox.cpus = 4
vbox.memory = 4096
vbox.customize ["modifyvm", :id, "--nicpromisc2","allow-all"]
end
config.vm.provision "shell", inline: <<-SHELL
yum -y install epel-release
yum update
yum -y install redis
systemctl enable redis
systemctl start redis
# 動作確認
redis-cli << EOF
ping
flushall
set mykey "hello world."
get mykey
EOF
SHELL
end
0 件のコメント:
コメントを投稿