Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how do I restart apache from telnet session?


Guest

Recommended Posts

Posted

sorry to ask a stupid question, but I am a iis man by hart and so far I have just been using the service config in kde

 

I am at home now and the server is in my office, so I have not had to do this yet.

 

i looked at the man page but did not quite understand it, tried this:

 

kill -TERM `cat /usr/local/apache/logs/httpd.pid

 

and it just gave a > and set there

 

I dont think this is the actual location of the file or something

I tried a find httpd.pid and it said no such file or directory.

 

Thanks

Kirk

Posted

I am slaping myself in the head, I just realized that the example given at apache.org was meant to have the httpd.pid modified to my httpd pid number. I have been at this to long . so How do I find the pid number?

Posted

or, depending on which OS youare running you could try

 

apachectl restart

 

here are others:

apachectl stop

apachectl start

apachectl startssl (starts apache with SSL on my OpenBSD box)

Unexpect the Expected

Posted

Ok cool,,, I ran the grep httpd and it came back with about 10 lines and I am assuming that the first number is the pid like 2301. everything else looks identicall so how do I know which proccess is the parent ? I would assume to restart httpd I would need the parent pid.

 

Thanks,

 

apachectl does not work, I am running redhat 7.3

Posted

Ok got it,

 

Thanks Guys,

It is amazing how much you realize you don't know when you need help, kinda makes me not as cocky

 

kill -HUP 2640

Posted

apachectl should work fine:

 

/usr/local/apache/bin/apachectl graceful

 

for a quick reboot:

 

shutdown -r now

Posted

ok I am starting to get the hang of this, For future refrence to other linux newbies telnet will not run all comands through the default dir.

in other words I could not just type shutdown now -r from root like I would if I were actually on the server. from a telnet I would have to type

/sbin/shutdown now -r

 

which is tellint me that apachectl will probably work if I can figure out what freakin directory it is in. I can find a apache dir anywere

Posted

at your telnet window, su to root, then issue the updatedb command. You have to be looged in as root to issue the command initially.

 

You should now be able to find anything you want, using the locate command.

 

example:

locate apachectl

 

will return all occurances of the name apachectl on the drive

 

this is a little easier to use than the find command, but you will have to run the updatedb occasionally, or schedule it as a cron job.

Unexpect the Expected

Posted
ok I am starting to get the hang of this, For future refrence to other linux newbies telnet will not run all comands through the default dir.

in other words I could not just type shutdown now -r from root like I would if I were actually on the server. from a telnet I would have to type  

/sbin/shutdown now -r

 

which is tellint me that apachectl will probably work if I can figure out what freakin directory it is in. I can find a apache dir anywere

 

Another thought would be to enable SSH Server on your Redhat box. This will give you a secure shell to the system. That is how I do all my work on the server when I am at work :lol:

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...