以下のVagrantfileを使用して、PhorumとMariaDBをインストールされた仮想マシンを構築する事ができます。
仮想マシンを構築後、ブラウザからhttp://192.168.55.105/phorum/にアクセスして初期設定を行います。
データベース、ユーザ名、パスワードともphorumを指定します。
Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/ubuntu-16.04"
config.vm.hostname = "ub1604phorummariadb"
config.vm.provider :virtualbox do |vbox|
vbox.name = "ub1604phorummariadb"
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 mariadb
echo "mariadb-server-10.0 mysql-server/root_password password root" | sudo debconf-set-selections
echo "mariadb-server-10.0 mysql-server/root_password_again password root" | sudo debconf-set-selections
apt-get -y install mariadb-server
mysql -uroot -proot -e "CREATE DATABASE phorum DEFAULT CHARACTER SET utf8;"
mysql -uroot -proot -e "CREATE USER phorum@localhost IDENTIFIED BY 'phorum';"
mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON phorum.* TO 'phorum'@'localhost';"
mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON phorum.* TO 'phorum'@'%';"
mysql -uroot -proot -e "FLUSH PRIVILEGES;"
# install apache2 and php
apt-get -y install apache2 libapache2-mod-php7.0
apt-get -y install php7.0-gd php7.0-json php7.0-mysql php7.0-curl php7.0-mbstring
apt-get -y install php7.0-intl php7.0-mcrypt php-imagick php7.0-xml php7.0-zip
# install phorum
wget http://www.phorum.org/downloads/phorum-5.2.23.tar.gz
tar xvfz phorum-5.2.23.tar.gz
mv Core-phorum_5_2_23 /opt/phorum
chown -R www-data:www-data /opt/phorum
ln -s /opt/phorum /var/www/html
cp /opt/phorum/include/db/config.php.sample /opt/phorum/include/db/config.php
sed -i -e 's/phorum5/phorum/' /opt/phorum/include/db/config.php
service apache2 restart
echo 'access http://192.168.55.105/phorum/'
echo 'db user: phorum password:phorum db:phorum'
SHELL
end
〇Phorumの初期設定画面1
〇Phorumの初期設定画面2
〇Phorumの初期設定画面3
〇Phorumの初期設定画面4
〇Phorumの初期設定画面5
〇Phorumの初期設定画面6
〇Phorumの管理者画面
〇Phorumの画面
0 件のコメント:
コメントを投稿