WordPress on Amazon Web Services (AWS) Linux EC2 Micro Instance, For Free
I’ve been wanting to get a write up done for WordPress on AWS, the fact that it is free for a year, since they’ve released the free-tier many months ago. Well I finally got around to it, however it isn’t a write up. I went ahead and put the work in to produce a video of the steps for setup & configuration. Enjoy.
The commands to install php, mysql, httpd (apache), and manipulate the config files are included below for copy and paste needs.
Create a Linux Instance on AWS – create & assign an IP Address
Login with ‘ec2-user’
sudo -i
lsof -iyum -y install httpd
service httpd start
yum -y install php mysql
yum install mysql-serverwget http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.i386.rpm
yum install phpmyadminvi /etc/httpd/conf.d/phpmyadmin.conf
Hit insert hey to make changes to the conf file.
————————————————————————————
# Web application to manage MySQL# Order Deny,Allow
# Deny from all
Allow from allAlias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin
————————————————————————————service httpd restart
service mysqld start
/usr/bin/mysqladmin -u root password ‘somepassword’
vi /etc/httpd/conf.d/phpmyadmin.conf
vi /usr/share/phpmyadmin/config.inc.php————————————————————————————
[...] /* Authentication type */
$cfg['Servers'][$i]['auth_type'] = ‘http’;
[...]
————————————————————————————Watch the video for the WordPress Database creation in mysql w/ phpmyadmin.
wget http://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz -C /var/www/html/
cp -avr /var/www/html/wordpress/* /var/www/html/
rm -rf /var/www/html/wordpress/cd /etc/httpd/conf
vi httpd.conf
Find the user here… it should be ‘apache’cp /var/www/html/wp-config-sample.php /var/www/html/wp-config.php
vi /var/www/html/wp-config.php…Add the database settings.
chown -R apache /var/www/html
chmod -R 755 /var/www/html
Pingback: DotNetShoutout
Pingback: Wordpress on Amazon Web Services (AWS) Linux EC2 Micro Instance … · Technology Computer
Dear Mr. Hall,
I have tried repeatedly to follow these instructions and set this up but the 2 times I did it I received the same answer. I was wondering if I might be able to chat with you some time? I can send you the notes & questions ahead of time.
Thanks,
Scott M. Shepard
I found that I needed to include php-mysql in the yum -y install line
Thanks a ton for this post/video.
Another option is to use the BitNami AMI, as explained in these posts
http://blog.aparicio.org/2010/10/20/how-i-moved-my-blog-from-wordpress-com-to-ec2/
http://www.ogmaciel.com/moving-wordpress-blog-to-amazons-ec2/
It is free and we designed so it works with the free tier
Yup, very true. You guys have a very easy setup too. Much easier than manually setting it up as I’ve shown in the video. However, for those that are hard core and want to manage it themselves.
I’ve actually pointed a number of people toward your AMIs.
Cheers!
“Watch the video for the WordPress Database creation in mysql w/ phpmyadmin”
Could you type this out please? I can’t watch the video at work and it’s extremely graining on my personal computer (I’m not able to get a decent connection where I’m at geographically).
It would be very helpful. So far, your directions have been great.
I would if I had the time… hit up the website for mysql and phpmyadmin. There are steps on those sites that are written out. Cheers!
What sites, Adron? Thanks.
I’m 100% now – used your post and a couple of others to cover gaps. Great work and thanks for posting!
I’m stuck here vi /etc/httpd/conf.d/phpmyadmin.conf What commands did you use to exit the session i saw something like “ix” and then “clear” after modifying (allow from all) and etc, i can’t exit from here. Thanks.
Yeah, just hit escape, then
and hit enter. That’ll save your changes and exit vi.
Ctrl Colon and then x clear. I tried it but it doesn’t work. We need some help from the expert. Can you explain it. I will link you to all my sites if you help me with this.
Dumb question #2: when I go to http://x.x.x.x/phpmyadmin and it prompts me for the username and password I’m getting stuck. I see in the video that you’re using root as the username, but when was the password set? I don’t recall setting a password for phpmyadmin. I tried the password that I set for mysql previous in the instructions, but that didn’t work. Thanks.
NM. Nuked my instance and started over. This time it worked with the mysql pword. PFM. Feel free to delete my last comment if you want. Thanks.
Sure thing… glad you enjoyed the post.
My AWS WordPress install went well. But it is not sending registration confirmation emails. All else works well. Help, please?
Did you check any of the systems logs?
Hey great post and lessons, thank you! I dont know what im doing wrong: i came to: /usr/bin/mysqladmin -u root password ‘somepassword’, but then I get answer:
/usr/bin/mysqladmin: connect to server at ‘localhost’ failed
error: ‘Access denied for user ‘root’@'localhost’ (using password: NO)’
Can you help me please?
Pingback: Gen Liu's space » Use AWS to build my own wordpress site and SVN server
On your 1′s & 0′s with this one here! Nicely detailed install and I like how you cleaned the repositories and you went along. That showed “maintenance….MAAAAN!”
Hi adron I used your tutorial to setup my Amazon EC2 cloud when i get to command vi /usr/share/phpmyadmin/config.inc.php It works but its doesn’t show ” first server” part plz help me I would really appreciate your help
photo/1
Thanks this worked perfectly for me.
Hi, thanks for the great tutorial, it helped me get PHP and MySQL running on an EC2 real quick!
There’s a minor “bug” though that seems to be bothering many users – if you copy-paste the commands, then you end up with erroneus mysql root password. The reason is that your WordPress has replaced ‘ (ascii apostrophe) with some unicode counterpart.
For example if you copy and paste the following command and replace only the somepassword part (but not the quotes), then the password will not be somepassword but ‘somepassword’ (including the unicode apostrophes).
/usr/bin/mysqladmin -u root password ‘somepassword’
You need to skip the quotes if the password is one word, or replace them with ascii apostrophes or quotes.