仮想マシン構築後、ブラウザからhttp://192.168.55.104/evolution/にアクセスして初期設定を行います。
Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/centos-7.4"
config.vm.hostname = "co74modxevo"
config.vm.provider :virtualbox do |vbox|
vbox.name = "uco74modxevo"
vbox.cpus = 2
vbox.memory = 2048
vbox.customize ["modifyvm", :id, "--nicpromisc2","allow-all"]
end
config.vm.network "private_network", ip: "192.168.55.104", :netmask => "255.255.255.0"
config.vm.network "public_network", ip:"192.168.1.104", :netmask => "255.255.255.0"
config.vm.provision "shell", inline: <<-SHELL
localectl set-locale LANG=ja_JP.UTF-8
# mysqlのインストール
sudo yum -y remove mariadb-libs
yum -y localinstall http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
yum -y install yum-utils
yum-config-manager --disable mysql57-community
yum-config-manager --enable mysql56-community
yum -y install mysql mysql-devel mysql-server mysql-utilities
sudo systemctl enable mysqld.service
sudo systemctl start mysqld.service
# change password and create users and databases.
chkconfig mysqld on
service mysqld start
export MYSQL_ROOTPWD='Root123#'
export MYSQL_PWD=`cat /var/log/mysqld.log | awk '/temporary password/ {print $NF}'`
mysql -uroot --connect-expired-password -e "SET PASSWORD = PASSWORD('$MYSQL_ROOTPWD');"
export MYSQL_PWD=$MYSQL_ROOTPWD
export MYSQL_ROOTPWD='root'
mysql -uroot --connect-expired-password -e "UNINSTALL PLUGIN validate_password;"
mysql -uroot --connect-expired-password -e "SET PASSWORD = PASSWORD('$MYSQL_ROOTPWD'); FLUSH PRIVILEGES;"
mysql -uroot -proot -e "CREATE DATABASE modx DEFAULT CHARACTER SET utf8;"
export MYSQL_PWD=$MYSQL_ROOTPWD
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
sed -i -e 's/sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES/sql_mode=NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION/' /etc/my.cnf
systemctl restart mysqld.service
# install apache2
yum -y install --enablerepo=remi,remi-php71 httpd php php-devel php-mbstring php-pdo php-mysqlnd php-gd php-xml php-zip
sed -i -e 's#;date.timezone =#date.timezone="Asia/Tokyo"#' /etc/php.ini
# install modx evolution
yum -y install unzip
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 apache:apache ./evolution-1.2.1
mv evolution-1.2.1 /opt/evolution
ln -s /opt/evolution /var/www/html
systemctl restart httpd
echo 'access http://192.168.55.104/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管理者画面1
〇MODX管理者画面2
○関連情報
・MODXに関する他の記事はこちらを参照してください。
0 件のコメント:
コメントを投稿