Tuesday, August 25, 2009

Read an interesting FAQ writeup on user-installed software found on Linux Format Aug 09. I thought I summarise the article in my own words.

I think as most system administration will encounter this scenario quite frequently especially in a academic environment that users wants to install software of their own. How do we cope with this?

Suggestion 1: Building from SourceI think one of the easiest method is to simply allow users to install from source file. The users can unpack the source and configure, make and make install. For example:

$ ./configure --prefix=$HOME$ make$ make install

(which will install directories like bin, lib and share to the user's home directory)

Suggestion 2: If using RPM, you can use some prefix$ rpm --prefix=/home/user/local --otheroptions(and adding an entry to sudoers with sudo)

However, there are some issues as many packages are NOT relocatable and have to be installed to the path that was given when they are compiled.

Suggestion 3: Allowing restricted sudo accessIf you allow users to install onto system directories, you can give them restricted rights like installing without removing.

Saturday, August 22, 2009

Tree is a utility which recursively displays the tree view of the contents of directories in a tree-like format

It comes default for CentOS Distribution

Note 1: How to use treeFor more information, you can use man tree. But some useful commands# tree -D (List the date of the last modification time for the file listed)# tree -a (List all the files to be printed including hidden files)# tree -s (List the size of the file and name)# tree -p (List the permission togethe with the file name)# tree -H . -o index.html (Generate the output in html format)

ishw is a small but useful tool to help you list the hardware of your linux box. Alternatively you can use dmidecode to list hardware too. For more information, you can read blog entry dmidecode - Finding hardware details remotely

To install lshw on CentOS, first ensure you have RPMForge Repository installed. For more information on RPMForge, you can take a look at blog entry Installing RPMForge

Step 1: Install lshw

# yum install lshw

Step 2: Install the gui version of lshw

# yum install lshw-gui

Step 3: To have a quick look of your hardware specification

# lshw -short

Step 4: To view specific hardware, you have to use the class option

# lshw -class memory

(For more information on what class, you can find it from lshw -short)

Monday, August 17, 2009

Note 1: Command line copying using ntfscp# ntfscp /dev/sdc1 /home/user/new_test.ini test.ini(Copy the new_test.ini from /home/user as test.ini to the root of /dev/sdc1 NTFS Volume

Note 2: Undeleting files at NTFS Volume

First do a scan for the deleted files# ntfsundelete --scan /dev/sdc1 (where /dev/sdc1 is the NTFS volume)

Take note of the the number of recoverable files and inode number of the file you wish to recover# ntfsundelete --undelete --inode 25 --output Documents/deleted.pdf /dev/sdc1(The command undelete inode number of the file (25) and recovered to Documents directory at NTFS Volume /dev/sdc1)

Tuesday, August 11, 2009

"PGFIO/stdio: No space left on devicePGFIO-F-/CLOSE/unit=11/error code returned by host stdio - 28. File name = /scratch/Gaussian-xxx.inp formatted, sequential access record = 57 In source file ml0.f, at line number 203"

As the error message obviously mentioned, it is due to no space available on the scratch file. Depending on how you design your scratch repository. You have to check your scratch directory at your local or shared file system on your Head and Compute Nodes and later issue a parallel script to clean up the files.

Sunday, August 9, 2009

For first timers to Linux, you may just want to start with some cool GUI Admin Tools, look no further, go to GadminTools (http://gadmintools.flippedweb.com/) and you can download stuff like Gadmin-ProFtpd to configure your Linux FTP

Wednesday, August 5, 2009

Sudo is generally considered a more secure way of controlling accessing to system commands. By default CentOS does not implement sudo by default

Note 1: To enable your userid to run any commands on CentOS,# vim /etc/sudoersyouruserid ALL=(ALL) ALL (at /etc/sudoers)(Youruserid can run any command)#sudo -s (will prompt you for password before allowing you to have full admin rights)

Tuesday, August 4, 2009

If launching the nagios web interface, you encountered error like "Return code of 127 for check of service 'HTTP' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists."

From the error itself, your installation of nagios-plugins has issues. To resolve the problems, make sure you install

Some hosts are not able to be ping due to firewall. By default, Nagios use the check_host_alive by default at /etc/nagios/objects/template.cfg. check_host_alive uses ping to check whether the host is alive. So your nagios web admin will see a host down status.

To use another commands to replace the check_host_alive with check_http which is more useful as a "check-alive-status", change it at the /etc/nagios/objects/hosts.cfg file. This will override the default at /etc/nagios/objects/templates.cfg

We assume that check_http is already define in the /etc/nagios/objects/command.cfg

Note 5: Make the hostgroups.cfg and fill up the information
define hostgroup{
hostgroup_name windows-servers
alias Windows Servers
members xxxxx
}

Note 6: Define services.cfg to command.cfg and hostgroup.cfg
(Look at http://wiki.centos.org/HowTos/Nagios for more information)
Remember to list the services you wish to implement for nagios. It will interact with command.cfg, hostgroups.cfg to enable the service. Thus command.cfg and hostgroups.cfg must be properly written