Search This Blog

Tuesday, April 30, 2013

How to draw cylinders using VMD


 set pos1 { 0 0 0 }
 set pos2 { 1 1 1 }
 set pos3 { 2 2 2 }
 set pos4 { 3 3 3 }

 draw material Opaque

 draw color yellow
 draw cylinder $pos1 $pos2 radius 0.3


 draw color red
 draw cylinder $pos2 $pos3 radius 0.3


Sunday, April 28, 2013

How to install lapack and scalapack on CentOS 6


 yum -y install compat-libgfortran-41.x86_64 gcc-gfortran.x86_64 libgfortran.x86_64
 yum -y install openmpi.x86_64 openmpi-devel.x86_64
 yum -y install lapack-devel.x86_64 lapack.x86_64
 yum -y groupinstall development
 rpm  -ivh  http://archive.linux.duke.edu/pub/epel//6/x86_64/epel-release-6-8.noarch.rpm
 yum  update
 yum repolist
 yum -y install scalapack-common.x86_64 scalapack-openmpi.x86_64 scalapack-openmpi-devel.x86_64 scalapack-openmpi-static.x86_64

Friday, April 19, 2013

How to list only number directories


find . -maxdepth 1 -type d | grep -v './[.]' | cut -c 3- | grep -v '[a-z]?*' | grep -v '[A-Z]?*' | sort | sed ':a;N;$!ba;s/\n/ /g'

Saturday, April 13, 2013

How to setup system Login banner and Login message

edit the "/etc/issue" and "/etc/motd" files

Wednesday, April 10, 2013

iptables setting


 # Basic setup
 iptables --flush
 iptables -P FORWARD DROP
 iptables -P OUTPUT ACCEPT
 iptables -P INPUT DROP
# Allow SSH
 iptables -A INPUT  -i eth0 -p tcp --dport 22  -j ACCEPT
 iptables -A OUTPUT -o eth0 -p tcp --sport 22  -j ACCEPT
# Allow local loopback
 iptables -A INPUT -i lo -j ACCEPT
 iptables -A OUTPUT -o lo -j ACCEPT
# Allow DNS
 iptables -A OUTPUT -p udp -o eth0 --dport 53 -j ACCEPT
 iptables -A INPUT  -p udp -i eth0 --sport 53 -j ACCEPT
# Allow ping
 iptables -A OUTPUT -p icmp --icmp-type echo-request -j ACCEPT
 iptables -A INPUT  -p icmp --icmp-type echo-reply -j ACCEPT
# Allow http
 iptables -A INPUT  -i eth0 -p tcp --sport 80 -m state --state ESTABLISHED -j ACCEPT
 iptables -A OUTPUT -o eth0 -p tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT
# Allow https
 iptables -A INPUT  -i eth0 -p tcp --sport 443 -m state --state ESTABLISHED -j ACCEPT
 iptables -A OUTPUT -o eth0 -p tcp --dport 443 -m state --state NEW,ESTABLISHED -j ACCEPT
# Printer (ipp=631, cups=515)
 iptables -A OUTPUT -p tcp -d 192.168.60.157  --dport 515 -j ACCEPT
 iptables -A INPUT  -p tcp -s 192.168.60.157  --sport 515 -j ACCEPT


Labels