以下のVagrantfileを使用して、PagekitとMariaDB をインストールした仮想マシン(Debian Stretch/9.3 )を構築する事ができます。
Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/debian-9.3"
config.vm.hostname = "db93pagekitmariadb"
config.vm.provider :virtualbox do |vbox|
vbox.name = "db93pagekitmariadb"
vbox.cpus = 2
vbox.memory = 2048
vbox.customize ["modifyvm", :id, "--nicpromisc2","allow-all"]
end
config.vm.network "private_network", ip: "192.168.55.101", :netmask => "255.255.255.0"
config.vm.network "public_network", ip:"192.168.1.101", :netmask => "255.255.255.0"
config.vm.provision "shell", inline: <<-SHELL
apt-get -y install task-japanese
sed -i -e 's/# ja_JP.UTF-8 UTF-8/ja_JP.UTF-8 UTF-8/' /etc/locale.gen
locale-gen
update-locale LANG=ja_JP.UTF-8
localectl set-locale LANG=ja_JP.UTF-8
localectl set-keymap jp106
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 pagekit DEFAULT CHARACTER SET utf8;"
mysql -uroot -proot -e "CREATE USER pagekit@localhost IDENTIFIED BY 'pagekit';"
mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON pagekit.* TO 'pagekit'@'localhost';"
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-curl php7.0-mbstring
apt-get -y install php7.0-mcrypt php7.0-xml php7.0-zip php7.0-intl
# install pagekit
apt-get -y install unzip
mkdir -p /opt/pagekit
cd /opt/pagekit
wget https://github.com/pagekit/pagekit/releases/download/1.0.13/pagekit-1.0.13.zip
unzip pagekit-*
chown -R www-data:www-data /opt/pagekit
ln -s /opt/pagekit /var/www/html
service apache2 restart
echo 'access http://192.168.55.101/pagekit/'
echo 'db user: pagekit password:pagekit db:pagekit'
SHELL
end
〇Pagekitの初期設定画面1
〇Pagekitの初期設定画面2
〇Pagekitの初期設定画面3
〇Pagekitの画面
○関連情報
・Pagekitに関する他の記事はこちらを参照してください。
0 件のコメント:
コメントを投稿