仮想マシン構築後、ブラウザからhttp://192.168.55.107:8080でWeb Interfaceにアクセスできます。
Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/ubuntu-16.04"
config.vm.hostname = "ub1604jackrabbit"
config.vm.provider :virtualbox do |vbox|
vbox.name = "ub1604jackrabbit"
vbox.cpus = 4
vbox.memory = 4096
vbox.customize ["modifyvm", :id, "--nicpromisc2","allow-all"]
end
config.vm.network "private_network", ip: "192.168.55.107", :netmask => "255.255.255.0"
config.vm.network "public_network", ip:"192.168.1.107", :netmask => "255.255.255.0"
config.vm.provision "shell", inline: <<-SHELL
# update packages
apt-get update
#DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
locale-gen ja_JP.UTF-8
localectl set-locale LANG=ja_JP.UTF-8
# install java
apt-get -y install openjdk-8-jdk
# install jackrabbit
mkdir -p /opt/jackrabbit
cd /opt/jackrabbit
wget http://ftp.riken.jp/net/apache/jackrabbit/2.16.0/jackrabbit-standalone-2.16.0.jar
cat << EOF > /etc/systemd/system/jackrabbit.service
[Unit]
Description=Apache JackRabbit
Requires=network.target
After=network.target
[Service]
Type=simple
WorkingDirectory=/opt/jackrabbit
ExecStart=/usr/bin/java -jar /opt/jackrabbit/jackrabbit-standalone-2.16.0.jar
[Install]
WantedBy=multi-user.target
EOF
systemctl enable jackrabbit.service
systemctl start jackrabbit.service
echo 'access http://192.168.55.107:8080'
SHELL
end
〇Apache JackrabbitのWeb Interface画面
○関連情報
・Apache Jackrabbitに関する他の記事はこちらを参照してください。
0 件のコメント:
コメントを投稿