for AWS 5-13 Part 1: Create an EC2 Instance 14-16 Part 2: Configure your EC2 Instance 17-27 Part 3: Create an RDS Instance 28-33 Part 4: Install WordPress 34-37 Part 5: Configure S3 38 Done.
new virtual server is called an “instance”. “Spinning up an EC2 instance” is a phrase you will hear quite often which just refers to starting a new EC2 instance. EBS refers to the “hard drive” that is attached to the EC2 instance. It’s where all the system files will reside.
instance has been created it’s time to install the LAMP (Linux, Apache, MySQL and PHP) stack which we’ll need before you can install WordPress. The Linux kernel was preinstalled when the EC2 instance was created. Apache and PHP will be installed in this section. MySQL will be installed in the next section.
is to right click on the EC2 instance name and launch a Java SSH client. The other way is to use a command line SSH client such as Terminal.app on the Mac. This tutorial will use Terminal. Step 1: Connect to the EC2 instance
file contains your credentials to access the EC2 instance.) Change the permission of the file: chmod 400 [filename].pem Connect to your EC2 instance: ssh -i [filename].pem ec2-user@[Elastic IP] Switch to superuser: sudo su Install any new updates: sudo yum update To install Apache: yum install httpd Start service: service httpd start Start service automatically: chkconfig httpd on Install PHP: yum install php php-mysql Restart Apache web service daemon: service httpd restart Step 2: Install Apache and PHP
print. As of July 2012 AWS only offers a free 2 month trial of RDS MySQL. An alternative is to install MySQL on your EC2 instance, those instructions are included in the appendix.
file contains your credentials to access the EC2 instance.) Change the permission of the file: chmod 400 [filename].pem Connect to your EC2 instance: ssh -i [filename].pem ec2-user@[Elastic IP] Switch to superuser: sudo su Change to the root directory: cd /var/www Download the latest WordPress package: wget http://wordpress.org/latest.tar.gz Extract WordPress: tar -xzvf latest.tar.gz Move WordPress to the html folder: rmdir html mv wordpress html Delete the WordPress tar file: rm latest.tar.gz Change permissions on the directory: cd /var/www/ chmod o+w html cd /var/www/html sudo chown ec2-user . Step 1: Download WordPress
up media images (jpg, png, etc...) on the WordPress blog. S3 uses the term “bucket”, think of it as a container for your files. The bucket name has to be unique across the entire S3 platform.
wp-config.php vi wp-config.php Quick VI tutorial – Press i for edit mode. Press Esc on your keyboard after your are done editing. Then type :wq to save the file and quit VI. You will need to edit the following entries in the config file with the values from your RDS MySQL instance: define(‘DB_NAME’, ‘wordpress’); define(‘DB_USER’, ‘root’); define(‘DB_PASSWORD’, ‘YOUR_PASSWORD’); define(‘DB_HOST’, ‘localhost’); Below is a mapping of the WordPress config file and the RDS MySQL instance: ‘DB_NAME’ = Database Name ‘DB_USER’ = Master Username ‘DB_PASSWORD’ = Master User Password ‘DB_HOST’ = Endpoint Instructions to manually edit the WordPress config file
file contains your credentials to access the EC2 instance.) Change the permission of the file: chmod 400 [filename].pem Connect to your EC2 instance: ssh -i [filename].pem ec2-user@[Elastic IP] Switch to superuser: sudo su To install MySQL: yum install mysql-server Start MySQL: service mysqld start Start the service automatically: chkconfig mysqld on Create the wordpress database: mysqladmin -uroot create wordpress Secure your database installation: mysql_secure_installation Instructions to install MySQL on the EC2 instance