Elvis Woo

To whom be glory forever and ever. Amen.

Skip to: Content | Sidebar | Footer



Month: December, 2007

NTP (Network Time Protocol) Server on CentOS 5

29 December, 2007 (15:28) | Linux

step 1
#yum install ntp
or download ntp rpmpkg
step 2
# crontab -e
*/15 * * * * ntpdate 210.72.145.44
step 3
# vi /etc/ntp.conf
(add or replace the text as follows)
server 210.72.145.44 prefer
(set the default source is from "TIME OF THE NET SERVER IN CHINA")
server 218.21.130.42
(an other source server)
restrict 0.0.0.0 mask 0.0.0.0 nomodify
(allow all client)
step [...]

How to turn Hibernate on or off in Windows Vista

18 December, 2007 (17:24) | Windows

If you don’t need your computer to Hibernate or want to turn it back on again

Open the Start Menu
Right click Command Prompt
Select Run as administrator
To turn Hibernation off - powercfg -hibernate off
To turn Hibernation on - powercfg -hibernate on
If you turn it off, it won’t even show on the Start Menu

**************************************************

Change the Caption for the My Computer Icon

16 December, 2007 (05:15) | Group Policy

VBScript:
Const MY_COMPUTER = &H11&
Set objNetwork = CreateObject("Wscript.Network")
objComputerName = objNetwork.ComputerName
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(MY_COMPUTER)
Set objFolderItem = objFolder.Self
objFolderItem.Name = objComputerName
save as a .vbs file
**************************************************

Map a Network Drive

16 December, 2007 (05:10) | Group Policy

 VBScript:
‘ NameDrive.vbs
‘ VBScript to map a network drive.
‘ Authors Guy Thomas and Barry Maybury
‘ Version 1.3 - January 23rd 2005
‘ —————————————-’

Option Explicit
Dim objNetwork, strDrive, objShell, objUNC
Dim strRemotePath, strDriveLetter, strNewName

strDriveLetter = "z:"
strRemotePath = "\\server\share"
strNewName = "name"
‘ Section to map the network drive
Set objNetwork = CreateObject("WScript.Network")
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath
‘ Section which actually [...]

The simplest configuration of Squid

3 December, 2007 (16:28) | Linux

 #vi /etc/squid/suqid.conf
 #squid.conf - a very basic config file for squid 
 http_port 3128
 visible_hostname (IP address or hostname)
 debug_options ALL,1 
 acl all src 0.0.0.0/0.0.0.0
 #define RAM used
 cache_mem 32M
 #defines the cache size
 cache_dir /usr/local/squid/cache 100 16 256
 #allow all sites to use connect to us via HTTP
 http_access allow all
 #allow all sites to use us as a sibling [...]

Broadcom 5700 Gigabit Ethernet on RedHat EL5

3 December, 2007 (13:14) | Linux

1. Get insatll rpmpkg
download src from
   http://www.broadcom.com/support/ethernet_nic/netlink.php

upzip linux-3.81c.zip then upload tg3-3.81c-1.src.rpm to RedHat.
Install tg3-3.81c-1.src.rpm
      #rpm -ihv tg3-3.81c-1.src.rpm
2.Build rpmpkg
     #cd /usr/src/redhat/
     #rpmbuild -bb SPECS/tg3.spec
(you must installed rpm-build-4.4.2-37.el5 at first.)
Then you will find tg3-3.81c-1.i386.rpm in /usr/src/redhat/RPMS/i386
3.Install Driver
       #rpm -ihv tg3-3.81c-1.i386.rpm
The driver will be installed in the following path:
2.4.x kernels:
    /lib/modules/<kernel_version>/kernel/drivers/net/tg3.o
2.6.x kernels:
    /lib/modules/<kernel_version>/kernel/drivers/net/tg3.ko
Load the driver:
   insmod tg3.o
or
   [...]

Keep Numlock Enabled on Boot

3 December, 2007 (11:35) | Windows

Start/Run/Regedit
[HKEY_USERS\.DEFAULT\Control Panel\Keyboard]
"InitialKeyboardIndicators"="2"

**************************************************

Command Prompt - Change the command prompt to C:

3 December, 2007 (11:25) | Windows

Start/Run/Regedit
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun. In the right pane, double click Autorun and type in: cd /d c:\\ as the value data.

**************************************************

How to install Bugzilla 3.1.2 on RHEL5/ContOS5.

2 December, 2007 (21:17) | Application System, Linux

1. Install OS (RHEL 5/ContOS 5) with Apache, MySQL, Development Tools. Sendmail or Postfix is recommended.
2. Download Bugzilla from http://www.bugzilla.org/download/

3.Uncompression bugzilla-3.1.2.tar.gz.

4.Enter the root dircetory of the bugzilla, run ‘./checksetup.pl’ .
(To Be Continued……)
**************************************************

The port-mac binding command on Catalyst 3550 Switches.

2 December, 2007 (19:56) | Network

switchport mode access
switchport port-security
switchport port-security violation shutdown
switchport port-security mac-address sticky
switchport port-security aging static
switchport port-security mac-address sticky XXXX.XXXX.XXXX
**************************************************