以下のVagrantfileを使用して、MODX EvolutionとMariaDBがインストールされた仮想マシン(Debian Stretch/9.3) を構築する事ができます。
仮想マシン構築後、ブラウザからhttp://192.168.55.103/evolutionにアクセスして初期設定を行います。
Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/debian-9.3"
config.vm.hostname = "db93modxmariadb"
config.vm.provider :virtualbox do |vbox|
vbox.name = "db93modxmariadb"
vbox.cpus = 2
vbox.memory = 2048
vbox.customize ["modifyvm", :id, "--nicpromisc2","allow-all"]
end
config.vm.network "private_network", ip: "192.168.55.103", :netmask => "255.255.255.0"
config.vm.network "public_network", ip:"192.168.1.103", :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 modx DEFAULT CHARACTER SET utf8;"
mysql -uroot -proot -e "CREATE USER modx@localhost IDENTIFIED BY 'modx';"
mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON modx.* TO 'modx'@'localhost';"
mysql -uroot -proot -e "FLUSH PRIVILEGES;"
# turn off strict mode
echo "sql_mode=ONLY_FULL_GROUP_BY,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" >> /etc/mysql/mysql.conf.d/mysqld.cnf
systemctl restart mysql
# install apache2
apt-get -y install apache2-bin libapache2-mod-php7.0 php7.0-gd php7.0-mysql php7.0-mbstring php7.0-xml
apt-get -y install unzip
sed -i -e 's#;date.timezone =#date.timezone = "Asia/Tokyo"#' /etc/php/7.0/apache2/php.ini
# install modx evolution
wget https://modx.com/download/direct?id=evolution-1.2.1.zip -O evolution-1.2.1.zip
unzip evolution-1.2.1.zip
chown -R www-data:www-data ./evolution-1.2.1
mv evolution-1.2.1 /opt/evolution
ln -s /opt/evolution /var/www/html
service apache2 restart
echo 'access http://192.168.55.103/evolution/'
echo 'db: modx user: modx password:modx'
SHELL
end
〇modxの初期設定画面1
〇modxの初期設定画面2
〇modxの初期設定画面3
〇modxの初期設定画面4
〇modxの初期設定画面5
〇modxの初期設定画面6
〇modxの初期設定画面7
〇modxの初期設定画面8
〇modxの初期設定画面9
〇modxの管理者画面
○関連情報
・MODXに関する他の記事はこちらを参照してください。
0 件のコメント:
コメントを投稿