Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Trying to setup wordpress in EC2. found several tutorials in web and tried. their are few steps to setup apache, php, mysql. one thing is install httpd following command

yum install httpd

But I am failed to install getting following message

Setting up Install Process
No package httpd available. 
Nothing to do

how to do install httpd and running apache server

After running yum repolist enabled I got this result

repolist: 0
share|improve this question
1  
Can you run yum repolist enabled to show which repositories are enabled? Please update your question with the results. –  cjc Mar 17 '12 at 15:19
    
after running yum repolist enabled it shows repolist: 0 –  Prasanna Mar 17 '12 at 15:29
    
If you're this used to CentOS, why not use CentOS? Amazon even has their own CentOS-based "Amazon Linux" AMIs. –  ceejayoz Mar 17 '12 at 19:34

3 Answers 3

Your repos are either empty or inactive.

What's the contents of the directory /etc/yum.repos.d ?

Are you running Amazon Linux or some other Linux? Run cat /etc/issue.net.

Update:

OP is using Ubuntu, not a RHEL-based distro.

So, in that case, run the following:

sudo apt-get update
sudo apt-get install apache2

If you follow instructions from the web, look for Ubuntu-specific ones, rather than ones that pertain to RedHat-based systems.

Note that the Apache package for Ubuntu is called "apache2", not "httpd".

share|improve this answer
    
I am using Ubuntu 11.10. I cant find yum.repos.d in etc –  Prasanna Mar 17 '12 at 15:43
1  
Oh. You should not be using "yum". That's the RedHat/CentOS/AmazonLinux package management tool. You should be using "apt-get". Let me update my Answer with information on what to do. –  cjc Mar 17 '12 at 15:44
    
Thanks cjc. I tried apt-get here is result E: Package 'httpd' has no installation candidate –  Prasanna Mar 17 '12 at 15:46
1  
@Prasanna Correct, the package is named "apache2" in Ubuntu, not "httpd". See the last line of my updated Answer. –  cjc Mar 17 '12 at 15:50

It seems that the package "httpd" does not exist in your repository. Try searching via yum search, e.g. yum search apache or yum search http.

Another approach could be searching the internet for a CentOS/Suse/RHEL mirror and download the apache packages directly (or enhancing the list of your repos).

Btw, maybe this link will be an additional help: 1

share|improve this answer

Please check to make sure apache is not already installed.

httpd -v

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.