Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/ubuntu-16.04"
config.vm.hostname = "ub1604joomla"
config.vm.provider :virtualbox do |vbox|
vbox.name = "ub1604joomla"
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 mysql
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 joomla DEFAULT CHARACTER SET utf8;"
mysql -uroot -proot -e "CREATE USER joomla@localhost IDENTIFIED BY 'joomla';"
mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON joomla.* TO 'joomla'@'localhost';"
mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON joomla.* TO 'joomla'@'%';"
mysql -uroot -proot -e "FLUSH PRIVILEGES;"
apt-get -y install apache2 libapache2-mod-php7.0 php7.0-cgi php7.0-gd php7.0-json php7.0-mysql php7.0-curl php7.0-mbstring php7.0-mcrypt php7.0-xml
apt-get -y install unzip
# install joomla
mkdir joomla
cd joomla
wget -O joomla.zip https://downloads.joomla.org/cms/joomla3/3-8-1/joomla_3-8-1-stable-full_package-zip?format=zip
unzip joomla.zip
mv ~vagrant/joomla /opt/joomla
chown -R www-data:www-data /opt/joomla
ln -s /opt/joomla /var/www/html
service apache2 restart
echo 'access http://192.168.1.105/joomla/';;
echo 'user: joomla password:joomla db:joomla'
SHELL
end
1.初期設定画面1
2.初期設定画面2
3.初期設定画面3
4.初期設定画面4
5.初期設定画面5
6.ログイン画面
7.ログイン後の画面
○関連情報
・Joomlaに関する他の記事はこちらを参照してください。
0 件のコメント:
コメントを投稿