Thursday, January 25, 2007

Simple Blog Using WebPY

http://www.k4ml.com/wiki/python/webpy/simpleblog

Tuesday, January 09, 2007

How to stop Apache in Red Hat 7.3

Be a root... Run ksh or bash or other sh, but not C-shell.
Before you install the new Apache, you have to know if you have some
other installation of Apache running. If you do, you need to decide
if you want to keep the old Apache running, or you stop it.
The problem is that Apache server by default listens to standard
Web TCP ports, and you cannot have some other Apache listen on the same
port(s). If Apache was installed before you will need either to disable
it, or choose other ports. If some Apache is running
(do: ps -ef | grep httpd) check which ports it is using by:

netstat -a | grep LISTEN

or

netstat -a -n | grep LISTEN

if you want to see all ports given as numbers, rather than services names.

If you get (among others):
tcp 0 0 *:www *:* LISTEN
tcp 0 0 *:https *:* LISTEN
(or, with netstat -n option:
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN )
The "well known ports" for HTTP and HTTPS are booked and some web
server is running.


2) If the old server is running check the files in /etc/init.d and
see if there is an httpd file (or similar) and stop apache as:

/etc/init.d/httpd stop

Sunday, January 07, 2007

First, open a terminal window and use su to switch to root. Then enter the command # netstat –tap > listening.services, followed by the command # less listening.services.

These commands will display a list of all services that are currently running with a State of LISTEN. Also listed are the PIDs of the services and the names of the programs that started the services.

In general, if you can’t identify a service that is listed, you probably don’t need it. If it is not obvious from the netstat output what a service is, use the ps, find, grep, or locate command to find more information about the program or its specific PID. Also check /etc/services for an unfamiliar service name or port number.

It seems that you can kill a PID by just saying "kill" followed by the PID number.