Thursday, January 7, 2010

Running multiple commands

Sometimes as a system administrator, you will need to run multiple commands in sequence. One of the more classic example is ./configure followed by make and then make install. How do we do it?

Method 1 "./configure; make; make install"
  • The semi-colon causes the commands to be executed in sequence
  • If one of the intermediate commands fails, the subsequent commands after the failed command will still be executed and the error may be hidden in the output.
Method 2: "./configure && make && make all"
  • && represent if the ./configure and make and make all are true without error, the entire commands will run. If there is one error in either of the commands, the subsequent command will not run
Method 3: "./configure || ./setup"
  • || represent "or". If the first command fail to run, only then the 2nd command will run. It is useful for alert for example "./configure || echo "Configuration Error" "

Monday, January 4, 2010

error while loading shared libraries: libstdc++.so.5

If you are having error during installation of application such as Intel Compilers and the error "error while loading shared libraries: libstdc++.so.5", you need to install
# yum install compat-libstdc++-33

Sunday, January 3, 2010

Information on Setting up a hostname at DynDNS.com on Fedora

DynDNS.com allows you to obtain your own free domain name like name.dyndns.org, host your own weblog/blog at home, or access your computer remotely. A very useful tool if you need more control of your resources

A good information to start, use Dynamic DNS How-To and Using ddclient With DynDNS.com Services

To summarise,
Step 1: Copy the configuration file
cp ddclient /usr/sbin/
mkdir /etc/ddclient
cp sample-etc_ddclient.conf /etc/ddclient/ddclient.conf
vi /etc/ddclient/ddclient.conf
(Change the required information)

Step 2: Change the configuration file
# Basic configuration file for ddclient
#
# /etc/ddclient.conf

daemon=600
cache=/tmp/ddclient.cache
pid=/var/run/ddclient.pid
use=web, web=checkip.dyndns.com/, web-skip='IP Address'
login=your-username
password=your-password
protocol=dyndns2
server=members.dyndns.org
wildcard=YES
example.dyndns.org
custom=yes, example.com

Step 3: Configure the Start-up
## For those using Redhat style rc files and using daemon-mode:
cp sample-etc_rc.d_init.d_ddclient /etc/rc.d/init.d/ddclient
## enable automatic startup when booting
/sbin/chkconfig --add ddclient
## start the first time by hand
/etc/rc.d/init.d/ddclient start

Saturday, January 2, 2010

Installing and configuring Ganglia on CentOS 5.4



For a more detailed writeup on Installing and configuring Ganglia on CentOS 5.4, see this latest entry from my blog Installing and configuring Ganglia on CentOS 5.4

Friday, January 1, 2010

Network design consideration for NFS

Network Design are an important consideration for NFS. Often we miss the infrastructure design consideration of NFS. Read further at Network design consideration for NFS