WordPress on Linux in the Amazon Cloud with Mac

Before we beign
I believe this article is of high value to any web developer seeking a better hosting solution, and in particular, cloud hosting. Though somewhat technical, the instructions given here are easy to follow, and you don’t need a background in server management or server-side development to follow the tutorial. I’m a designer, and the first time I ever opened terminal was when I was trying to connect to my amazon linux server, so if you don’t feel like you’re up for setting up your own linux server, then trust me, it’s easier than it sounds. Because of it’s length and technical nature, I’ve also made the article available for download in MS Word format.
Amazon EC2 Cloud Hosting
Amazon provides an incredible, ever-expanding service for cloud hosting. Their EC2 service is bundled with a fantastic CDN (S3), Site Monitoring (Cloud Watch), and a myriad of complementary tools and services that make Amazon a great option for moving your site into the cloud. This is a guide to help you take advantage of those services.
Linux vs. Windows
The reason for choosing Linux vs. Windows is simple: cost. It’s much, much cheaper in the long run, well, in any run, to host an EC2 instance with Linux over Windows. Considering the relative operating costs, the choice is easy.
Don’t worry, Be Happy
If you’re like me, you’re mildly daunted at the idea of getting your hands dirty with Linux and Terminal. Don’t worry; it’s easier than it looks. I’m a designer, and until recently knew almost nothing about Linux or Terminal. I found that after you get the basics down, it’s surprisingly easy to get moving with the rest.
Getting Started
The first thing you’ll need on this journey is an account with Amazon Web Services (AWS). Simply head to http://aws.amazon.com, and click the Create an AWS Account link at the top. They’ll have you verify your identity by giving you a PIN over the phone to complete your registration.
Setting up your Instance
After you’ve signed in with your new AWS account, you’ll want to click into the Amazon EC2 tab, and then click the Launch Instance button.

Amazon EC2 offers a multitude of Amazon Machine Image’s (AMI’s) to choose from, including both Linux and Microsoft options, but as stated before, we’ll be working with Linux. Yay!
Select the Basic 32-bit Amazon Linux AMI 2010.11.1 Beta (AMI Id: ami-76f0061f).

Next, on the Instance details section, make sure to select Launch Instances, and then select your instance type. I chose micro, because it not only defines the amount of traffic my site gets, but it’s free for a year.
From here you can also define the number of instances you’d like, and the availability zone, I kept the defaults. Hit continue.

In this section, you can configure Advanced Instance Options, including enabling CloudWatch (very handy monitoring tool), but again I left everything on their defaults.

Now you can add some tags; you can read about using tags here: Using Tags. After you’ve selected your tags, hit continue.

Now we’ll create the Key Pair for this server. Select the name, and hit the Create & Download your Key Pair. Do not loose this file, it’s important, and you can’t download it again. Keep it secret, keep it safe. After you’ve downloaded your key pair, you’ll be brought to the next step.

On the next step, select Create a new Security Group, and then give it a name and description. We’ll want to add at least two rules here, SSH and HTTP, you may want more rules depending on how you’ll be using this server. Make sure you select SSH and HTTP.

That’s it! Just hit the Launch button (makes you feel like your head of mission control for NASA), and wait for your instance to launch. You can just hit close on the next dialog box.

After your server has moved from pending status to running status, move to the left hand menu, and select Elastic IPs, where obviously we’ll be giving our server an IP address.
Click the Allocate New Address button, select the new address, and hit the associate button to assign this IP address to the Instance you created.

Configuring SSH
Now that we have an instance up and running, we can connect through Secure Shell (SSH). This article was written for Mac users, but Windows users can accomplish the same thing using a program like PuTTY. So now we’ll need to grab that .PEM file you saved in a secure spot when you downloaded your Key Pair. Again, don’t loose this file. First we need to copy that .PEM file (mines called calebogden.pem) into the .SSH folder of your mac. Open up terminal and input this command to open that hidden folder.
open ~/.ssh
Drag your .PEM file into the SSH folder.

Now we can test our ssh connection through terminal. Launch terminal, and input this command:
ssh -i ~/.ssh/YOUR_KEYPAIR_FILE.pem ec2-user@YOUR_IP_ADDRESS
When asked about the authenticity of the host, type yes and hit enter. You’ll likely also see a warning that says WARNING: UNPROTECTED PRIVATE KEY FILE!, in which case run this command to give your .PEM file the proper permissions.
sudo chmod 600 ~/.ssh/YOUR_KEYPAIR_FILE.pem
If you had to change the file permissions, then run your connection again. You should see this beautiful welcome text.
Connecting as the Root User
Now that we’re in, we want to work as the root user, but we’ll have to jump through some hoops to be able to connect as the root every time. If you try to connect with root at first, instead of ec2-user, you’ll hit a roadblock. To fix this, become a superuser (I know how awesome that sounds) by running this command.
sudo su
Now we’ll open the SSH config and change some settings. As with all things in Linux, you want to be very careful to only change / edit what’s listed here. To open the config we’ll be using the Linux Vim editor by running this command.
vi /etc/ssh/sshd_config
Find the line that has the setting PermitRootLogin forced-commands-only, comment that out by putting a # sign before it, and then add PermitRootLogin without-password beneath it. This will allow us to connect as a root user.
Note: To start editing, just hit the ‘I’ key while in VIM, to exit the insert mode, it the ESC key.

After you’ve fixed the config file, hit ESC to exit insert mode, and then run the command :w to write, and the :q to quit, alternatively :wq.
Now we have to change the authorized_keys SSH file to not run commands in the first line. Open that config file with the command:
vi /root/.ssh/authorized_keys
Once its open, delete the command command=”echo ‘Please login as the ec2-user user rather than root user.’;echo;sleep 10, all the way until you reach, ssh-rsa. Now it ESC and :wq to leave vim.

We now need to restart the SSH service, this is done by using the command:
service sshd restart
Now open a new terminal window without closing the old one, and test the connection.
ssh -i ~/.ssh/YOUR_KEYPAIR_FILE.pem root@YOUR_IP_ADDRESS
You should see the beautiful welcome message again; you’ll now be connected as a root user. Awesome.
Exhausted yet? Well we’re just getting started. Now, head back to the hidden .SSH folder on your computer, create a new file called config (no extension), you’ll need to use a text editor when making change to this file. We’ll just create a shortcut that will allow us to connect easily with programs like Coda and Transmit, and an easy entrance with SSH through terminal.
In this config file, we’ll define a Host, User, IdentityFile, and HostName
Host HOST_NICKNAME_HERE
User root
IdentityFile “~/.ssh/YOUR_KEYPAIR_FILE.pem”
HostName YOUR_IP_ADDRESS
Now head back to terminal, open a new window, and test the connection with this line:
ssh HOST_NICKNAME_HERE
You’ll see the familiar welcome text, and now we’re now ready to start pumping in software!
Installing Server Software
Programs can be easily installed with the yum command. So lets start by installing Apache with the command line:
yum install httpd
And then start apache with command:
service httpd start
Now we’ll install PHP and some needed libraries:
yum install php libmcrypt libmcrypt-devel php-mcrypt php-mbstring
After which we’ll want to restart Apache:
service httpd restart
Install MySQL
yum install mysql
yum install –y mysql-server
Start MySQL Server
service mysqld start
Now we can assign a MySQL Server password
/usr/bin/mysqladmin -u root password ‘SUPERSECUREPASSWORD’
And that’s it! You have your basic webserver, php, and mysql installed. At this point you can see things coming together by browsing to: http://YOUR_IP_ADDRESS. You should see the Amazon Linux AMI Test Page.

Installing phpMyAdmin
Now since phpMyAdmin isn’t in Amazon’s yum, and since some older copies are buggy, we’ll install the latest version by hand.
First lets go to the Document Root (where apaches loads files for the web from), which should be /var/www/html, but you can verify by running the command grep DocumentRoot /etc/httpd/conf/httpd.conf.
Go to Document Root
cd /var/www/html
Download phpMyAdmin 3.3.9.1 (or latest version, if you update a later version, remember to change your folder/file paths to the correct version)
wget http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/3.3.9.1/phpMyAdmin-3.3.9.1-all-languages.tar.gz
Extract to Document Root
tar -xzvf phpMyAdmin-3.3.9.1-all-languages.tar.gz -C /var/www/html
Rename folder to phpmyadmin, and delete downloaded file.
mv phpMyAdmin-3.3.9.1-all-languages phpmyadmin
rm -rf phpMyAdmin-3.3.9.1-all-languages.tar.gz
We now need to add a user and give that user permission for this folder:
adduser phpmyadmin
passwd phpmyadmin
After you set a password, find the user group (should be apache) with this command:
egrep 'User|Group' /etc/httpd/conf/httpd.conf
Which will return:
User apache
Group apache
And last, run this command to associate that user with the phpmyadmin folder:
chown -R phpmyadmin.apache phpmyadmin/
Now we need to go the that folder, and set some permissions:
cd /var/www/html/phpmyadmin/
mkdir config
chmod o+rw config
cp config.sample.inc.php config/config.inc.php
chmod o+w config/config.inc.php
And now we should restart Apache…
service httpd restart
Finally! You can head over and configure your phpMyAdmin!
Browse to: http://YOUR_SERVER_IP/phpmyadmin/setup/index.php, and hit the new server button.
The only values you need to input are the Verbose name of the server, and Password for config auth.

Now you can login by browsing to: http://YOUR_SERVER_IP/phpmyadmin/index.php. Username will be root and password is whatever you set as your super secure password for MySQL above.

NOTE: If you see an error that says “Cannot load mysql extension. Please check your PHP configuration”, then run the commands below, and then reload the page. You may have to wait a few seconds after you restart it. If the message still displays, try restarting a final time after waiting a few minutes.
yum -y install php-mysql
service httpd restart
After you log in, as the warning near the bottom of the page says, the last step is to remove the config folder we created above, and adjust some other options.
cd /var/www/html/phpmyadmin/
rm -rf config
Now use VIM to rename, and edit the main config file:
mv config.sample.inc.php config.inc.php
vi config.inc.php
Add a BlowFish Secret as shown below:
$cfg['blowfish_secret'] = 'SuckBird'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
Hit ESC, and then :wq to save and quit.
Now, we head back into the world of GUI, and setup our WordPress Database. Getting close!
Browse to: http://YOUR_IP_ADDRESS/phpmyadmin/index.php, after you log into phpMyAdmin again, create a new table called wordpress.

After this table is created, head to the privileges tab, and add a new user. Fill in the User name, and password / confirm. For the Database for user section, select the option Grant all privileges on database “wordpress”.

Whew! That was intense. Okay, just a few more minutes and you’ll have your WordPress Platform running on Linux.
Installing WordPress
Now the easy (and fun) part of the process, getting wordpress installed. Head back to the root:
cd /
Execute these commands to download wordpress, extract it to your Document Root, and install wordpress in the main root of your site.
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
Lastly, we need to give Apache some permissions for the Document Root folder.
chown -R apache /var/www/html
chmod -R 755 /var/www/html
Now lets do a restart on apache, and start setting up WordPress!
service httpd restart
Browse to your wordpress site: http://YOUR_IP_ADDRESS. You should see a Create Configuration File button, click that, and then click the Lets Go button.

Input your credentials

Input your WordPress Site information…

Success!

From this point, you can connect easily with programs like Coda and Transmit to start working on your code!

Conclusion
Amazon Cloud is, by far, the best option I’ve found for Cloud Hosting, and this article barley scratches the surface of the power found in the variety of AWS products.
As for hosting on a Linux server, there is a reason Microsoft is so dang expensive to operate; it’s a lot easier to get things started, however, the cost savings with operating on Linux vastly outweighs the rigors of using it.
Once you’ve gone through this process a single time, you can launch additional images based on the AMI you created, which in turn means you can get your clients hosted in the cloud on their own server, free for a year, with a few seconds of work. Now that’s incentive.
Additional Help and Resources Used
This article could not have been possible without the stellar work of the people who own the resources below. In addition I’ve turned on comments for this article to answer any questions.
JeffreySambells
http://jeffreysambells.com/posts/2010/08/04/connecting-to-amazon-ec2-using-transmit
How-To Geek
http://www.howtogeek.com/wiki/Fixing_%22WARNING:_UNPROTECTED_PRIVATE_KEY_FILE!%22_on_Linux
The Geek Stuff
http://www.thegeekstuff.com/2010/09/install-phpmyadmin/
2Bit Coder
http://www.2bit-coder.com/2010/09/wordpress-in-the-cloud-amazon-ec2/
Whirix Blog
http://blog.whirix.com/2011/02/root-login-to-amazon-ec2-instance.html
Linux Blog Magazine
http://www.jonboy60.com/2010/08/23/howto-install-mcrypt-and-recompile-php/
nixCraft
http://www.cyberciti.biz/faq/howto-find-unix-linux-apache-documentroot
72 Responses to WordPress on Linux in the Amazon Cloud with Mac
Finely done, I was up and running in less than 30 minutes. The time you spent putting this together is highly appreciated!
Still a little scared of linux… but this write-up almost makes me want to try it out. Thanks for the great post!
Tried it and have spent over 4 hours working on it. I was able to find my .ssh on my mac but was unable to move forward. Would it be possible to have a skype conversation to learn and maybe have someone take over the controls. Totally willing to pay as this is very important information to launch multiple websites. Thanks is advance. Best regards, Pablo
@Kyle Awesome!
@Dave Thanks, we should have a linux party at Hard Times :)
@Pablo To launch multiple sites on the same instance you have to configure a vhost file, which I’m adding to the documentation soon.
You could SSH into the server from your mac? If you get that far it’s very important to make sure you’re connecting as the Root user (see Connecting as the Root User section) or you wont be able to move forward.
If you’re still stuck after that shoot me an email.
Pingback: Non-techie Guide to setting up Django, Apache, MySQL on Amazon EC2 | pragmaticstartup
Very diligent indeed. I spent the whole day trying to figure how to install phpmyadmin on EC2 to no avail. I wish I had seen your post earlier in the day to save me time.
Your effort is much appreciated.
Cheers
Hi, I follow all the steps and thank you very much for this details instruction,
I managed to get wordpress running,
But how can we point our domain .com to the wordpress installed site?
Hi Caleb,
Great post, followed it and it worked perfectly. Now, how would you use the same ec2 beta instance to host multiple hosts (vhosts) in apache and have the same phpmyadmin access to all of them. For example, havinging http://www.site1.com/phpmyadmin, http://www.site2.com/phpmyadmin, http://www.site3.com/phpmyadmin
Thanks,
Ibrahim
@Amar Glad to hear it!
@Santel Point your DNS A record to the Elastic IP that Amazon provided you (what you connect to with SSH).
@Ibrahim I’m following up this post with another on how to do that, but to be short, you have to define a vhost file in your config. You define that by creating a “vhosts.conf” file in your conf.d folder of your config. So the path url would be:
/etc/httpd/conf.d/vhost.confAnd then you can define VirtualHosts like this:
ServerName http://www.XXX.com
DocumentRoot /var/www/html/XXX
ServerName http://www.YYY.com
DocumentRoot /var/www/html/YYY
ServerName http://www.ZZZ.com
DocumentRoot /var/www/html/ZZZ
If you google that syntax you can find more options than I included there.
Is the virtual hosts tutorial up yet?
Pingback: Multiple Websites on Amazon EC2 Linux with Virtual Hosts
Here is the virtual host tutorial: http://www.calebogden.com/multiple-websites-amazon-ec2-linux-virtual-hosts/
When I type the “vi /etc/ssh/sshd_config” command I do not have the same information provided in your screen shot. All that shows up is a bunch of ~ on each line and blank space. Do you know why this is happening? I believe I followed your directions correctly until this part.
Hi Jeffrey, Here’s a few things to check:
- Make sure you have your security groups setup to include SSH (see above), including correct ports.
- Make sure you’re connected as root user, instead of ec2user
- Make sure you can use VIM in other capacities
This post is awsome. It just feels like a designer’s writing, great job!
Hi Caleb,
Thank for your clear tutorials. I can now manage to have few blogs hosted on EC2.
I have another question, By following these steps, where are the root stored? Is it on local Instance or EBS?
I don’t know if we can verify this.
THanks
superb article !!! thumbs up!!
Thanks for this article!
Slight problem when downloading phpMyAdmin using your syntax given.
It only worked when I changed the version from 3.3.9.1 to 3.4.2 (latest release at time of writing).
So I assume that for anyone following this guide in future, they should be changing the version number to the latest release?
Cheers
@Santel What root are you referring to? There’s a lot of roots in Linux :-), I *believe* things like Document Root and Root User are stored on your local instance.
@Zihui Exactly, thanks for the note, I’ve updated the article to reflect your comment.
Thanks so much for your help with this post!
The only item I tripped up on was changing the permissions for apache, I found that the username was not “apache” but “www-data”, so I replaced your above chown to:
chown -R www-data /var/www/html
And it works perfectly now!
Thanks again!!
So, I think I have followed your instructions to a ‘T’, but when I get to the ‘ssh HOST_NICKNAME_HERE’ part, to test the connection with the config file, this is what I get:
David-J-Labourdettes-MacBook-Pro:~ David_Labourdette$ ssh webserver
/Users/David_Labourdette/.ssh/config: line 1: Bad configuration option: {\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350
/Users/David_Labourdette/.ssh/config: line 2: Bad configuration option: {\fonttbl\f0\fswiss\fcharset0
/Users/David_Labourdette/.ssh/config: line 3: Bad configuration option: {\colortbl;\red255\green255\blue255;}
/Users/David_Labourdette/.ssh/config: line 4: Bad configuration option: \margl1440\margr1440\vieww9000\viewh8400\viewkind0
/Users/David_Labourdette/.ssh/config: line 5: Bad configuration option: \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
/Users/David_Labourdette/.ssh/config: line 7: Bad configuration option: \f0\fs24
/Users/David_Labourdette/.ssh/config: terminating, 6 bad configuration options
…any ideas on why? and how I can fix that?
Thanks!
Hi David, That config file is very touchy. I’ve had issues as you’re describing from whitepsace characters being out of place. Make sure you’re using a text editor to modify it, and that there’s no trailing white space.
Can you add how to install FastCGI with this guide?
I’ve looked, no extra spaces or anything???
I’m using TextEdit to edit it, is this ok?
In the config file is there a special nickname that I am supposed to use, or can I just make one up? and is the IP address the one that was assigned to me in the Elastic IP section of the EC2 page?
…it’s not even letting me get to the welcome screen in terminal anymore- I’m still getting the bad configuration options message, but this time there seems to be 8 errors on 9 lines… so maybe it has nothing to do with the config file???
well, I got it to work… i deleted the config, and it let me in. So I opened applescript and wrote it in there, saved it on my desktop as a text .applescript, then I erased the file extension – and instead of showing up as a ‘Type: Document’, it showed up as a ‘Type: SimpleText Format’ – and that seems to do the trick for now!!! :-)
Hello! An excellent guide, well written, and it was all going so well for me…!
I get stuck at the “NOTE: If you see an error that says “Cannot load mysql extension. Please check your PHP configuration”, then run the commands below, and then reload the page. You may have to wait a few seconds after you restart it. If the message still displays, try restarting a final time after waiting a few minutes.”
I’ve tried running the extra 2 lines, and restarted httpd, and mysqld, but still get the error.
Anything else I could possibly try?
ok, sorted out my own question, I had to go to
http://YOUR_IP_ADDRESS/phpmyadmin/ instead of http://YOUR_IP_ADDRESS/phpmyadmin/index.php
and it worked… I’m guessing it wasn’t a coincidence in time waited after a httpd restart!
Thanks again, all up and running. Will venture into the Virtual Hosts tute next!
Pingback: Way overkill for me, but as I look for a way to offer and manage wordpress to a few clients, this seems like a brilliant idea. | Geekisbueno.net
Oh…plz help me
when i go to http://MYIP/phpmyadmin/index.php
it said ” the mysqli extension is missing.Please check your PHP configuration”
Can anyone help me?
Pingback: system error » the considered opinions of jake smith » Up in the cloud
Great guide. I followed everything and then when it came to logging in I got a “1045 Cannot Loin in to MySql Server.” I tried it two more times and still no luck. I am sure I am following your instructions. Any ideas? Anybody else have this problem?
@AT Yes, I got stuck at the same place.
#1045 Cannot log in to the MySQL server
But the supersecurepassword I was entering was the one I set for config auth but it has to be your MySqladmin password.
@Alex I’ll look into adding that
@David Labourdette Yes I’ve had the same problem before, and that was the only solution I could find.
@Jake Glad it worked!
@Jordan Please see my note in regards to the error “Cannot load mysql extension. Please check your PHP configuration”. Follow those instructions and it should work.
@AT, @SS Yes you need to be careful while setting your passwords, but as SS mentioned you need to use your MySQLAdmin password.
Keep in mind that typos and spelling mistakes will a lot of problems, everything in my tutorial above should be copy/paste.
This worked for me when I got the “1045 Cannot Loin in to MySql Server.” error. From command line:
]# mysql -uroot
>SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD(‘your password here’);
>flush privileges;
q
then
]# mysql -uroot -p
Thanks for this article. Especially the part of installing phpMyAdmin was really helpful for me.
Pingback: Problem install phpmyadmin on amazon ec2? - Admins Goodies
Many thanks for your amazing guide and now I got my first wordpress running on EC2. But I had a problem with permalink > /%postname%-00%post_id%.html. So how to solve this problem, TQ
Hi Caleb! Great job putting this doc together, I will keep this link safe as my primary doc to set up Amazon Ec2 instances!! :)
One question: after configuring the phpmyadmin, the ip/phpmyadmin/setup/index.html is still available and apparently without a password protection…. Is that the way it is supposed to be?
i can only say : awesomeness. gracias
Anyone have any ideas on setting up an SFTP user for uploading documents to the web root?
Hi Caleb,
Great tutorial, very helpful. I have run into a problem though when trying to upload a theme through the admin interface. I get a message saying ‘The uploaded file could not be moved to /var/www/html/wp-content/uploads/2011/10.’ It is just a regular zip file.
I’ve used it before on my other WP install. I’ve tried changing the owner of the uploads folder and the themes folder. I’ve tried to delete those folders and have them be recreated automatically, as well as recreated manually.
I know a new Amazon AMI just came out this week, any chance that has caused something to change (can’t think of what though.) Any feedback would be very helpful.
Thanks,
Marc
Hi Marc, Have you tried altering the permissions for the 10 file, not just the 2011? Try setting your 10 to 777.
I’ve had similar issues, and I believe that was the fix was getting the correct config on permissions, which, if I remember, was 777 on the month folder.
Thanks for the quick reply – unfortunately still no luck. I did chmod -R 777 2011 and 10, the restarted. Same result.
I am new to WP (and linux, aws etc.) but does it seem odd that it is trying to move the zip of the theme to the uploads folder and not the themes folder?
One the first installation I uploaded the file manually and unzipped it to the themes folder. It worked (more or less), but when I imported my images from my original WP site (export -> import) I could no longer change the sizes. Not sure if that is a sign that there is an issue with the permissions or what.
Hmm… other than that, I log in as root. The folders both show apache|apache as Owner|Group. Any other ideas? I mainly want to get this set up so I can do your next tutorial and host my few small websites on AWS on the same server rather than 1 server for each.
I googled this stuff, and only things I found other than the chmod was checking PHP to make sure it wasn’t in safemode, which it isn’t.
Thanks again for the quick reply… any idea’s are worth a shot.
Cheers,
Marc
Pingback: NodeJS, Websockets and EC2 | Mike Newell
Very well written article. Started with http://www.2bit-coder.com/2010/09/wordpress-in-the-cloud-amazon-ec2/ and followed through to here when I saw that you’d done this on a Mac.
Thanks for doing the hard work for me!
Hi, brillant tutorial.. reached till the end and logged on to http://MY_IP_ADDRESS/phpmyadmin/ – entered the username as ‘root’ and the password.
On the next screen i get the following error:
‘#2002 Cannot log in to the MySQL server’
and at the bottom it shows:
‘Cannot load mcrypt extension. Please check your PHP configuration.’
I’m completely new to Linus and php so followed the instructions word by word…Please
Hi Amit, I accounted for this exception in the article, did you see this portion?
Try that out, and it should fix your issue. Good Luck!
Yeh, I did try this step out… and not only I tried after few seconds but also an hour later… same result… so not sure what have I missed…
also what is the error regarding mycrypt extension?
Thanks
Amit
Hi Amit, it happens when you don’t have the libraries installed correctly. See above for instructions on how to do it.
Pingback: Andrew Johnson's Weblog : Moved
Easier way “Connecting as the Root User”…
after login with ec2-user type:
sudo sh
then type:
passwd:
set root password
retype root password
then
vi /etc/ssh/sshd_config
Uncomment PermitRootLogin yes
then change
PasswordAuthentication yes
to
PasswordAuthentication yes
done!
Easier way “Connecting as the Root User”…
after login with ec2-user type:
sudo sh
then type:
passwd
it will prompt you to set “root”
set root password
retype root password
then
vi /etc/ssh/sshd_config
Uncomment PermitRootLogin yes
then change
PasswordAuthentication no
to
PasswordAuthentication yes
done!
This is very fascinating, You are a very skilled blogger. I’ve joined your feed and stay up for looking for more of your magnificent post. Additionally, I have shared your site in my social networks
Caleb, you are a genius! I was looking for a simple intro to EC2 for a new guy we hired at our company. I had him go through this and your virtual hosts tutorial and he instantly got the concept with EC2. Thank you so so much for saving me hours explaining this to him!! :)
@Hayden thanks for sharing!
@cloudhost.vn Grand!
@Marcus That’s awesome! Glad it’s easy to follow :-)
I’m really inspired with your writing abilities and also with the format to your weblog. Is this a paid subject matter or did you modify it your self? Either way keep up the excellent high quality writing, it is uncommon to peer a great blog like this one these days..
Thanks for the comprehensive guide. Did you check out BitNami? It’s basically a one click installation for all sorts of services over EC2, WordPress included. I couldn’t use it because some of my websites require non-english WordPress installations but otherwise it looks pretty sweet.
Great post! One thing however: following your instructions step by step the config.inc.php file never gets copied back out of the config folder – so any modifications made on http://YOUR_SERVER_IP/phpmyadmin/setup/index.php will get lost.
If you copy that file to the phpmyadmin folder after configuring you won’t have to set the blowfish secret anymore – it happens automatically as part of the setup configuration.
This is a excellent tutorial! Easy to follow and understand. Every step is clear and perfect, without being wordy or trite.
I had one problem that I am trying to work out. After going through your tutorial, I stopped my EC2 and went to bed. When I restarted the server the next morning and tried to log in with Putty, I received an error message back from the server: “server refused our key.” This is the same key I used the night before for both the ec2-user and root.
There seem to a lot of people that get that error message, but apparently for different reasons, so I was unable to find anything that seem to fit my circumstance.
Was I supposed to go back and restore the root config files, or did I miss a step that was supposed to prevent this after a reboot?
Pingback: Cómo lo hemos hecho | mbmb
I have seen millions of tutorials on different website and this was the only one which is so detailed and easy to use. Keep up the good work. You are clearly a talented designer and a great writer/teacher.
Good job!
Pez
Hello!
Nice tutorial, thanks!!
I’ve done all the stuff but when I try to acces to http://XX.XX.XX.XX/phpmyadmin/ or http://XX.XX.XX.XX/phpmyadmin/index.php or http://XX.XX.XX.XX/phpmyadmin/setup/index.php I get the following error:
Forbidden
You don’t have permission to access /phpmyadmin/index.php on this server.
Any idea?
Thanks!!
Hi Oriol, Make sure your folder has the correct permissions to be able to access from there.
Man, this is the tutorial I have been searching for!! You have written this superbly – can’t wait to get my hands dirty! Thanks Caleb.
Caleb, can you tell us how to connect via Transmit? I followed the guide you have listed above, to no avail. Transmit gives me the user/pass error all the time. My .pem key works in ssh, so I can’t see what the issue is…
Thanks!
Pingback: Setting phpmyadmin on Amazon EC2 | hothero's TechNote
Pingback: Hosting your blog yourself using Amazon EC2 – Michael Ishmael
Pingback: 第二頁 | T1
Awesome article. I’m curious though. Is there a reason why you chose to go 32-bit instead of 64-bit? Can you still follow your guide if you just swap in the 64-bit versions of everything and use the 64-bit AMIs instead?
I’m about to follow your guide to migrate my wordpress site to EC2 and was just wondering why you didn’t go 64-bit.
Thanks,
Dan
Hi Dan, There’s no convention, steps will work with 64-bit (and is a better choice for most people), I believe when I made this article 32-bit was cheaper, although I’m not aware of the prices as of now.
This guide rocks! After searching for hours I found a ton of guides on how to setup a LAMP stack on EC2 but most of them were out of date or looked incredibly complex.
It took me about 30 minutes to get the 64-bit instance up and running with wordpress installed by following this guide. Amazing.
You literally saved me $24/mo. that I was ready to pay for an automated cloud management solution.
Thank you!