Wednesday, March 25, 2009

Amazon EC2 – Building Apache Web Server

In my previous post I explained how to do ssh and scp among EC2 instances, now I am going to discuss how to install Apache on EC2 (Fedora8). I know building Apache is not such a difficult work if you have setup the environment with all the essential libraries. However if it is not then it is some what difficult, in this post I am going to explain some of the challenges you may encounter if you try to build Apache on Fedora 8 (on EC2). You might imagine what is the difference between normal Fedora and Fedora for EC2, the main difference is EC2 runs on Xen hypervisor, so what you have is para-virtualization (you modify the OS to run on Xen).

First step is to install all the required libraries. So you need to install gcc and g++,
Installing gcc : yum install gcc
Installing xmms : yum install xmms
Installing g++ : yum install gcc-c++

In my case doing all those did not allow me to build the Apache, it was giving me an error saying “asm/page.h” does not found. Then I realize some of the OS related header files are missing in the OS image. To solve that I had to copy “/usr/include/asm” from a normal Fedora OS. After I did all those, boom Apache worked fine.

Just follow the same procedure if you want to setup your own dedicated servers.

No comments: