Friday, July 13, 2007

Linux check memory usage

$ free -t -m
$ vmstat
$ vmstat

Squid proxy How to filter or block a particular port


First open /etc/squid/squid.conf file
# vi /etc/squid/squid.conf
Locate your ACL section and add configuration directive as follows:
acl block_port port 1234
http_access deny block_port
http_access allow all

If you just want to skip a particular IP (192.168.1.5) try as follows:
acl block_port port 1234
acl no_block_port_ip src 192.168.1.5
http_access deny block_port !no_block_port_ip
http_access allow all

Close and save the file.

Restart squid proxy server:
# /etc/init.d/squid restart
##########################################################################################

PROXY & YUM

  1. open the .bashrc file
Add this line to bashrc file
vi .bashrc
export http_proxy=http://proxy.server.ip:port(3128)
ZZ
export http_proxy
yum update
yum search vlc


Friday, July 6, 2007

TAR-TIPS

tar -xvf file.tarunzip tar file
tar -t file.tarlist contents of tar file
tar -xvfz file.tar.gzunzip tar.gz file
tar -xvfj file.tar.bz2unzip tar.bz2 file
gunzip file.gzunzip gzip file
unzip file.zipunzip zip file
bunzip2 file.bz2unzip bzip2 fil

Thursday, July 5, 2007

postmaster

$ postmaster -D /usr/pg_data
To start the postmaster in the background, use the usual shell syntax:
$ postmaster -D /usr/pg_data >logfile 2>&1 &
This shell syntax can get tedious quickly. Therefore the shell
script wrapper pg_ctl is provided to simplify some tasks.
For example:
$ pg_ctl start -l logfile