Created
May 14, 2013 12:21
-
-
Save YoshihitoAso/5575496 to your computer and use it in GitHub Desktop.
[AWS][EC2]Amazon LinuxにWordPressを入れる (ローカルDB編)
This file contains hidden or 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
| ここではEC2(Amazon Linux 64bit)を利用してWordPress環境を構築する手順を紹介します。 | |
| 今回は最もシンプルなパターンとしてEC2単体でローカルストレージにDB(MySQL)を構築します。また、ロードバランサ(ELB)等は利用せず、WordPressサーバへのアクセスはPublic DNSもしくはElastic IPでのEC2インスタンスへの直接的なアクセスで行います。 | |
| ▼ EC2インスタンスの起動 | |
| ▼パッケージのインストールと起動 | |
| MySQL、PHPのインストールと起動を行います。 | |
| $sudo yum -y update | |
| $sudo yum -y install httpd mysql-server php php-mysql php-mbstring | |
| $sudo /sbin/chkconfig mysqld on | |
| $sudo /sbin/chkconfig httpd on | |
| $sudo /etc/init.d/httpd start | |
| $sudo /etc/init.d/mysqld start | |
| ▼WordPressのインストールとデプロイ | |
| WordPressのダウンロードとデプロイを行います。 | |
| $wget http://ja.wordpress.org/latest-ja.tar.gz ~/ | |
| $tar zxvf latest-ja.tar.gz | |
| $sudo cp -r wordpress/* /var/www/html/ | |
| $sudo chown apache:apache -R /var/www/html/ | |
| ▼WordPress用のDBユーザ作成 | |
| WordPress用のDBとユーザを作成します。 | |
| $echo 'CREATE DATABASE wordpress; GRANT ALL PRIVILEGES ON wordpress .* TO "wpuser"@"localhost" IDENTIFIED BY "wppassword" ;FLUSH PRIVILEGES; '| mysql -u root | |
| DBはローカル、DBユーザ wpuser、DBパスワード wppassword、DB名 wordpressで作成しています。 | |
| その後は | |
| http://{HOSTNAME}/wp-admin/setup-config.php | |
| にアクセスして、ブラウザ上のセットアップを続けます。 | |
| 以上。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment