Thursday, September 29, 2011

My experience with CentOS 6

And finally I decided to switch to 64 bit computing! Motivated by my Parallel Computer Architecture course (in which I'm underperforming) I decided to install CentOS 6 X86_64 version. IIT gives enough internet speed in the campus (if only you know how to tap into :P) that I ended up downloading the two bin-DVD ISOs as well as LiveCD and LiveDVD ISOs totalling around 8GB in less than 2 hours from http://ftp.jaist.ac.jp/pub/Linux/CentOS/6.0/isos/x86_64/. Then I used the cool dd command to replicate the LiveDVD ISO onto my pen drive.

dd if=CentOS-6.0-x86_64-LiveDVD.iso of=/dev/sdb bs=1K

Don't forget to
umount /dev/sdb1
before issuing the above command.

So, after getting the bootable pen drive I restarted my notebook and pressed F12 to alter the boot order to select the pen drive instead of hard disk. The LiveDVD environment booted and I clicked on autologin letting it boot to GNOME by default. The interface was pretty fast. In fact much faster than Ubuntu because there is not much of eye candy at your disposal in CentOS by default. One irritation I had, was that I couldn't click by tapping the touchpad. I had to press the touchpad's left button to make the clicks. After some fiddling I found out in System>Preferences>Mouse in the Touchpad tab the option to Enable mouse clicks with touchpad. Then I enabled Desktop Effects and tested the Desktop on a cube of Compiz that pumps in zeal in linux fanboys and jeal in Windoze fans! Everything seemed to work perfectly, and I decided to go ahead and replace my Backtrack 5 installation with CentOS6. I launched the Install to hard drive installer and chose create a cutom layout in disk partitioning to specify my own partition to install and selected the Backtrack 5 partition and formatted it. After clicking the final install button, to my utter dismay the installer blurted something very nasty! The installation media is corrupt and installer can't proceed! Damn!!!!!!!!!!
I rebooted to find that my Backtrack 5 partition was wiped out. I booted into Ubuntu and used dd to replicate the bin-DVD1.iso image into my USB pen drive. After a wait of around 15 minutes my bin-DVD1 installer was ready. I rebooted and chose USB boot after F12 but this time it said: Operating system not found!!! Damn again!
After booting back to Ubuntu I replicated the LiveCD.iso into USB disk and re-booted into the LiveCD environment without any issues. I checked my system information and was proud to see 4GB of installed RAM! Both my 32-bit OSes viz. Windoze and Ubuntu 11.04 let me use only 3GB(approx.) RAM because of that damn memory mapping for I/O devices. Anyways I launched the installer and started following the wizard. During the bootloader setup screen I saw only Windoze was detected and named as Other. I added an entry for Ubuntu as well and edited the Other to read Windoze. I proceeded with the installer and after setting up all configs pressed the final install button. To my surprise, the install took less than 3 minutes!!!! Yes!! Thats right!
Then I rebooted and after a couple of formalities booted straight into lean and thin and clean upto the brim desktop environment of GNOME with very basic set of apps like GIMP, OpenOffice etc. Next thing I did was to install the multimedia codecs. I issued the following command
yum install gstreamer-plugins-base gstreamer-plugins-good gstreamer-plugins-bad gstreamer-plugins-ugly gstreamer-ffmpeg
For a user switching from Ubuntu it was nice to see that the package names are consistent across distros. Anyways I noticed that the gstreamer plugins from the base set and good set were already installed and yum started downloding the rest of them.
Then I installed vlc media player by
yum install vlc
When I tried typing gcc and g++ on the terminal I got command not found. Same happened for java but python was installed and worked. They don't provide everything in the CD due to space constraint. So I went ahead to install these myself. yum install g++ didn't work.
After some fiddling I noticed that I could hear sound when I plugged in the earphones but after plugging them out I couldn't hear any sound through speakers. Exactly same problem I faced in last october with Ubuntu and had posted at http://www.techbite.in/2010/10/realtek-alc888-sound-issues-in-ubuntu.html but I couldn't use the same solution for CentOS because there was no /etc/modprobe.d/alsa-base.conf in CentOS. I tried the locate command but in vain. If you know how to solve this issue please comment here.
Next I updated /etc/fstab and entered the entries for auto mounting of my Windoze partitions and Ubuntu partition. But before that I had to installl ntfs-3g because that would let my CentOS access NTFS partitions.
Anyways I went ahead with my installation streak and downloaded flash plugin 11 rc from Adobe's site for 64 bit architecture and extracted it and copied the libflahplayer.so to ~/.mozilla/plugins directory and my firefox started to show YouTube videos after a restart. My installation streak is still going on and the apps waiting in the queue for installation are:
compiz
w3m
aria2c
chrome
opera
nmap
g++
lftp
openssh
ettercap
apache
php
mysql
audacious
skype
gnuplot
vidalia

After the installation of these I'll have a relaxed sleep because I have a 4 day holiday!! That will be enough for me to spend nice time with CentOS6.

Update(Sep29 9:30AM IST):
I added these two lines to /etc/modprobe.d/dist-alsa.conf to got the sound from speakers working after a restart.
alias snd-card-0 snd-hda-intel
options snd-hda-intel model=auto
Other issues I faced so far are
1. Upon trying to install byobu-3.21-1.el6.noarch.rpm it says it needs python 2.6. But I already have python 2.6.5 installed
2. To run the ADT plugin for eclipse I require 32 bit libs support. Can't figure out how to do that. In Ubuntu 64 bit, one just have to install ia32-libs using apt-get.
3. Can't install audacious through yum. It says audacious-plugins package not found.
4. Installed compiz but can't find ccsm
5. Can't find aria2 through yum. I guess I've to hunt for a manual download of rpm instead.

Update(Oct 1 07:30PM IST)
I downloaded JDK 7 from here http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html and installed it. It worked perfectly. But after that I used yum to install Eclipse IDE which in turn installed OpenJDK and made it the default java. I hate OpenJDK and want only Sun JAVA. I tried:
update-alternatives --config java
But Sun Java wasn't listed there. There were two javas listed there. One was Open JDK 1.6 and other was gcj 1.5. I played some hide n seek and found out that Sun Java was installed in /usr/java/ and there were three directories there named jdk1.7.0, latest and default. Then after some fiddling with the man page of update-alternatives command I issued these three commands:

update-alternatives --install "/usr/bin/java" "java" "/usr/java/default/bin/java" 3
update-alternatives --install "/usr/bin/javac" "javac" "/usr/java/default/bin/javac" 3
update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/java/default/bin/javaws" 3

And then running this:
update-alternatives --config java
showed me Sun Java as the third option. Then I set it as the default java and my problem was solved.

To get started with server administration in CentOS if you have some basic Linux background, you should read the CentOS Server Administration Cookbook.

1 comment:

Ketan said...

@prab: good post. I felt like installing it myself. But it will take me 1 month to download it. Regarding RAM you might remember that I once discussed about this issue with you. What is it in parallel computing for which you need to install this os.