What & How & Why

这是本文档旧的修订版!


Install Nvidia Graphic Drivers

How to Install Nvidia Graphic Drivers in Centos 7

Step1:Download the package

Go to

http://www.geforce.com/drivers
to grab your driver package.

Step2:Stop the default driver

Centos 7 uses nouveau as it default driver. For installing Nvidia official driver, first of all we need stop nouveau.

Find the cfg and open it.

nano /boot/grub2/grub.cfg

Find this phrase in grub.cfg
menuentry 'CentOS Linux 7 (Core), with Linux 3.10.0-229.el7.x86_64' --class rhel fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-229.el7.x86_64-advanced-8f$
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod xfs
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 --hint='hd0,msdos1'  ec82fda9-4592-4f54-8a65-438f871243e8
        else
          search --no-floppy --fs-uuid --set=root ec82fda9-4592-4f54-8a65-438f871243e8
        fi
        linux16 /vmlinuz-3.10.0-229.el7.x86_64 root=/dev/mapper/centos-root ro rd.lvm.lv=centos/root rd.lvm.lv=centos/swap crashkernel=auto rhgb quiet nomodeset rdblacklist=nouveau LANG=en_US.UTF-8
        initrd16 /initramfs-3.10.0-229.el7.x86_64.img

Find quiet in this phrase.
rd.lvm.lv=centos/swap crashkernel=auto rhgb quiet

Add
nomodeset rdblacklist=nouveau
after quiet.

Ctrl+X to save grub.cfg

Step3:Reboot&Switch to command line

After Rebooting, open your terminal. Login as root, type

Init 3

Now you are at the command line.

Step4:install driver

cd to where you downloaded the driver,then type

chmod +x you file name

then type
./yourfilename

Now you can install your driver.
after the installation is complete, you can type
Init 5
to go back the GUI and check if the driver is working. ~~DUOSHUO~~