How are we going to do that?
After you setup the extra repositories, you will discover that the Nvidia drivers may not yet be available. And that you have the Nouveau open-source driver running instead. Sort of. So we will have to do a bit of hard work purging the existing driver, then installing the proprietary blob. And because we don't have the driver in the repos, we will manually compile the whole thing.
Step 1: Download the driver
Head to Nvidia site and download the driver. Very simple.
Step 2: Update your system & build tools
Like we did with CentOS 6, it is important to fully update your system before proceeding with the driver installation. The reason for this is that your running kernel may be older than the kernel source available in the repositories, so this will cause compilation conflicts. Therefore, first max. update the system:
yum update
Reboot if necessary for your latest kernel to load. Then, install kernel source, kernel headers, make and gcc, just like in the good old times!
yum install kernel-devel kernel-headers gcc make
Compare your running kernel with the installed source:
uname -r
rpm -q kernel-devel
If the two do not match, upgrade and reboot until they do:
yum -y upgrade kernel kernel-devel
chmod +x NVIDIA-XXX.run
sudo ./NVIDIA*.run -no-x-check -no-nouveau-check -no-opengl-files
Verify the successful installation of the video card
nvidia-smi