Last active
November 27, 2015 16:44
-
-
Save miya0001/6b5a41ee555ea81d56e6 to your computer and use it in GitHub Desktop.
AMIMOTO Automated Setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -ex; | |
# WordPressをec2-user権限で動かすように設定を変更 | |
curl -L https://raw.githubusercontent.com/amimoto-ami/run-httpd-as-ec2-user/master/run-httpd-as-ec2-user.sh | sudo bash | |
# WordPressのセットアップ | |
wp --path=/var/www/vhosts/$(curl -L http://169.254.169.254/latest/meta-data/instance-id) \ | |
core install \ | |
--url=http://$(curl -L http://169.254.169.254/latest/meta-data/public-ipv4) \ | |
--title="Welcome to the WordPress powered by AMIMOTO" \ | |
--admin_user="admin" \ | |
--admin_password="$(curl -L http://169.254.169.254/latest/meta-data/instance-id)" \ | |
--admin_email="[email protected]" | |
# WordPressプラグインのインストール | |
wp --path=/var/www/vhosts/$(curl -L http://169.254.169.254/latest/meta-data/instance-id) \ | |
plugin install contact-form-7 --activate | |
# WordPressテーマのセットアップ | |
wp --path=/var/www/vhosts/$(curl -L http://169.254.169.254/latest/meta-data/instance-id) \ | |
theme install twentyfifteen --activate | |
# パーマリンク設定の変更 | |
wp --path=/var/www/vhosts/$(curl -L http://169.254.169.254/latest/meta-data/instance-id) \ | |
rewrite structure "/archives/%post_id%" | |
# オプションを変更 | |
wp --path=/var/www/vhosts/$(curl -L http://169.254.169.254/latest/meta-data/instance-id) \ | |
option update blogdescription "Powered by AMIMOTO!" | |
# 最後にインスタンスIDを入力するUIを削除 | |
sudo rm -f /opt/local/amimoto/wp-admin/install.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment