Installing the official NVIDIA driver on CentOS

I found it very hard to find a guide to properly disable the nouveau driver so I can install the Nvidia driver on CentOS 6. This should help simplify the installation.

1. Install the kernel-devel and development packages for your running kernel.

yum -y install kernel-devel-`uname -r` kernel-headers-`uname -r`
yum groupinstall “Development Tools”

2. Blacklist the nouveau driver. This needs to be done to properly load the Nvidia driver. First, the module must be blacklisted on the system. The final step is to remove the nouveau driver from the kernel ram disk image.

echo “blacklist nouveau” >> /etc/modprobe.d/blacklist.conf

dracut -f -o nouveau

3. Boot into runlevel 3 with “nomodeset” on the kernel line in grub.cfg or add it to the kernel line in the grub boot menu. If you do not do this, you will see a black screen when you reboot.

4. Run the Nvidia installer

5. Reboot.