VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/centos-7.3"
config.vm.hostname = "solr"
config.vm.provider :virtualbox do |vbox|
vbox.name = "solr"
vbox.cpus = 4
vbox.memory = 4096
vbox.customize ["modifyvm", :id, "--nicpromisc2","allow-all"]
end
# private network
config.vm.network "private_network", ip: "192.168.55.75", :netmask => "255.255.255.0"
# bridge netwrok
config.vm.network "public_network", ip: "192.168.1.75", :netmask => "255.255.255.0"
config.vm.network "forwarded_port", guest:22, host:20022, id:"ssh"
config.vm.provision "shell", inline: <<-SHELL
yum -y install unzip
# havegedのインストール
yum -y install epel-release
yum -y install haveged
systemctl enable haveged.service
systemctl start haveged.service
# install JDK
yum -y install java-1.8.0-openjdk
wget http://ftp.riken.jp/net/apache/lucene/solr/6.6.0/solr-6.6.0.tgz
tar xvfz solr-6.6.0.tgz
./solr-6.6.0/bin/install_solr_service.sh solr-6.6.0.tgz
sudo -u solr /opt/solr/bin/solr create -c mycore
sudo -u solr /opt/solr/bin/post -c mycore /opt/solr/example/exampledocs/*.xml
SHELL
end
○関連情報・Apache Solrに関する他の記事はこちらを参照してください。
0 件のコメント:
コメントを投稿