Tuesday, March 31, 2009
Must Read....especially if it is free
Monday, March 30, 2009
To install text4ht, make sure you install the repository from http://centos.karan.org/
#yum install tex4ht (That's it)
Sunday, March 29, 2009
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
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
- 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
Thursday, March 26, 2009
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
# yum install httping
# httping -c10 -Grg http://www.yourwebserver.com
-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
Thursday, March 19, 2009
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) download
Tuesday, March 17, 2009
Non-Commercial Software Download
Monday, March 16, 2009
To solve the problem:
# yum install libXp libXp-devel
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:
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
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
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
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
Friday, March 13, 2009
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
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
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
- 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.
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.
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
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
(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
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: