http://pyrx.sourceforge.net/blog/103-installing-nvidia-driver-on-centos-6 (Source)


This post explains how to install NVIDIA proprietary drivers on CentOS 6. By default, CentOS 6 comes with nouveau drivers, which for 3D (OpenGL) rendering, is order of magnitude slower that NVIDIA's proprietary drivers.  For instance, I had glxgear running at round 400 frames per second (FPS) before installing NVIDIA proprietary drivers and at around 1000 FPS after. So it pays to add this extra step to your CentOS 6 installation. Before we start make sure you have all required packages installed:


yum groupinstall "Development Tools"
yum install kernel-devel kernel-headers dkms

The last package (dkms) is needed so that we don't have to reinstall NVIDIA drivers after each kernel updates. Now we are ready to download NVIDIA proprietary drivers - http://www.nvidia.com/Download/index.aspx

To find out your Video Card model number, click Main Menu → System Settings → Display or run:


lspci | grep VGA

I then run /sbin/init 3 and then chmod +x NVIDIA-Linux-x86-290.10.run followed by ./NVIDIA-Linux-x86-290.10.run. However, this gave me:


"ERROR: The Nouveau kernel driver is currently in use by your system. This driver is incompatible with the NVIDIA driver, and must be disabled before proceeding. Please consult the NVIDIA driver README and your Linux distribution's documentation for details on how to correctly disable the Nouveau kernel driver."

After trying many different options I have found a solution described here:

http://www.linuxquestions.org/questions/ubuntu-63/nouveau-kernel-driver-825432/

So I added the following line to /etc/modprobe.d/blacklist.conf file


blacklist nouveau

and then did:


$ mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak   
$ dracut -v /boot/initramfs-$(uname -r).img $(uname -r)

and it worked like a charm. Also, in CentOS 6, Control+Alt+Backspace shortcut does not restart the X server. To enable that follow procedure described in:

http://ryanler.wordpress.com/2009/06/11/controlaltbackspace-shortcut-does-not-restart-the-x-server-in-fedora-11/

Another difference, between CentOS 6 and earlier version is that system-config-packages (Add/remove applications) is now called gpk-application. You need to run yum install gnome-packagekit if gpk-application is not installed in your system.

Also, if you are planning to do OpenGL development you need to run (source: www.centos.org - Forums - CentOS 6 - Software Support - Help me ..)


yum install mesa-libGL-devel mesa-libGLU-devel

 

** IF XSERVER WONT SHUT DOWN, THEN JUST LOOK AT THE LOG USING THE CODE IT TELLS YOU, /var/log/nvidia-whatever.log ... then kill process # that says it's hanging