Centos7RedHat7 install NVIDIA-TeslaP4 graphics driver manual

Centos7 / RedHat7 install NVIDIA-TeslaP4 graphics driver manual

Linux systems are generally installed by default nouvea is open source graphics drivers, which conflicts with nvidia graphics driver, must first want to install nvidia ban nouvea!

Close secure boot (1 Pit) - modified by the system unit is completed, the default is set

  • Restart the computer, enter the BIOS
  • Find seure boot, usually in the boot options
  • The "Enable" was changed to "Disable"

Detected NVIDIA drivers

Under the root user, run the following command to see if N normal identification card hardware

lspci|grep -i nvidia

-i parameter is ignored behind keyword search case

View the system kernel version
# uname -r
3.10.0-693.el7.x86_64 ; 不同操作系统的内核版本会不一样,记住它后面有用
# df ; 确认 boot 目录的空间不少于 300 MB

It should be [Special Note]: The company is the default of 957 kernel, you need to find a system unit will fall back to the kernel 693 **, or not installed on the N card driver

Download NVIDIA Driver

[Image dump the chain fails, the source station may have security chain mechanism, it is recommended to save the picture down uploaded directly (img-oNRz2ChL-1579155760647) (C: \ Users \ CPIC \ Desktop \ p4 install.jpg)]

Note here to choose Linux-64-bit .

Disable the Nouveau driver (Pit 2)

  • Check whether nouveau run: lsmod | grep nouveau as just need to disable the run

  • Modify /lib/modprobe.d/dist-blacklist.conf file

The nvidiafb commented:

#blacklist nvidiafb

Add two lines

 blacklist nouveau
 options nouveau modeset=0
  • Modify two nvidia-installer-disable-nouveau.conf file

    # vim /etc/modprobe.d/nvidia-installer-disable-nouveau.conf
    # vim /lib/modprobe.d/nvidia-installer-disable-nouveau.conf
    ...
    blacklist nouveau
    options nouveau modeset=0
    
  • Modify / etc / default / grub file

Add in the GRUB_CMDLINE_LINUX

rd.driver.blacklist nouveau nouveau.modeset=0
  • Rebuild initramfs image
# mv /boot/initramfs-$(uname -r).img  /boot/initramfs-$(uname -r).img.bak
# dracut /boot/initramfs-$(uname -r).img $(uname -r)

Restart (non-essential)

# systemctl set-default multi-user.target 
# init 3 
# reboot

Installation build environment (hole 3)

Build local yum source reference https://blog.csdn.net/Sunny_Future/article/details/78420508 or own search network yum source, due to the company's internal and external network isolation, yum source from system configuration section , which are not otherwise gcc installed successfully.

Run the following command

yum install gcc kernel-devel kernerl-hearders -y

It should be noted that the version of the kernel-devel yum install successful, to be consistent with the previous system kernel, if still high version of the 957 kernel, you need to download the installation package kernel-devel-3.10.0-693.el7.x86_64.rpm performed rpm installation, reference http://rpm.pbone.net/index.php3/stat/4/idpl/37924679/dir/scientific_linux_7/com/kernel-devel-3.10.0-693.el7.x86_64.rpm .html

Download and install.

You must first remove the high version of the 957 kernel-devel, and then install the 693 version, execution

#rpm -qa|grep kernel-devel 
#rpm -e kernel-devel-3.XX.X-957.el7.x86_64.rpm
#rpm -ivh kernel-devel-3.10.0-693.el7.x86_64.rpm

Install NVIDIA drivers

#chmod +x NVIDIA-Linux-x86_64-440.33.01.run
#./NVIDIA-Linux-x86_64-440.33.01.run --kernel-source-path=/usr/src/kernels/3.10.0-693.el7.x86_64 -k $(uname -r)

OK all the way and ACCEPT, Install NVIDIA's 32-bit compatibillty libraries? Select Yes

N card driver final verification is performed

# nvidia-smi

Here Insert Picture Description

postscript:

1. Before downloading the driver package is the official website of nvidia-driver-local-repo-rhel7-440.33.01-1.0-1.x86_64.rpm, seemingly wrong.

2, Cuda installation package Download: https: //developer.nvidia.com/cuda-downloads target_os = Linux & target_arch = x86_64 & target_distro = RHEL?

There are two types, namely runfile (.run) file and the file rpm recommended .run package, if you install only CUDA, do not select the package in which the driver installation options to install.

sh cuda_10.2.89_440.33.01_linux.run
rpm -ivh cuda-repo-rhel7-10-2-local-10.2.89-440.33.01-1.0-1.x86_64.rpm

Here Insert Picture Description
reference:

1、https://blog.csdn.net/sunny_future/article/details/83500788

2、https://note.youdao.com/ynoteshare1/index.html?id=83c6d9db77126025afd1ef93b2076ced&type=note

3 https: //www.cnblogs.com/yangsichao/p/8026234.html

Published 35 original articles · won praise 20 · views 80000 +

Guess you like

Origin blog.csdn.net/yingwei13mei/article/details/104004143