以下のVagrantfileを使用して、Simple Machines Forumがインストールした仮想マシンを構築する事ができます。
仮想マシン構築後、http://192.168.1.106/smf/にアクセスして初期設定を行います。
Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/ubuntu-16.04"
config.vm.hostname = "ub1604simplemachines"
config.vm.provider :virtualbox do |vbox|
vbox.name = "ub1604simplemachines"
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 simplemachines DEFAULT CHARACTER SET utf8;"
mysql -uroot -proot -e "CREATE USER simplemachines@localhost IDENTIFIED BY 'simplemachines';"
mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON simplemachines.* TO 'simplemachines'@'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-php7.1
apt-get -y install php7.1-gd php7.1-json php7.1-mysql php7.1-pdo php7.1-curl php7.1-mbstring
apt-get -y install php7.1-mcrypt php7.1-xml php7.1-zip php7.1-intl
# install simplemachines
mkdir -p /opt/smf
cd /opt/smf
wget https://download.simplemachines.org/index.php/smf_2-1-beta3_install.tar.gz
tar xvfz smf_2-1-beta3_install.tar.gz
cp /opt/smf/Settings.php /opt/smf/Settings_bak.php
chown -R www-data:www-data /opt/smf
ln -s /opt/smf /var/www/html
service apache2 restart
echo 'access http://192.168.1.106/smf/'
echo 'db user:simplemachines password:simplemachines db:simplemachines'
SHELL
end
〇Simple Machines Forumの初期設定画面1
〇Simple Machines Forumの初期設定画面2
〇Simple Machines Forumの初期設定画面3
〇Simple Machines Forumの初期設定画面4
〇Simple Machines Forumの初期設定画面5
〇Simple Machines Forumの初期設定画面6
〇Simple Machines Forumの画面
0 件のコメント:
コメントを投稿