Linux centos redhat install NVIDIA graphics driver

**

Linux install graphics driver

**
Step 1: Download the driver, corresponding to the same model, just download it.
NVIDIA driver download address https://www.nvidia.cn/Download/index.aspx?lang=cn
Take K620 as an example, as shown below:
Insert picture description here
Insert picture description here

2. After the download is complete, it needs to be uploaded to the server. Take U disk upload as an example:
fdisk -l Check whether the U disk is recognized
Insert picture description here

After identifying the U disk, mount and copy
mkdir 1 First create a folder
mount /dev/sdb4 1 Mount your U disk to the folder created by yourself on the server
df -Th You can check whether the mount is successful
cd 1 Enter 1 In the directory
ls view the graphics card driver name
cp NVIDIA-Linux-x86_64-440.82.run /root Copy to the /root directory
Insert picture description here
Insert picture description here

Note: (Using the pxe filling system, you may not be able to install the GPU driver because the relevant development package cannot be found in the kernel. You need to reinstall the original kernel, uninstall the existing upgraded kernel, and reinstall the GCC-related basic operating tools.)
Check whether the system is installed with gcc gcc -–version
yum -y install gcc gcc-c++
If the installation is not successful, you need to configure a yum warehouse by yourself
cd /etc/yum.repos.d
vim lcwt.repo
[base]
name=lcwt
baseurl=file :///mnt
enabled=1
gpgcheck=0
save and
mount /dev/sr0 /mnt After mounting the image, you can
install gcc
yum -y install gcc gcc-c++
Insert picture description here
Insert picture description here

Install kernel-header
yum -y install kernel-devel- (you can press the tab key to complete)
Nouveau needs to be disabled,
you can check whether lsmod is turned on | grep nouveau to
add configuration: vim /usr/lib/modprobe.d/blacklist-nouveau.
Add two lines to the conf file as follows:
blacklist nouveau
options nouveau modeset=0
Insert picture description here
Insert picture description here

After saving, execute the command to make the kernel take effect dracut –force
enter the text mode init 3
Find the location of the graphics card driver and execute the installation: sh NVIDIA-linux (tab key can be completed) –ui=none –no-questions –accept-license
Insert picture description here
Insert picture description here

Check the graphics card situation: nvidia-smi
Insert picture description here

Restart to see if you can enter the graphics normally.
If there is an error, check the kernel version and download the dependency package according to the version number. Please uninstall the driver first
sh NVIDIA-Linux-x86_64-440.82.run -uninstall Fill in the name of the driver that failed to install before
Check the kernel
rpm -qa | grep kernel
Insert picture description here
Insert picture description here
Insert picture description here

The installation is mandatory, otherwise it cannot be installed. First enter the CD-ROM directory package that you mounted, where my package location is /mnt/Pachages. The
command is as follows:
cd /mnt/Pachages
rpm -ivh kernel-devel-3.10.0-862.el7.x86_64.rpm –force mandatory It means
rpm -ivh kernel-headers-3.10.0-862.el7.x86_64.rpm-After the force
is installed, the driver can be installed. Only applicable to special cases. If you have other questions, please Baidu by yourself.
If it is a text interface to install the driver and need to mount the image, directly mount /dev/sr* /mnt where * needs to be tab out.

Guess you like

Origin blog.csdn.net/qq_43261733/article/details/108583804