仮想マシン構築後、ブラウザから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
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0hZPCVLHzllVnrYMmt2hab_4T55sx89u4CtTr2fRl3OdkpcnMw7LyN1weuhE4u5blDExbmYZu-tWUk2P3Juqg0RQHbOZ3eMS21GOJtSfcGNr9lDrS-qny881J1qOqiQYcqz7iWKJYaSY/s320/co74modx1.png)
〇MODX初期設定画面2
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5UM7OAk3a9L-WLJHcUx3aw_6Bm-ra13jwWWF4XIzpxSu0yk8k3uOl-i8Ao7C45TUaZaku8ZoQNRhC7f7dfqKRWlDoKFjEm29xU9j04Jwoibyl4iMuLr54Q4uE_AWv6RvygXRYjIQG41g/s320/co74modx2.png)
〇MODX初期設定画面3
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSBnGOUHG417EbUHb2eUJLAMjMpPAsr83xbLHfaFi2oHX9prKFK2UbPttgbQMwwgrm0D-JPJfzyfSSGIFWTZNvq51Jk0Ds62vd_8xggvJjvMtbSj9rI9w9xJUuxW_5IpPnEkekkS7qIms/s320/co74modx3.png)
〇MODX初期設定画面4
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzY3X2dBHgIKpCVAljizxSTF3MBPGgxd6R_LQH5MZ2_4LVhNaRbwHl63s5YFv96n_wVOlJgX2nVSVZEwEFAcDbFLe3HpNerQOWfdFfePisoliOJLqDwNAgatG7PqOCkiqeAVReVL8rhqs/s320/co74modx4.png)
〇MODX初期設定画面5
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8fd1Y-1twaeTUKwzVzdMmocbmI9OqaG881fZBfZh9KSP1BohnuMpDZqgScSp2riXhEZBH6qeiJjd4I0JebG_blcpIKHoO_2YY8xQIs1FDl9kM1UYO1SY3Eu7_pEol9rQl0XVZ40IwEYs/s320/co74modx5.png)
〇MODX初期設定画面6
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikk_bEOgznh9QXZOuP-3MI7JYutJNMhpMRhD_j1M52RMD63Yc-1A6LiCRShQLHYx6haT-ixaQTbOwAtv5VuwngcTu8oFY5T5-UTAlUhtXVmTjKDggYeya4PvZfTCF9DMsKADoUHaBhLVo/s320/co74modx6.png)
〇MODX初期設定画面7
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdPQtrgNdGcTTOmqSfJfXRN74c_CnaFIyGPCDxejqZjh9Oj5qcQ_OIl1qGPwuH-rWw3Bb49kO0stepdRqDM5H8FjBjrd6n0820YhQV8sTVLWMG_-3pHhW2BXUZRCo7yMYnXQ_pLZWD1j0/s320/co74cmsms7.png)
〇MODX管理者画面1
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh22ElygTJKaYAW3XbuigZnUMZZZ67fjgxFoKIdfhrmxfi2r9UFtEitM28wwj2nwN75SBrrsUz-Mj3FC1N_mpuZoJi0NTiieTyXfQhEbo4KzKb4umRnHeCt6xNf_8lDuY5wWauGQUAfFn4/s320/co74modx8.png)
〇MODX管理者画面2
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVYuuVbmk9aSvSJQt8fjbBg6x7hAsN0P9uBz4PVgGq0MBYcJ5iUi2eHPLSNgnN_gUhImM1ixx6CucSOz8kkK4UDbUKDKIeJhDbtNkxWUHEYLCNGQVGFZ00F9cAtNgic79Sr0dpqhrBYHE/s320/co74modx9.png)
○関連情報
・MODXに関する他の記事はこちらを参照してください。
0 件のコメント:
コメントを投稿