仮想マシン構築後、ブラウザからhttp://192.168.55.104:8161で管理画面にアクセスします。デフォルトのユーザはadmin、パスワードもadminです。
Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/debian-9.3"
config.vm.hostname = "db93activemq"
config.vm.provider :virtualbox do |vbox|
vbox.name = "db93activemq"
vbox.cpus = 2
vbox.memory = 2048
vbox.customize ["modifyvm", :id, "--nicpromisc2","allow-all"]
end
config.vm.network "private_network", ip: "192.168.55.104", :netmask => "255.255.255.0"
config.vm.network "public_network", ip:"192.168.1.104", :netmask => "255.255.255.0"
config.vm.provision "shell", inline: <<-SHELL
apt-get -y install task-japanese
sed -i -e 's/# ja_JP.UTF-8 UTF-8/ja_JP.UTF-8 UTF-8/' /etc/locale.gen
locale-gen
update-locale LANG=ja_JP.UTF-8
localectl set-locale LANG=ja_JP.UTF-8
localectl set-keymap jp106
apt-get update
#DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
# install java
apt-get -y install openjdk-8-jdk
# install activemq
wget http://ftp.tsukuba.wide.ad.jp/software/apache/activemq/5.15.2/apache-activemq-5.15.2-bin.tar.gz
tar xvfz apache-activemq-5.15.2-bin.tar.gz
mv apache-activemq-5.15.2 /opt/activemq
cat << EOF > /etc/systemd/system/activemq.service
[Unit]
Description=Apache ActiveMQ
After=syslog.target network.target
[Service]
Type=forking
ExecStart=/opt/activemq/bin/activemq start
ExecStop=/opt/activemq/bin/activemq stop
KillMode=none
[Install]
WantedBy=multi-user.target
EOF
systemctl enable activemq.service
systemctl start activemq.service
echo 'access to http://192.168.55.104:8161'
SHELL
end
〇ActiveMQの画面
○関連情報
・Apache ActiveMQに関する他の記事はこちらを参照してください。
・ActiveMQのプロジェクトwebサイト
http://activemq.apache.org/
0 件のコメント:
コメントを投稿