LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-11-2004, 04:32 AM   #1
skyblue
LQ Newbie
 
Registered: Aug 2004
Location: malaysia
Posts: 4

Rep: Reputation: 0
how to know the apache version


hi,

i got one linux red hat server, inside already got apache but i want to know what is the version of apache, what is the command??
 
Old 08-11-2004, 04:49 AM   #2
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 49
From a terminal window, type httpd -v
 
Old 08-11-2004, 04:58 AM   #3
allan_y
Member
 
Registered: May 2004
Location: Canberra
Distribution: Redhat 9
Posts: 32

Rep: Reputation: 15
or you can try shell:rpm -qa | grep apache
 
Old 08-11-2004, 05:08 AM   #4
skyblue
LQ Newbie
 
Registered: Aug 2004
Location: malaysia
Posts: 4

Original Poster
Rep: Reputation: 0
if i using putty to connect to my server. what is the command to use to know the apache version
 
Old 08-11-2004, 05:13 AM   #5
allan_y
Member
 
Registered: May 2004
Location: Canberra
Distribution: Redhat 9
Posts: 32

Rep: Reputation: 15
$:rpm -qa | grep apache

did that not work?
 
Old 08-11-2004, 05:27 AM   #6
skyblue
LQ Newbie
 
Registered: Aug 2004
Location: malaysia
Posts: 4

Original Poster
Rep: Reputation: 0
nope not working
 
Old 08-11-2004, 05:56 AM   #7
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 49
From the PuTTY Terminal,

You can

rpm -qa|grep httpd

OR

httpd -v
 
Old 08-11-2004, 08:12 AM   #8
jaganpjames
LQ Newbie
 
Registered: Aug 2004
Location: Hyderabad
Distribution: RH, fedora
Posts: 19

Rep: Reputation: 0
#rpm -q httpd

or

#rpm -qa | grep httpd

or

#httpd -v
 
Old 08-11-2004, 09:17 PM   #9
skyblue
LQ Newbie
 
Registered: Aug 2004
Location: malaysia
Posts: 4

Original Poster
Rep: Reputation: 0
if i type rpm -qa|grep httpd
the result is nothing happen, the putty prown again

if i type rpm -q httpd
the message is package httpd is not installed

if i type httpd -v
the message is bash: httpd: command not found
 
Old 09-03-2004, 07:56 PM   #10
leobag
LQ Newbie
 
Registered: Aug 2004
Posts: 3

Rep: Reputation: 0
I don't know if you still need help, but did you try:

/usr/sbin/httpd -v

- Leo
 
Old 05-24-2005, 01:14 PM   #11
acercatealaluz
LQ Newbie
 
Registered: May 2005
Posts: 6

Rep: Reputation: 0
Hi

I have the same problem...

None of this ways to know the apache versions seems to work using putty in my site...

any new options...?

thanks in advance

AZ
 
Old 05-24-2005, 01:33 PM   #12
leobag
LQ Newbie
 
Registered: Aug 2004
Posts: 3

Rep: Reputation: 0
What version of Linux are you using?

What is the output of the command:

# which httpd
 
Old 05-25-2005, 05:49 AM   #13
acercatealaluz
LQ Newbie
 
Registered: May 2005
Posts: 6

Rep: Reputation: 0
This is what i obtain when i make a "which httpd"

/usr/bin/which: no httpd in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin :/usr/bin:/usr/X11R6/bin:/usr/java/jdk1.3.1_07/bin:/root/bin)


I don't know exactly which version of linux i'm runing (could you tell me the command to check it?), but i think is a Red Hat.


I start the server using:

/etc/init.d/service httpd start

becouse i can't call directly the httpd without using "service" first. I suppose this is normal... but if i do this way the only options it gives me is start, stop, restart and so... no "-v" option available

I'm a bit lost in this point. All help will be wellcomed!

Thanks

AZ
 
Old 05-25-2005, 06:11 AM   #14
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,602

Rep: Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532Reputation: 1532
Run
Code:
locate httpd
This will show you the path to the httpd executable. Then chnge to that directory and run:
Code:
./httpd -v
If locate does not work you can use:
Code:
find / -name httpd
but it takes more time.

Regards
 
Old 05-25-2005, 06:42 AM   #15
acercatealaluz
LQ Newbie
 
Registered: May 2005
Posts: 6

Rep: Reputation: 0
Great!!! It Works!

Thanks a lot, bathory!


Now i have a little question dued to this...

I have found that i have 2 httpd files in my system:

./etc/rc.d/init.d/httpd
./usr/local/apache/bin/httpd


If i do the "./httpd -v" command with the one in "usr/local/apache/bin/", it gives me the version of apache

(1.3.33)

But if i try to make the same with the one in "/etc/rc.d/init.d/", it gives me the folloeing message:

"Utilisation : httpd {start|stop|restart|reload|condrestart|status}"

It seems as if they were different kind of files (sorry if i'm saying stupid things, but i am really newwee)


I have read in some places that the way of start Apache is as a daemon, using "service httpd start", and i can do that with my httpd in "/etc/rc.d/init.d/" but not with the other.

With the one in ""usr/local/apache/bin/", it is supposed i can do something like "./apachectl start"


Which is supossed i should do, and which are the diferences between this files that has the same name?


Thanks a lot

AZ
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
which version of apache should i use? seow_ming Linux - Networking 3 09-12-2005 08:47 AM
how to know apache version? varala_kanth Linux - Newbie 1 06-14-2004 01:03 AM
preinstalled version of apache ilhbutshm Slackware 1 05-23-2004 06:19 PM
Apache Version red118a Linux - General 1 02-02-2004 01:14 PM
How do I Install the new version of Apache? TransAmJugo Linux - Newbie 5 08-13-2003 05:11 PM


All times are GMT -5. The time now is 09:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration