仮想マシン構築後、ブラウザからhttp://192.168.1.105/にアクセスして初期設定を行います。
Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/ubuntu-16.04"
config.vm.hostname = "ub1604codiad"
config.vm.provider :virtualbox do |vbox|
vbox.name = "ub1604codiad"
vbox.cpus = 2
vbox.memory = 2048
vbox.customize ["modifyvm", :id, "--nicpromisc2","allow-all"]
end
config.vm.network "private_network", ip: "192.168.55.105", :netmask => "255.255.255.0"
config.vm.network "public_network", ip:"192.168.1.105", :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
# install codiad
apt-get -y install apache2 libapache2-mod-php7.0 php-zip php-mbstring
apt-get -y install git
mv /var/www/html /var/www/html.bak
git clone https://github.com/Codiad/Codiad /var/www/html/
touch /var/www/html/config.php
chown www-data:www-data -R /var/www/html/
service apache2 restart
echo 'access http://192.168.1.105/'
SHELL
end
○Codiadの初期設定画面
○Codiadの画面
0 件のコメント:
コメントを投稿