Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

May 2, 2008

Configure network in CentOS5

$ vi /etc/sysconfig/network-scripts/ifcfg-eth0

for Static


DEVICE=eth0

ONBOOT=yes
HWADDR=00:0c:29:c3:90:85
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes
IPADDR=172.16.1.3
NETMASK=255.255.0.0
GATEWAY=172.16.10.1

for dhcp

DEVICE=eth0
ONBOOT=yes
HWADDR=00:0c:29:c3:90:85
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes
BOOTPROTO=dhcp

Mar 5, 2008

ldd command - shared libraries

ldd command: prints the shared libraries required by each program or shared library specified on the command line.

Oct 12, 2007

Proxy

Download proxy from
http://sourceforge.net/projects/proxy/
Installation
$ tar xzvf proxy.tar.gz
$ cd proxy
$ make
$ ./proxy -s 8080 -S 192.168.1.39 -d 80 -D nhungnguoibantot.net

Oct 9, 2007

Delete Linux User

Using to find user's files
Firstly
$ find / -user username
Manually delete or
$ find / -user username > log.txt
$ rm -rf `cat log.txt`
Finally
$ userdel username

Jul 17, 2007

netstat command

netstat -anp | grep 60000
Answer for question: Have any program run on port 60000

Jul 7, 2007

Switching from GDM to KDM

Check for GDM and KDE available
# kde-menu --version
# gdm --version
Run KDE
# startkde --replace
Run GDM
# gdm start
in /etc/sysconfig/desktop append
DISPLAYMANAGER="KDE"