In this exercise we will show the steps to setting up a AWS EC2 server, connect over ssh and install all the tools and config WordPress. I have attached a video to each step and it might make more sense to read the steps, watch the video and then try them yourself. If you are using windows you will need to follow this post to connec to to AWS.
1. First we will need to log into the AWS console and launch a server. Please log in and launch a server with the following-
a. AMI ID = Ami-84db39ed
b. Instance Type = micro
c. Tag = wp
d. Keypair = wptest
e. Security group ports 22 and 80 from 0.0.0.0/0
2. Connecting to the server we will use terminal. In order to do this we will need to use the PEM we downloaded in step one. We also need to change the permissions of the PEM file with the chmod command. First open terminal and change directories to the location of the PEM we downloaded, mine is in the downloads folder
cd Downloads
Next we need to chmod 400 the PEM file.
chmod 400 wptest.pem
Then last we need to connect to the server
ssh –i wptest.pem root@ec2-12-34-55-23.amazon.com
3. Now we need to install apache, MySQL and some PHP modules. To do this we will use the YUM package manager. The command we will typ in is the following-
Yum install httpd mysql-server phpmyadmin –y
4. More configuration is needed to get WordPress up and running. Now we will download wordpress with the tool wget-
wget http://wordpress.org/latest.zip
Next we need to start MySQL
/etc/init.d/mysqld start
Now we need to run the mysql secure installation
/usr/bin/mysql_secure_installation
Next start apache
/etc/init.d/httpd start
Now we need to modify the configuration file for phpmyadmin.
We open the file with the VI command line editor-
vi /etc/httpd/conf.d/phpMyAdmin.conf
We need to modify the allow from line. In the example we will remove 127.0.0.1 and replace with all, normally you would only allow this from your public IP address using whatismyip.com. After your make this change you need to restart the apache server with the following command –
/etc/init.d/httpd restart
5. Now you need to get wordpress zip file that you downladed and get that in the web directory /var/www/html/. To do this we will use the move command –
mv latest.zip /var/www/html
Now we need to navigate to the lateset.zip
cd /var/www/html
ls -la
Now we need to unzip the file-
Unzip latest.zip
Now move to the uzipped directory
cd wordpress
Now move all the files in the WordPress directory back to /var/www/html
mv * ..
6. Now we will connect to phpMyAdmin to create a DB and a DB user.
First connect to the new EC2 on port 80 and validate that apache is working you should see the apache test page. Second you need to go to phpMyAdmin and enter in the user = root and the password you set up during the mysql secure installation. Third you need to create a WordPress user and a WordPress database.
7. Now we are on to the final step! First you will need to connect to the EC2 server on port 80 to finish the wordpress installation. You will need to use the same user and pass we set up in phpMyAdmin in the WordPress install screen. Next we need to create the wp-config.php using the vi command, all the info we need to use is created for us so we just need to copy and paste the info in to the config file.
vi /var/www/html/wp-config.php
Next click the run install button. Now we are ready to log in to the WordPress admin and start blogging!
Remember you MUST shut down the servers when you are done or you will pay for them!!
Theres a few rules that I've learned while working with Salesforce/Azure/Amazon Web Service/Google App Engine that everyone should follow:
Nearly all of my recommendations are the the same as if you were designing a C application for a router. Be safe, be secure, and watch the expenditure of money and resources. Keep these things in mind and you will have a great experience in the Cloud.

Amazon’s Web Services have been getting better and better, but typically by incremental amounts. Up until now, it’s been a slow trickle of improvements to a solid suite of offerings. Cheap storage, cheap computing power, cheap access to PCI compliance, etc.
This new offering however, may truly be a game-changer for their web services division. Amazon’s Virtual Private Cloud lets companies create their own isolated set of EC2 instances and connect them to their own existing IT infrastructure through a VPN connection.
What does all that mumbo-jumbo mean to the business management people? Simple. Now you can augment your IT’s infrastructure without huge capital expenditures. EC2 already runs Windows Server 2008, SQL Server, Oracle Database 11g, IBM DB2, IBM Websphere and many more.
Amazon’s immensely powerful infrastructure is available as a service at prices that will make you wonder if you should bother with your own hardware anymore.

Today Amazon made a couple of interesting announcements. First off they have opened a new region (Northern California) with multiple availability zones (analogous to data centers, but each on separate flood plains and electrical grids). This further increases their computing capacity and also puts data closer to all of the start-up’s in the Bay area that rely on Amazon. The also have a US-East region, EU region and will have regions in Asia in 2010.
The key announcement however centers around some changes and enhancements to EC2 (their virtualized computing layer). One of the main criticisms and design challenges with EC2 has been around the fact that when you shut down a server, the state of that server is lost (unlike VMWare). There were ways around it (such as storing all data on EBS (analogous to a mounted drive on your virtual instance), but it did present some challenges. Today they announced the availability to save server state with a new Stop command, which unlike Terminate, saves the state of that running server.
This feature is enabled because you can also now boot from EBS, instead of S3. This leads to a faster boot time, and also makes it easier to tune your kernel or make other changes to an image. Upon boot you can also mount multiple EBS volumes which can lead to some very robust configurations.
Another challenge of EC2 was creating an image (AMI) of a server once you had it set up. This was fairly easy for a windows instance (using the Bundle process) but was more difficult for a Linux instance. Now you can use the CreateImage command to create a new AMI and register it in one easy step. See all the details here.
These are great enhancements to EC2 and are a welcome addition to the AWS offering.
We have had a lot of great interest in Cloud Loader, so the next question is "How do I start using it?" Well, here is a simple 5 Step guide to get going with Cloud Loader to start doing integration for $0.10 an hour (or less with a reserved instance).
Step 2 – Sign into the EC2 Management Console
The Console is where you can go to create and manage your EC2 Instances. Remember these are virtual servers and the console allows you to give them a static IP (Elastic IP), control the Security Group and stop and start your instances. First off you need to create a new instance of the Cloud Loader AMI.
Step 3 – Create a Cloud Loader Instance
Click on Instances→ Launch Instance→ Community AMIs and search on “Cloud_Loader” to find the Cloud Loader AMI. Click the Select button.

After clicking Select you need to specify some specifics about your instance. You will only need one instance and it can be a “Small” instance which will be fine to run the Cloud Loader.

Next click on “Create” next to the Key Pair Name option, enter a name for your key pair and download the key pair. This will be required to SSH into your Cloud Loader instance.

Next you need to pick a Security Group for the instance. You can use the default one or optionally specify other settings (which ports will be open). EC2 by default has all ports closed except 22 for SSH.
Last Click “Launch” to launch your instance. This will take 3-4 minutes to boot and fully launch.
Step 4 – Connect to your Instance
If you are using a PC you will need to use an SSH client such as PUTTy to log into your instance. Click here for Windows instructions.
If you are using a Mac you can use the native terminal to connect. Click here for detailed instructions on how to set up your certs and bash profile.
Step 5 – Configure your Instance
(Remember this is built on Apex Data Loader, so look here to learn more about it)
• After logging in go to the /usr/local/dataloader directory
• Create an FTP user on the Cloud Loader instance to use for the inbound FTP of data (the .csv file you want to load into Salesforce).
• Edit the config.properties file with your username and password for SFDC
Note: You will need to include your security token at the end of your password if you don’t whitelist the Amazon Elastic IP within Salesforce
• Edit the process-conf.xml file with the data loader processes you want to run
• Edit the automate-dl script to configure the email address you would like to use to send reports to.
• Setup a cron to run the automate-dl script (the way you schedule automated processes in UNIX)
Final Notes
Once you have tested this approach it is likely you will want to modify the script or approach to suit your own business need. With EC2 you can use Cloud Loader as a base AMI and then configure your own AMI based upon it with your own unique additions.
You may also like to utilize EBS (Elastic Block Storage) with Cloud Loader to have persistent storage of your configuration files, incoming integration files or log files. We plan to add this functionality in an upcoming release. If you have any further suggestions for Cloud Loader, please email us at: support@modelmetrics.com
So why do I need a server again to integrate with the cloud?
Historically one of the arguments against SaaS, or now “The Cloud” was that integration is difficult or expensive. Several great providers have emerged in this space to make integration with cloud platforms inexpensive and more recently, even cloud based. These approaches are great for many companies, but as you know one size doesn’t fit everyone and many companies don’t want to bring in another vendor.
Salesforce has made integration somewhat of a commodity with it’s constant improvements to the DataLoader application. Most of you are probably familiar with it, but if not, it is a Java based client side tool that allows you to load data into Salesforce. It can handle all of the basic CRUD operations you might expect. It now supports direct database access as well so you don’t have to rely on .csv flat files as you did previously.
The other great thing about DataLoader is that you can take the JAR file and run it in a scripted and automated fashion to get integration on the cheap. This approach works well to master customer data from an ERP system, or update nightly financials or orders. It can also pull data out of Salesforce to feed a Data Warehouse for example.
The only issue, you need a server to host this puppy on.
As you know the “clouds” are converging and Salesforce, Google and Amazon all play well together. So why not leverage the Amazon cloud to handle this type of integration? Good news, it works great on Amazon, and is freely available for you to use.
Cloud Loader is a free pre-packaged AMI (Amazon Machine Instance) that you can literally have up and running in a few minutes and have data flowing into or out of Salesforce in the cloud. It is based on Data Loader, but is fully automated and even has email notifications buit-in.
Cloud Loader does require that the data coming into Salesforce be available on a FTP server that is accessible from an Amazon EC2 Instance. All you need to do within Cloud Loader is add your mapping file as well as your Salesforce and FTP credentials and you are ready to roll.
If you want to give this a try, click here.
Follow Reid Carlberg on Twitter or contact him at rcarlberg@modelmetrics.com.
Dear IT Leadership,
Today, your business needs you more than ever. The economy is weakening. Competition is intense.. You’ve helped it navigate technologies for years. But the business has immensely complex new challenges today. It needs your help to operate more efficiently. It needs your help to innovate in new ways.
In short – they need you to lead – but they need you to lead differently.
They need you to lead them through radical change.
What do I mean?
Have the wisdom to divide the marketing hype and the FUD from the real story behind cloud computing and utility computing. Despite their catchy names, Larry Ellison’s protestations, and the high-energy sales effort you’ll run into, these are real, they’re here to stay and they make a substantial difference. Your competitors know how to exploit them. Your business needs to, too. This is your responsibility.
Have the courage to rely less on the technologies that have served you well so far. Oracle. Microsoft. SAP. As painful as it is to admit, they aren’t keeping up. And they won’t do anything interesting in this department until enough of you, their soon-to-be-former-customers, leave them. There’s every likelihood they won’t do it then. And some of your old-line competitors will ignore my plea and do the same: nothing. This is your opportunity.
Have the strength to pull your team through the keyhole of this new paradigm. They’ll feel threatened because their old skills aren’t as useful as they once were. They’ll be scared for their jobs. But they’re closest to the problem and the ones who can best help you take the next step. Change is hard. Not everyone will make it. But you’ll need those who can make the switch for the very real, high value add work of transforming your company. This is your challenge.
Have the generosity to share what you know about technological success with the newest drivers of technical innovation in your company – business owners. Cloud computing and utility computing both reduce or eliminate barriers to technology driven innovation, but they don’t eliminate the need for things like validation and requirements gathering. They help technology become more egalitarian, but neither cloud computing nor utility computing know your business. Think disintermediation. Think empowerment. Think coaching. This is your reinvention.
Have the energy to jump in with both feet. Have the patience to put up with some bumps in the road. Clouds are built on solid technology and maturing quickly, but they’re still relatively young. A blip here or there doesn’t mean the sky is falling. Moreover, your efforts to transform the technical backbone of your enterprise will span multiple generations of cloud and utility computing, including future significant transformation that no one even thinks is possible yet. This ongoing radical change – this is your chosen profession.
Take the next step.
Build your next web application on the Salesforce.com Force.com platform. Start with a free developer account. Do it in secret and only show someone when it’s done.
Move a server to Amazon Web Services’ Elastic Computing Cloud (EC2). Start with the very next small project that someone wants to do but you’re worried is going to cost too much. Publish the price difference to the rest of the business.
Do a cost comparison between what you’ve spent on Exchange and what your email would cost to run on Google Apps. Now do that same comparison adding together your total email spend with your total Microsoft Office licensing cost. Google Apps can replace some of it. Launch a pilot.
Do it on your own or with help. Do it because your business demands it. Do it because you’re scared your competition is out innovating you. Do it because you’re tired of worrying about backups and whether or a not a server is running. Do it to grow the value your business delivers without growing headcount.
Whatever the reason, do it. Do it today.
You can follow Reid Carlberg on Twitter or email him at rcarlberg@modelmetrics.com
We’ve used Amazon Web Services in my department, but I wasn’t very close to the project. So when I had a chance to take a deeper dive, I jumped at it. Here are some of the things I learned.
1. AWS Dropped prices on their SimpleDB service by 83% on December 1, 2008. Holy. Moly. Talk about a great illustration of the difference between storing stuff in the cloud and doing it yourself. And there’s a fair chance you’ll be able to use it for free.
2. One government agency was looking to do a proof of concept on a project. If they would have bought computers, they would have had to spend about $30,000. They couldn’t get approval so one of the people involved launched it on AWS’s EC2 service. Total cost? $5. You read that right. Five dollars.
3. Animoto, the coolest photo to video site on the web, scaled from about 40 servers to almost 5000 in three days. 40 to 5000. Wow! If they were handling their servers any other way, they wouldn’t have been able to do that.
4. All kinds of organizations are doing interesting things on AWS. From the New York Times to Harvard Medical School to …. you name ‘em, they’re probably doing something on it.
5. There are 490,000 AWS developers. That’s about the population of Cleveland. Imagine.
5.5. It’s easy to do complex tasks. Watch for a new open source contribution from me on this one soon.
First blog since Dreamforce… not good! The marketing guys are all over me. “You have to blog consistently.” Of course they’re right, but who has the time! Inauguration was yesterday, pretty amazing times. So now that Obama is in and the recession will be coming to an end, banks will become stabilized, the capital markets will bounce back, and general goodness will proliferate throughout the world, it’s time to blog and get ready for a great 2009. Maybe he’ll need a quarter or two…