Friday, December 30, 2011

Learning RHEL 6

Just a couple of days ago I found a new book of RHCE Certification Study Guide from Michael Jang, I have decided to learn what is new from the latest RHEL 6. This is the second book I read from Michael and is the third book I studied related to RHCE certification. Then I noticed the requirement for labs exercise from it: a computer which supports vmx or svm flags. There is no issue of my newest laptop, a Sony Vaio VPCF13UFX with 8GB RAM and a Transcend SATA 64GB SSD, except it runs Linux Mint 10...

I love how Linux Mint is pre-configured with all codec bundled and you can start watching video and listening music without hours of trouble-shooting. That is the reason I switched from Fedora 10 few years ago. In order to do the lab exercise, I need to put RHEL 6 on it meanwhile installing all the missing components such as Office Suite, multimedia program like mplayer and vlc. No doubt there is no match to the feature-rich OS like LM but at least I hope to get the system a bit closer to what I used to have.

Since there are posts available to get missing components working on RHEL 6, I added it here for my reference as well.
 

Repository
I have tried EPEL and RPM Fusion but eventually I pick RPMforge and Fedora 12 archive. Strictly speaking, F12 is no longer a repository but I learned that there are a lot of RPM were sourced and built from F12 (I might be wrong though). 

Fedora 12 Archive
You can find all Fedora's gpg-pubkey here.
Import the F12 gpg-pubkey with the following command. Later on any RPM downloaded from F12 archive will not issue warning during installation.
[root@vpcf1 ~]# rpm --import https://fedoraproject.org/static/57BBCCBA.txt 

RPMforge
Follow the instructions from their site.



Components
nVidia
Please refer to its instructions.

I hooked up a Samsung B2440MH monitor with HDMI from my Vaio as a secondary display. The monitor is stood vertically with 3D hardware accelerated. Unfortunately Desktop Effects never works on my secondary display with missing title bar and window handle. Same problem I had on LM 11 that's why I sticked to LM 10 as Compiz works on the primary and secondary display (a miracle!?). Below is my xorg.conf in case someone needs it:

[root@vpcf1 ~]# cat /etc/X11/xorg.conf
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 270.41.03  (buildd@litembilla)  Mon Apr 11 20:45:06 UTC 2011

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 270.41.03  (buildmeister@swio-display-x86-rhel47-07.nvidia.com)  Sat Apr  9 00:26:28 PDT 2011

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" RightOf "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Sony Nvidia Default Flat Panel"
    HorizSync       28.0 - 33.4
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "Samsung SMB2440MH"
    HorizSync       30.0 - 81.0
    VertRefresh     56.0 - 75.0
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 310M"
    Option         "ConnectedMonitor" "DFP-0"
    Option         "CustomEDID" "DFP-0: /proc/acpi/video/NGFX/LCD/EDID"
    Option         "RegistryDwords" "EnableBrightnessControl=1"
    BusID          "PCI:1:0:0"
    Screen          0
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 310M"
    Option         "RandRRotation" "on"
    BusID          "PCI:1:0:0"
    Screen          1
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "ConnectedMonitor" "DFP-0,DFP-1,CRT"
    Option         "TwinView" "0"
    Option         "metamodes" "DFP-0: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "rotate" "ccw"
    Option         "TwinView" "0"
    Option         "metamodes" "DFP-1: nvidia-auto-select +0+0; DFP-1: 1920x1080_60_1 +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection
 


LibreOffice
Please refer to its instructions.

Adobe Flash 
Please refer to its instructions.

Transmission
Download the following RPM from F12 archive:
[root@vpcf1 ~]# rpm -ivh transmission-gtk-1.93-1.fc12.x86_64.rpm transmission-common-1.93-1.fc12.x86_64.rpm

Stardict
Download the following RPM from F12 archive:      
[root@vpcf1 ~]# rpm -ivh stardict-3.0.1-20.fc12.x86_64.rpm
[root@vpcf1 ~]# rpm -ivh stardict-dic-ja-2.4.2-6.fc12.noarch.rpm

Dropbox
Download it from here. Install it and follow the instructions. I need to comment out all the lines of /etc/yum.repos.d/dropbox.repo as it causes problem with yum update command:
[root@vpcf1 ~]# cat /etc/yum.repos.d/dropbox.repo
#[Dropbox]
#name=Dropbox Repository
#baseurl=http://linux.dropbox.com/fedora/$releasever/
#gpgkey=http://linux.dropbox.com/fedora/rpm-public-key.asc
 

mplayer
Almost trapped into the dependency hell here, but I managed to get it installed successfully.
Download freeglut from F12 archive to fix the dependency problem with libglut.so.3:
[root@vpcf1 ~]# rpm -ivh freeglut-2.6.0-0.2.rc1.fc12.x86_64.rpm
[root@vpcf1 ~]# yum install libcaca

Download cppunit from F12 archive to fix the dependency problem with libcppunit-1.12.so.1:
[root@vpcf1 ~]# rpm -ivh cppunit-1.12.1-3.fc12.x86_64.rpm
[root@vpcf1 ~]# yum install dirac
 

Download esound-libs and audiofile to fix the dependency problem with libesd.so.0:
[root@vpcf1 ~]# rpm -ivh esound-libs-0.2.41-3.fc12.x86_64.rpm audiofile-0.2.6-11.fc12.x86_64.rpm


Then install mplayer with yum install mplayer and its frontend smplayer, as well as mencoder.

Skype
After sorting out all the missing libraries, skype-2.2.0.35-fedora.i586.rpm started with core dump abort error (downloaded from Skype directly). The solution is to use an older 2.1 version through yum. Create /etc/yum.repo.d/skype.repo with the following lines:
[skype]
name=Skype Repository
baseurl=http://download.skype.com/linux/repos/fedora/updates/i586/
#gpgkey=http://www.skype.com/products/skype/linux/rpm-public-key.asc
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-skype
enabled=1
gpgcheck=0
 

Next, yum install skype
Finally, install the following RPM separately (using yum) which is required for skype:
glibc-2.12-1.47.el6.i686
alsa-lib-1.0.22-3.el6.i686
libXv-1.0.5-1.el6.i686
libXScrnSaver-1.2.0-1.el6.i686
qt-4.6.2-20.el6.i686
qt-x11-4.6.2-20.el6.i686


Let's yum does the job and pull other required RPM to your system. To satisfy all the dependencies more than 60 extra i686 RPM are installed!

PMS (PlayStation 3 Media Server)
The latest version is 1.50 build, you can download it from here.
I got 2 issues on RHEL 6.2 with it.

First, the following error msgs were logged:
Error loading libzen: Unable to load library 'zen': libzen.so: cannot open shared object file: No such file or directory  
Error loading MediaInfo library: Unable to load library 'mediainfo': libmediainfo.so: cannot open shared object file: No such file or directory
Download and install the libmediainfo0 and libzen0 from sourceforge.net for your platform (i.e. x86_64.RHEL_6)
[root@vpcf1 ~]# rpm -ivh libzen0-0.4.23-1.x86_64.RHEL_6.rpm
[root@vpcf1 ~]# rpm -ivh libmediainfo0-0.7.52-1.x86_64.RHEL_6.rpm


Second, my PlayStation 3 cannot see it. Just add port 5001 tcp in iptables and restart pms. Or simply disable iptables.




My system is running fine so far except when the lid is closed it logs me out!