Tuesday, March 31, 2009
Using SAMBA 2nd Edition by O'Reilly Online Catalog
Must Read....especially if it is free
Monday, March 30, 2009
Tex4ht for CentOS, Redhat and Fedora
To install text4ht, make sure you install the repository from http://centos.karan.org/
#yum install tex4ht (That's it)
Sunday, March 29, 2009
Finding problematic updates
If you installed a software updates and something broke or no longer works, you may have to look at the Package Manager log File.
For Debian-based LINUX like Ubuntu, Linux Mint, the log file is /var/log/dpkg.log
For Redhat-based Linux like CentOS, Fedora, the log file is /var/log/yum.log
Scalpel - Recover lost file
Step 1: Install scalpel
# yum install scalpel
Step 2: Define the file type you wish to recover by uncommenting it.
# vim /etc/scalpel.conf
Step 3: Recover the file
# scalpel /dev/mapper/VolGroup00-LogVol00 -o output
Note:
- Make sure you do not have a directory output or scalpel will not work.
- Scalpel search by partition and not directory. So don't specify directory. It simply cannot work
- to know which partition yo have, type # mount
Article: For more information, see Recover Deleted Files With Scalpel by HowToForge
Friday, March 27, 2009
Cooperative Linux - Linux on Windows
Colinux Website
Thursday, March 26, 2009
Xming, X Windows Server for Microsoft
Xming is the leading free unlimited X Window server for Microsoft Windows (XP/2003/Vista). It is fully featured, small and fast, simple to install and being standalone native Microsoft Windows, easily transported portable as a Pocket PC X server.
At the download page, download the Xming-mesa instead of Xming. Most versatile so far....
Wednesday, March 25, 2009
Using httping to test http throughput and latency
Step 1:
Install RPMForge
Step 2:
# yum install httping
Step 3:
# httping -c10 -Grg http://www.yourwebserver.com
Notes:
-g (URL to probe)
-G (GET request, to fetch the whole page)
-r (Resolve the hostname once, removing latency)
-b (show the transfer rates in bytes)
-s (display return codes)
-l (connect using SSL)
Monday, March 23, 2009
Installing Ganglia on Standalone or Cluster
- Ganglia Cluster Monitoring Made Easy by Idolinux.blogspot.com
- Ganglia Howto by IBM
- Ganglia Documentation by SourceForge.Net
Thursday, March 19, 2009
Xen: Invalid Source and/or Image destination
Very clear instruction can be found at Virtualization Guide
However during installation, I encounter a error where somehow I cannot install Media URL. I've tried NFS, but it didn't work.
To resolve this issue, look at the CentOS Discussion Forum. Initially I tried to use iso image but couldn't get it to work
- Start the Apache Service
- Place the CentOS DVD Disk into the Drive
- Do a Softlink from "ln -s /media/CentOS_5.2_Final /var/www/html/dvd"
- Of course first check that you can see the http://127.0.0.1/dvd
- Run Virt-Manager
The rest will be quite a breeze
Citrix XenServer Enterprise Free
Citrix XenServer (Enterprise) download
Tuesday, March 17, 2009
Free Non-Commercial Intel Compiler Download
Non-Commercial Software Download
Monday, March 16, 2009
libXp.so.6 error in MATLAB
To solve the problem:
# yum install libXp libXp-devel
Disabling Shutdown and Reboot in GNOME logout menu
1. Changing GNOME System Menu
Change the gdm's config file
# vim /etc/X11/gdm/gdm.conf
Find a line in the gdm.conf
# SystemMenu = false
2. To Prevent users from opening a termina and running "poweroff" or "reboot"
Delete or move these files:
/etc/security/console.apps/poweroff
/etc/security/console.apps/reboot
3. Prevent shutdown using Alt-Ctrl-Del
# vim inittab
# Trap CTRL-ALT-DELETE
ca::ctrlaltdel:/sbin/shutdown -t3 -r now
And change it to read:
# Disallow CTRL-ALT-DELETE
ca::ctrlaltdel:/bin/echo "ctrl-alt-delete has been disabled"
Modify the ownership
#sudo chgrp root /sbin/halt /sbin/shutdown
#sudo chmod 550 /sbin/halt /sbin/shutdown
Articles:
- Disable Shutdown For Normal Users (Ubuntu Blog)
- Disable shutdown/reboot in GNOME logout menu (Fedora Mailing List)
Installing RPMForge
This Repository is definitely something you will not want to miss out
For CentOS 5 (summary)
# yum install yum-priorities (x86_64) wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm (i386) # wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm # rpm -ivh rpmforge-release-0.5*.rpm # yum check-update
For CentOS 4 (summary)
# yum install yum-plugin-priorities (x86_64) # wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el4.rf.x86_64.rpm (i386) # wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el4.rf.i386.rpm rpm -ivh rpmforge-release-0.5*.rpm # yum check-update
For more information, read go to http://rpmrepo.org/RPMforge/
Sunday, March 15, 2009
NFS Performance Tuning
fileserver:/home /home nfs async,rsize=8192,wsize=8192,intr 0 0
According to the article, using async will cause the speed of the NFS mount to be close to actual local disk speed. Furthermore, you can increase the buffer size of rsize and wsize from the default 4096 to 8192
intr - allow signal to interrupt file operation especialy if it is hard-mounted
hard - by default
dmidecode - Finding the hardware details remotely
Options includes:
- bios,
- system,
- baseboard,
- chassis,
- processor,
- memory,
- cache,
- connector,
- slot
To obtain the information, just type
# dmidecode --type system
To get specific information such as serial number which will be useful for remote fault-reporting without making a trip to the data-center:
# dmidecode -s system-serial-number
To get a list of string keywords:
# dmidecode -s
Followup Articles:
Friday, March 13, 2009
Solving "E25: GUI cannot be used: Not enabled at compile time" on CentOS
When you run vim -g
Do note that at CentOS, the equivalent of vim -g is gvim. However, there is no package called gvim on CentOS 4 and CentOS 5. To have the gvim equivalent, do the following.
Step 1: yum install vim-enhanced (To install the fuller package of vim)
Step 2: yum install vim-X11 (To installed the equivalent of gvim)
Step 3: Just type gvim......and you have it
Saturday, March 7, 2009
Backup Software - Back In Time
Currently there are two GUI available: Gnome and KDE 4 (>= 4.1).
All you have to do is configure:
- Where to save snapshot
- What directories to backup
- When backup should be done (manual, every hour, every day, every week, every month)
Thursday, March 5, 2009
Force users to change their passwords upon first login
Taken from Redhat Magazine: Tips and tricks: How do I force users to change their passwords upon first login?
- Firstly, lock the account to prevent the user from using the login until the change has been made:
# usermod -L - Change the password expiration date to 0 to ensure the user changes the password during the next login:
# chage -d 0 - To unlock the account after the change do the following:
# usermod -U
Wednesday, March 4, 2009
Adding a Directory to the Path
Adding a Directory to the Path
- To add a directory to the path of a single user is to modify that user's .bash_profile file.
- To add it to all users except user root, add it to /etc/profile.
- To also add it to the path of user root, add it to root's .bash_profile file.
Adding to a Single User's Path
To add a directory to the path of a single user, place the lines in that user's .bash_profile file.
PATH=$PATH:/data/myscriptsexport PATH
Adding to All Users' Paths (except root)
You globally set a path in /etc/profile. That setting is global for all users except user root.
PATH=$PATH:/data/myscripts
export PATH
Adding to the Path of User root
User root's path is set from scratch by its .bash_profile script. In order to add to the path of user root, modify its .bash_profile.
For more information, see the full article "Adding a Directory to the Path"
Tuesday, March 3, 2009
Reverse SSH
First thing first:
- Make sure you have installed OpenSSH on the destination machine.
- ssh -R 1234:localhost:22 home_machine (where home_machine is the IP Address of your home computer)
- Once you have established the connection, from your home type: ssh your_name@localhost -p 1234
Similar Article from HowToForge: http://www.howtoforge.com/reverse-ssh-tunneling
Sunday, March 1, 2009
Tuning LINUX Toolbox
Vmstat
Columns Information
(r,b) - How many process can be run if a CPU is available and how many are blocked.
(swpd, free, buff, cache) - Show how memory space is used.
(si, so) - Page-In and Page-Out
(io, bi, bo) - Number of Blocks received and sent to block devices
(in, cs) - Number of Interupts and context switches
(us, sy, id, wa) - Indicate percentage of time the CPU(s) has spent in userspace applications, in the kernel, being idle....
# vmstat 5 10 (To run vmstat with ten updates, five seconds )
Articles to consider:
- Monitoring Virtual Memory with vmstat by LINUX Journal
- Understanding the Linux Virtual Memory Manager by Mel Gorman
- Is swap space obsolete? by Martin Pool
Disk Performance
Hdparm is a good tool to determine whether the disks are healthy and configured
# hdparm -tT /dev/sda
Article to consider:
- Speeding up Linux Using hdparm by O'Reilly
# iostat -x sda 1
(%iowait) - High means CPU is idele and waiting for outstanding disk I/O requests.
(avgqu-sz) - Value should be less than 1
(%util) - pecentage of time the disk has requests.
To install on CentOS, Fedora, "yum install sysstat", iostat will be installed with the packages.
Articles to consider: