{"id":2546,"date":"2025-08-26T13:05:24","date_gmt":"2025-08-26T05:05:24","guid":{"rendered":"https:\/\/airy.cn\/WordPress\/?p=2546"},"modified":"2025-08-26T13:05:25","modified_gmt":"2025-08-26T05:05:25","slug":"rhel-8-8-%e5%ae%89%e8%a3%85-nvidia-%e9%a9%b1%e5%8a%a8","status":"publish","type":"post","link":"https:\/\/airy.cn\/WordPress\/?p=2546","title":{"rendered":"RHEL 8.8 \u5b89\u88c5 NVIDIA \u9a71\u52a8"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u524d\u63d0\u4e0e\u51c6\u5907<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u786e\u8ba4 GPU \u578b\u53f7\u4e0e\u652f\u6301\u7684\u9a71\u52a8\u7248\u672c<\/strong>\uff1a\u5230 NVIDIA \u5b98\u65b9\u9a71\u52a8\u4e0b\u8f7d\u9875\u9762\u786e\u8ba4\uff08\u4f8b\u5982 GeForce\/Quadro\/RTX\/HPC\uff09\u3002<\/li>\n\n\n\n<li><strong>\u7cfb\u7edf\u66f4\u65b0<\/strong>\uff1a <\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf update -y\nsudo reboot    # \u5982\u5185\u6838\u6216\u5173\u952e\u7ec4\u4ef6\u88ab\u66f4\u65b0<\/code><\/pre>\n\n\n\n<p><strong>\u7981\u7528 Nouveau \u9a71\u52a8<\/strong>\uff08Nouveau \u4e0e\u5b98\u65b9\u9a71\u52a8\u51b2\u7a81\uff09\uff0c\u5e76\u5b89\u88c5 EPEL\/\u5f00\u53d1\u5de5\u5177\u4e0e\u5185\u6838\u5934\u6587\u4ef6\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install -y epel-release\nsudo dnf groupinstall -y \"Development Tools\"\nsudo dnf install -y dkms kernel-headers kernel-devel rpm-build make gcc<\/code><\/pre>\n\n\n\n<p>\u786e\u4fdd&nbsp;<code>kernel-devel<\/code>&nbsp;\u4e0e\u5f53\u524d\u8fd0\u884c\u5185\u6838\u7248\u672c\u5339\u914d\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>uname -r\nrpm -q kernel-devel --qf '%{VERSION}-%{RELEASE}.%{ARCH}\\n'\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u9002\u5408\u9700\u8981\u7279\u5b9a\u7248\u672c\u6216\u6ca1\u6709\u53ef\u7528\u4ed3\u5e93\u65f6\u3002<br><br>\u6b65\u9aa4\uff1a<br><br>\u5207\u6362\u5230\u6587\u672c\u6a21\u5f0f\uff08\u505c\u6b62\u56fe\u5f62\u754c\u9762\uff09\uff1a<br>bash<br>sudo systemctl isolate multi-user.target<br>\u786e\u8ba4 Nouveau \u7981\u7528\uff1a<br>\u521b\u5efa\u6216\u7f16\u8f91 \/etc\/modprobe.d\/blacklist-nouveau.conf\uff0c\u5185\u5bb9\uff1a<br>ini<br>blacklist nouveau<br>options nouveau modeset=0<br>\u751f\u6210\u5e76\u66f4\u65b0 initramfs\uff1a<br>bash<br>sudo dracut --force<br>\u91cd\u542f\u5230\u6587\u672c\u6a21\u5f0f\u6216\u91cd\u65b0\u5f15\u5bfc\uff1a<br>bash<br>sudo reboot<br>sudo systemctl isolate multi-user.target<br>\u4e0b\u8f7d NVIDIA .run\uff08\u4ece NVIDIA \u5b98\u65b9\uff09\uff0c\u4f8b\u5982\uff1a<br>bash<br>wget -O NVIDIA-Linux.run \"https:\/\/us.download.nvidia.com\/XFree86\/Linux-x86_64\/&lt;VERSION>\/NVIDIA-Linux-x86_64-&lt;VERSION>.run\"<br>chmod +x NVIDIA-Linux.run<br>\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\uff1a<br>bash<br>sudo .\/NVIDIA-Linux.run<br>\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u5982\u679c\u63d0\u793a\u5b89\u88c5 32-bit compatibility libraries\u3001GLX\u3001OpenGL \u7b49\uff0c\u6839\u636e\u9700\u8981\u9009\u62e9\u3002<br>\u82e5\u63d0\u793a\u7f16\u8bd1\u5185\u6838\u6a21\u5757\u5931\u8d25\uff0c\u9700\u786e\u8ba4 kernel-devel \u548c\u7f16\u8bd1\u5de5\u5177\u5b8c\u6574\u3002<br>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u751f\u6210 X \u914d\u7f6e\uff08\u53ef\u9009\uff09\uff1a<br>bash<br>sudo nvidia-xconfig<br>\u542f\u52a8\u56fe\u5f62\u754c\u9762\uff1a<br>bash<br>sudo systemctl isolate graphical.target<br>\u9a8c\u8bc1\u9a71\u52a8\uff1a<br>bash<br>nvidia-smi<br>\u6216<br>bash<br>lsmod | grep nvidia<br>\u6ce8\u610f\uff1a<br><br>.run \u5b89\u88c5\u4e0d\u4f1a\u81ea\u52a8\u968f\u5185\u6838\u5347\u7ea7\u91cd\u5efa\u6a21\u5757\uff08\u53ef\u4f7f\u7528 DKMS \u6216\u6bcf\u6b21\u5185\u6838\u5347\u7ea7\u540e\u624b\u52a8\u91cd\u88c5\uff09\u3002<br>\u5b89\u88c5\u4e4b\u524d\u52a1\u5fc5\u7981\u7528 Nouveau\u3002<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u65b9\u6cd5\u4e8c\uff1a\u4f7f\u7528 ELRepo\uff08\u63a8\u8350\uff09\u6216 NVIDIA \u5b98\u65b9\u7684 RPM\/\u4ed3\u5e93\uff08\u66f4\u6613\u7ef4\u62a4\uff09<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ELRepo \u63d0\u4f9b kmod-nvidia\uff08\u9884\u7f16\u8bd1\u7684\u5185\u6838\u6a21\u5757\uff09\u4e0e nvidia \u5305\uff0c\u5b89\u88c5\u540e\u5728\u5185\u6838\u5347\u7ea7\u65f6\u66f4\u5bb9\u6613\u7ba1\u7406\u3002NVIDIA \u4e5f\u63d0\u4f9b\u5b98\u65b9\u7684 CUDA \/ driver RPM repo\u3002<br><br>\u793a\u4f8b\uff1a\u4f7f\u7528 ELRepo\uff08\u9002\u914d RHEL\uff09<br><br>\u5b89\u88c5 ELRepo\uff1a<br>bash<br>sudo dnf install -y https:\/\/www.elrepo.org\/elrepo-release-8.el8.elrepo.noarch.rpm<br>\u542f\u7528 ELRepo \u7684 kernel modules \u6e90\uff08\u901a\u5e38\u9ed8\u8ba4\u542f\u7528\uff09\uff0c\u7136\u540e\u5b89\u88c5 kmod-nvidia\uff1a<br>bash<br>sudo dnf --enablerepo=elrepo-kernel install -y kmod-nvidia<br>\u6216\u5b89\u88c5\u5b8c\u6574 GPU \u9a71\u52a8\uff1a<br>bash<br>sudo dnf install -y nvidia-x11-drv<br>\u5177\u4f53\u5305\u540d\u53ef\u80fd\u968f ELRepo \u7248\u672c\u53d8\u5316\uff0c\u4f7f\u7528 dnf search nvidia \u67e5\u627e\u3002<br>\u7981\u7528 Nouveau\uff08\u540c\u4e0a\uff09\u5e76\u91cd\u5efa initramfs\uff1a<br>bash<br>sudo bash -c \"echo -e 'blacklist nouveau\\noptions nouveau modeset=0' > \/etc\/modprobe.d\/blacklist-nouveau.conf\"<br>sudo dracut --force<br>sudo reboot<br>\u9a8c\u8bc1\u9a71\u52a8\uff1a<br>bash<br>nvidia-smi<br>\u4f18\u52bf\uff1aELRepo \u7684 kmod \u5305\u4f1a\u4e3a\u6bcf\u4e2a\u5185\u6838\u7248\u672c\u63d0\u4f9b\u5bf9\u5e94\u7684\u5185\u6838\u6a21\u5757\uff0c\u5185\u6838\u5347\u7ea7\u540e\u6a21\u5757\u901a\u5e38\u81ea\u52a8\u5b89\u88c5\uff0c\u4e0d\u5fc5\u624b\u52a8\u7f16\u8bd1\u3002<\/pre>\n\n\n\n<p>\u4f7f\u7528 NVIDIA \u5b98\u65b9 RPM\/Repo\uff08NVIDIA CUDA repo\uff09<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u5982\u679c\u4f60\u9700\u8981 CUDA\uff0c\u4e00\u822c\u4f7f\u7528 NVIDIA \u5b98\u65b9\u7684 CUDA\/RPM repo\uff1a<br><br>\u6309\u7167 NVIDIA \u5b98\u65b9\u6587\u6863\u6dfb\u52a0 repo\uff08\u4f8b\u5b50\uff0c\u66ff\u6362\u4e3a\u5bf9\u5e94\u7248\u672c\uff09\uff1a<br>bash<br>sudo dnf config-manager --add-repo=https:\/\/developer.download.nvidia.com\/compute\/cuda\/repos\/rhel8\/x86_64\/cuda-rhel8.repo<br>sudo dnf clean all<br>sudo dnf -y module disable nvidia-driver<br>sudo dnf -y install nvidia-driver cuda<br>\u91cd\u542f\u5e76\u9a8c\u8bc1 nvidia-smi\u3002<br>\u8bf7\u53c2\u8003 NVIDIA \u5b98\u65b9\u6587\u6863\u4ee5\u83b7\u53d6\u9488\u5bf9 CUDA \u7248\u672c\u7684\u7cbe\u786e\u4ed3\u5e93 URL \u4e0e\u5305\u540d\u3002<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u63d0\u4e0e\u51c6\u5907 \u7981\u7528 Nouveau \u9a71\u52a8\uff08Nouveau \u4e0e\u5b98\u65b9\u9a71\u52a8\u51b2\u7a81\uff09\uff0c\u5e76\u5b89\u88c5 EPEL\/\u5f00\u53d1\u5de5\u5177\u4e0e\u5185\u6838\u5934\u6587 &#8230; <a title=\"RHEL 8.8 \u5b89\u88c5 NVIDIA \u9a71\u52a8\" class=\"read-more\" href=\"https:\/\/airy.cn\/WordPress\/?p=2546\" aria-label=\"\u9605\u8bfb RHEL 8.8 \u5b89\u88c5 NVIDIA \u9a71\u52a8\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kadence_starter_templates_imported_post":false,"footnotes":""},"categories":[2],"tags":[],"class_list":["post-2546","post","type-post","status-publish","format-standard","hentry","category-airy-tech"],"_links":{"self":[{"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/posts\/2546","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2546"}],"version-history":[{"count":2,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/posts\/2546\/revisions"}],"predecessor-version":[{"id":2548,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/posts\/2546\/revisions\/2548"}],"wp:attachment":[{"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2546"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2546"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}