System Administration
Showing results for 
Search instead for 
Did you mean: 

Issue in installing httpd package using yum....

Occasional Advisor

Issue in installing httpd package using yum....

I have RHEL5 and i have configured yum for package management.So i want to install httpd with all it's dependencies. So when i executes yum install httpd* , it says this package is not available to install..
I can install other packages. Can somebody help in this?
Honored Contributor

Re: Issue in installing httpd package using yum....

Did you have a file or directory named like "httpd*" in your current working directory when you entered that command?

Because you did not quote nor escape your wildcard, the shell will attempt to expand it as a file/directory name before executing the command. If there are matching files, the wildcard expression on the command line will be replaced with the list of matching filenames just before the command begins executing. If no matches are found, yum will receive the wildcard expression as-is.

In cases like this, you don't want the shell to touch your wildcards, so you must do one of two things:

1.) quote the wildcard expression with single or double quotes:

yum install "httpd*"
yum install 'httpd*'

The main difference between the two forms is that variable expansions (e.g. $VARIABLE) will work inside double quotes, but not within single quotes.

2.) or use the backslash to escape the asterisk, so the shell will know you'll want to pass a literal asterisk as an argument to yum:

yum install httpd\*

Actually, you don't even need the asterisk at all: when you install a package with yum, yum will always check the dependencies and will automatically install them too if they aren't already installed.

But if you want to install all the same things as when choosing the "Web Server" installation option in the RHEL5 OS installer (including httpd* and some related tools), you can use the "yum groupinstall" command:

yum groupinstall "Web Server"

You can view the available groups with "yum grouplist".

Wilfred Chau_1
Respected Contributor

Re: Issue in installing httpd package using yum....

yum install httpd
should be suffice.

yum will figure out all dependencies and ask you to confirm if you want to install them.