仮想マシンが構築された後、ブラウザからhttp://192.168.55.107/textpattern/textpattern/setup/index.phpにアクセスして初期設定を行います。
DB名、データベースユーザ、パスワードにtextpatternを指定します。
Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/ubuntu-16.04"
config.vm.hostname = "ub1604textpattern"
config.vm.provider :virtualbox do |vbox|
vbox.name = "ub1604textpattern"
vbox.cpus = 2
vbox.memory = 2048
vbox.customize ["modifyvm", :id, "--nicpromisc2","allow-all"]
end
config.vm.network "private_network", ip: "192.168.55.107", :netmask => "255.255.255.0"
config.vm.network "public_network", ip:"192.168.1.107", :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 textpattern DEFAULT CHARACTER SET utf8;"
mysql -uroot -proot -e "CREATE USER textpattern@localhost IDENTIFIED BY 'textpattern';"
mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON textpattern.* TO 'textpattern'@'localhost';"
mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON textpattern.* TO 'textpattern'@'%';"
mysql -uroot -proot -e "FLUSH PRIVILEGES;"
apt-get -y install apache2 libapache2-mod-php7.0
apt-get -y install php7.0-gd php7.0-json php7.0-mysql php7.0-pdo php7.0-mbstring php7.0-mcrypt php7.0-xml php7.0-zip
#apt-get -y install php7.0-zip php7.0-gd php7.0-curl
# install textpattern
wget https://textpattern.com/file_download/74/textpattern-4.6.2.tar.gz
tar xvfz textpattern-4.6.2.tar.gz
mv textpattern-4.6.2 /opt/textpattern
chown -R www-data:www-data /opt/textpattern
ln -s /opt/textpattern /var/www/html
cat << EOF >> /etc/apache2/apache2.conf
<Directory /var/www/html>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
EOF
a2enmod rewrite
systemctl restart apache2.service
echo 'access http://192.168.55.107/textpattern/textpattern/setup/index.php'
SHELL
end
〇textpattern初期設定画面1
〇textpattern初期設定画面2
〇textpattern初期設定画面3
〇textpattern初期設定画面4
〇textpattern初期設定画面5
〇textpatternログイン画面
〇textpattern投稿画面
○関連情報
・Textpatternに関する他の記事はこちらを参照してください。
0 件のコメント:
コメントを投稿