以下のVagrantfileを使用して、DotclearとMySQLをインストールした仮想マシン(Ubuntu16.04)を構築する事ができます。
仮想マシン構築後、http://192.168.55.106/dotclear/にアクセスして初期設定を行います。
Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/ubuntu-16.04"
config.vm.hostname = "ub1604dotclearmysql"
config.vm.provider :virtualbox do |vbox|
vbox.name = "ub1604dotclearmysql"
vbox.cpus = 2
vbox.memory = 2048
vbox.customize ["modifyvm", :id, "--nicpromisc2","allow-all"]
end
config.vm.network "private_network", ip: "192.168.55.106", :netmask => "255.255.255.0"
config.vm.network "public_network", ip:"192.168.1.106", :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
echo "mysql-server-5.7 mysql-server/root_password password root" | sudo debconf-set-selections
echo "mysql-server-5.7 mysql-server/root_password_again password root" | sudo debconf-set-selections
apt-get -y install mysql-server-5.7
mysql -uroot -proot -e "CREATE DATABASE dotclear DEFAULT CHARACTER SET utf8;"
mysql -uroot -proot -e "CREATE USER dotclear@localhost IDENTIFIED BY 'dotclear';"
mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON dotclear.* TO 'dotclear'@'localhost';"
mysql -uroot -proot -e "FLUSH PRIVILEGES;"
apt-get -y install software-properties-common
add-apt-repository ppa:ondrej/php
apt-get update
apt-get -y install apache2 libapache2-mod-php5.6
apt-get -y install php5.6-mysql php5.6-gd php5.6-mbstring php5.6-xml php5.6-dom php5.6-common php5.6-zip
# install dotclear
wget http://download.dotclear.org/latest.tar.gz
tar xvfz latest.tar.gz
mv dotclear /opt/dotclear
chown -R www-data:www-data /opt/dotclear
ln -s /opt/dotclear /var/www/html
service apache2 restart
echo 'access to http://192.168.55.106/dotclear/'
SHELL
end
〇Dotclearの初期設定画面1
〇Dotclearの初期設定画面2
〇Dotclearの初期設定画面3
〇Dotclearの画面
0 件のコメント:
コメントを投稿