Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/ubuntu-16.04"
config.vm.hostname = "ub1604liferay"
config.vm.provider :virtualbox do |vbox|
vbox.name = "ub1604liferay"
vbox.cpus = 4
vbox.memory = 8192
vbox.customize ["modifyvm", :id, "--nicpromisc2","allow-all"]
end
# private network
config.vm.network "private_network", ip: "192.168.55.110", :netmask => "255.255.255.0"
# bridge netwrok
config.vm.network "public_network", ip: "192.168.1.110", :netmask => "255.255.255.0"
config.vm.provision "shell", inline: <<-SHELL
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
apt-get -y install unzip
# javaをインストール
apt-get -y install openjdk-8-jdk
# Liferayのダウンロード
wget "https://downloads.sourceforge.net/project/lportal/Liferay%20Portal/7.0.3%20GA4/liferay-ce-portal-tomcat-7.0-ga4-20170613175008905.zip";
unzip liferay-ce-portal-tomcat-7.0-ga4-20170613175008905.zip
chmod +x ./liferay-ce-portal-7.0-ga4/tomcat-8.0.32/bin/startup.sh
chmod +x ./liferay-ce-portal-7.0-ga4/tomcat-8.0.32/bin/shutdown.sh
mv ./liferay-ce-portal-7.0-ga4 /opt
cat << EOF > /etc/systemd/system/liferay.service
[Unit]
Description=Lifelay
After=syslog.target network.target
[Service]
Type=forking
ExecStart=/opt/liferay-ce-portal-7.0-ga4/tomcat-8.0.32/bin/startup.sh
ExecStop=/opt/liferay-ce-portal-7.0-ga4/tomcat-8.0.32/bin/shutdown.sh
KillMode=none
[Install]
WantedBy=multi-user.target
EOF
systemctl enable liferay.service
systemctl start liferay.service
echo 'access url -> http://192.168.1.110:8080/';
SHELL
end
Liferayの初期セットアップ画面
Liferayにログイン後の画面
0 件のコメント:
コメントを投稿