仮想マシン構築後、ブラウザでhttp://192.168.1.107:8080/nifi/にアクセスします。
Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "archlinux/archlinux"
config.vm.hostname = "alnifi"
config.vm.provider :virtualbox do |vbox|
vbox.name = "alnifi"
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
pacman -Syy
# maximum file handles & maximum forked processes
echo '* hard nofile 50000' >> /etc/security/limits.conf
echo '* soft nofile 50000' >> /etc/security/limits.conf
echo '* hard nproc 10000' >> /etc/security/limits.conf
echo '* soft nproc 10000' >> /etc/security/limits.conf
echo '* soft nproc 10000' >> /etc/security/limits.d/90-nproc
# install java and wget
pacman --noconfirm -S jdk8-openjdk wget
# Apache Nifiのダウンロード
wget http://ftp.riken.jp/net/apache/nifi/1.4.0/nifi-1.4.0-bin.tar.gz
tar xvfz nifi-1.4.0-bin.tar.gz
mv nifi-1.4.0 /opt
#サービスとして登録
cat << EOF > /etc/systemd/system/nifi.service
[Unit]
Description=Apache Nifi
After=syslog.target network.target
[Service]
Type=forking
ExecStart=/opt/nifi-1.4.0/bin/nifi.sh start
ExecStop=/opt/nifi-1.4.0/bin/nifi.sh stop
KillMode=none
[Install]
WantedBy=multi-user.target
EOF
systemctl enable nifi.service
systemctl start nifi.service
echo 'access url -> http://192.168.1.107:8080/nifi/'
SHELL
end
〇Apache NiFiの画面
0 件のコメント:
コメントを投稿