20061215

From Wsms

Jump to: navigation, search

previous next
GO TO:
Linux Class Notes
Apache Modules, securing dirs, Review Subjects to date



Friday Dec 15 2006

Contents

httpd is not running on rop.ncc.sdccd.net

If you point a browser to http://rop.ncc.sdccd.net/~public_html, you see that the server doesn't repond.

Then ssh to the server and try pstree -pu | grep httpd and you see that there are no httpd instances running. You can also do netstat -pant and see that no process is listening on port 80. So the server itself is running, but the httpd service is not.

Let's see if httpd was set up to start at boot time.

[georgeg@rop ~]$ more /etc/inittab
... 
# Default runlevel. The runlevels used by RHS are:
#   0 - halt (Do NOT set initdefault to this)
#   1 - Single user mode
#   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
#   3 - Full multiuser mode
#   4 - unused
#   5 - X11
#   6 - reboot (Do NOT set initdefault to this)
# 
id:3:initdefault:
...

So the server boots runlevel 3. Let's see if httpd is supposed to start at run level 3:

[georgeg@rop ~]$ /sbin/chkconfig --list httpd
httpd           0:off   1:off   2:off   3:off   4:off   5:on    6:off

Nope. The problem is that we shut down the server to back it up. When we rebooted the machine, httpd did not restart.


synchronize vmware's clock

The official way to synchronize the clock on the virtual machine is to use vmware-tools. You can also use ntpdate in some sort of script. ntpd usually doesn't work because the clock drits too fast.

If your machine uses CPU Frequency Scaling, you should disable it with:

[root@arthur ~]# cpufreq-selector -g performance

vmware tools

You install vmware tools through the VMware server gui. The you have to build the kernel modules for the tools inside your virtual machine, which requires the kernel-devel package.

ntpd

The clock on the server which is running FC5 under VMWare on XP is always getting behind. I fixed this on my test system by running ntpd with the correct options. Open port 123 on your firewall for both TCP and UDP. Make a backup copy of /etc/sysconfig/ntpd.conf. Then change ntpd.conf to:

# GGG 20061215
OPTIONS="-g -p /var/run/ntpd.pid -l /var/log/ntpd.log"

# Set to 'yes' to sync hw clock after successful ntpdate
SYNC_HWCLOCK=yes

The -g option is important. It tell ntpd to sync the clock even if it is way off. Restart ntpd with:

[root@ws05 ~]# service ntpd restart

Then you should have a look at /var/log/messages and /var/log/ntpd.log to make sure it is actually working. I'm not sure if it is really necessary to SYNC_HWCLOCK, open port 123 or run as root. If I have time, I'll experiment a bit more.

Noooo! The above didn't work. For my VM under VMWare, I resorted to a crontab for root:

*/1 * * * * /usr/sbin/ntpdate pool.ntp.org >> /var/log/ntpdate.log 2>&1

You have to turn off ntpd for this to work. The output in /var/log/ntpdate.log looks like:

15 Dec 11:43:23 ntpdate[4998]: step time server 198.60.22.240 offset 19.629783 sec
15 Dec 11:44:30 ntpdate[5004]: step time server 198.60.22.240 offset 24.880692 sec
15 Dec 11:45:19 ntpdate[5012]: step time server 198.60.22.240 offset 15.513425 sec
...

proxy

There is a lot of confusion regarding the proxy server, the browser's cache, and the test site we set up the other day. You have to play around with your browser's proxy settings until it works. You also have to remember to set the address in the lmhosts file.

Connections Internet Options LAN Setting Do not use proxy server for address beginning with: *.abc.com ; *.xyz.com

NEXT YEAR'S TASKS

Certificate authority

SSL with Apache and IIS

Install another virtual machine with windows 2000 server release 2

Personal tools