Prior to the Cuda development under CENTOS6, install and configure the CUDA environment please refer to another blog (Linux (redhat) Cuda installation). Because the CENTOS7 has a large change, so the installation of Cuda process encountered some trouble, the reason is initially due to OpenGL installation. The installation configuration process is described in detail below
Turn off firewall and SELinux and supplemental packages and establish local Yum source [root@localhost ~]# systemctl Stop Firewalld.service
[root@localhost ~]# systemctl Disable Firewalld.service
RM '/etc/systemd/system/dbus-org.fedoraproject.firewalld1.service '
RM '/etc/systemd/system/basic.target.wants/firewalld.service '
[Root@localhost ~]# Vi/etc/selinux/config
[Root@localhost ~]# Cat/etc/selinux/config
# This file controls the state of the SELinux on the system.
# selinux= can take one of these three values:
# Enforcing-selinux security policy is enforced.
# Permissive-selinux Prints warnings instead of enforcing.
# disabled-no SELinux policy is loaded.
Selinux=disabled
# selinuxtype= can take one of three the values:
# targeted-targeted processes is protected,
# Minimum-modification of targeted policy. Only selected processes is protected.
# Mls-multi level Security protection.
selinuxtype=targeted
Restart Continue configuration
=============================================================================================
[Root@localhost ~]# cd/etc/yum.repos.d/
[Root@localhost yum.repos.d]# mkdir-p./bak
[Root@localhost yum.repos.d]# mv *.repo./bak/
[Root@localhost yum.repos.d]# VI Local.repo
[Root@localhost yum.repos.d]# Cat Local.repo
[Local_server]
Name=this is a local repo
Baseurl=file:///mnt/iso
Enabled=1
Gpgcheck=0
[Root@localhost yum.repos.d]# Yum Clean all
[Root@localhost yum.repos.d]# mkdir-p/mnt/iso
[Root@localhost yum.repos.d]# mount-o loop/cudainstall/centos\ 7\ x86_64.iso/mnt/iso/
[Root@localhost yum.repos.d]# vi/etc/rc.local
[Root@localhost yum.repos.d]# chmod +x/etc/rc.d/rc.local
[Root@localhost yum.repos.d]# Cat/etc/rc.lcoa
Cat:/etc/rc.lcoa:aucun fichier ou dossier de ce type
[Root@localhost yum.repos.d]# cat/etc/rc.local
#!/bin/bash
# This FILE was ADDED for compatibility purposes
#
# It is highly advisable to create own SYSTEMD services or Udev rules
# To run scripts during boot instead of the using this file.
#
# In contrast to previous versions due to parallel execution during boot
# This script is not being run after all other services.
#
# Please note the must run ' chmod +x/etc/rc.d/rc.local ' to ensure
# That's this script would be executed during boot.
Mount-o loop/cudainstall/centos\ 7\ x86_64.iso/mnt/iso/
Touch/var/lock/subsys/local
[Root@localhost yum.repos.d]# hostnamectl set-hostname cuda02
[Root@cuda02 ~]# yum install kernel-devel gcc gcc-c++ yum install libx*
Check Nouveau
[Root@cuda01 ~]# lsmod |grep nouveau
If there is output using Modprobe-r nouveau
[ROOT@CUDA01 ~] #init 3
==================================================================================================
Do not install OpenGL when installing Cuda; Remember, it is possible that after the installation, the graphical desktop will not start, the following error message appears in the process
[Root@cuda02 cudainstall]# chmod +x cuda_7.0.28_linux.run
[Root@cuda02 cudainstall]#./cuda_7.0.28_linux.run
Do you accept the previously read EULA? (accept/decline/quit): Accept
Install NVIDIA accelerated Graphics Driver for linux-x86_64 346.46? ((y) es/(n) o/(q) uit): Y
Do you want to install the OpenGL libraries? ((y) es/(n) o/(q) uit) [Default is yes]: n
Install the CUDA 7.0 Toolkit? ((y) es/(n) o/(q) uit): Y
Enter Toolkit Location [default is/usr/local/cuda-7.0]:
Do you want to install a symbolic link At/usr/local/cuda? ((y) es/(n) o/(q) uit): Y
Install the CUDA 7.0 Samples? ((y) es/(n) o/(q) uit): Y
Enter CUDA Samples Location [default Is/root]:
Installing the NVIDIA display driver ...
Installing the CUDA Toolkit in/usr/local/cuda-7.0 ...
Missing Recommended library:libGLU.so
Installing the CUDA Samples in/root ...
Copying Samples To/root/nvidia_cuda-7.0_samples Now ...
Finished copying samples.
===========
= Summary =
===========
Driver:installed
Toolkit:installed in/usr/local/cuda-7.0
Samples:installed In/root, but missing recommended libraries
sure that
-PATH Includes/usr/local/cuda-7.0/bin
-Ld_library_path includes/usr/local/cuda-7.0/lib64, or, add/usr/local/cuda-7.0/lib64 to/etc/ld.so.conf and run Ldcon Fig as Root
To uninstall the CUDA Toolkit, run the uninstall script In/usr/local/cuda-7.0/bin
To uninstall the NVIDIA Driver, run Nvidia-uninstall
Cuda_getting_started_guide_for_linux.pdf In/usr/local/cuda-7.0/doc/pdf For detailed information on setting Up CUDA.
Logfile Is/tmp/cuda_install_2994.log
Installing CUDA Drivers
[Root@cuda02 cudainstall]# chmod +x cuda_7.0.28_linux.run
[Root@cuda02 cudainstall]#./cuda_7.0.28_linux.run
Do you accept the previously read EULA? (accept/decline/quit): Accept
Install NVIDIA accelerated Graphics Driver for linux-x86_64 346.46? ((y) es/(n) o/(q) uit): Y
Do you want to install the OpenGL libraries? ((y) es/(n) o/(q) uit) [Default is yes]: n
Install the CUDA 7.0 Toolkit? ((y) es/(n) o/(q) uit): Y
Enter Toolkit Location [default is/usr/local/cuda-7.0]:
Do you want to install a symbolic link At/usr/local/cuda? ((y) es/(n) o/(q) uit): Y
Install the CUDA 7.0 Samples? ((y) es/(n) o/(q) uit): Y
Enter CUDA Samples Location [default Is/root]:
Installing the NVIDIA display driver ...
Installing the CUDA Toolkit in/usr/local/cuda-7.0 ...
Missing Recommended library:libGLU.so
Installing the CUDA Samples in/root ...
Copying Samples To/root/nvidia_cuda-7.0_samples Now ...
Finished copying samples.
===========
= Summary =
===========
Driver:installed
Toolkit:installed in/usr/local/cuda-7.0
Samples:installed In/root, but missing recommended libraries
sure that
-PATH Includes/usr/local/cuda-7.0/bin
-Ld_library_path includes/usr/local/cuda-7.0/lib64, or, add/usr/local/cuda-7.0/lib64 to/etc/ld.so.conf and run Ldcon Fig as Root
To uninstall the CUDA Toolkit, run the uninstall script In/usr/local/cuda-7.0/bin
To uninstall the NVIDIA Driver, run Nvidia-uninstall
Cuda_getting_started_guide_for_linux.pdf In/usr/local/cuda-7.0/doc/pdf For detailed information on setting Up CUDA.
Logfile Is/tmp/cuda_install_2994.log
Path of the broadcast Cuda
[Root@cuda02 cudainstall]# vi/etc/profile.d/cuda.sh
[Root@cuda02 cudainstall]# cat/etc/profile.d/cuda.sh
Export Path=/usr/local/cuda-7.0/bin: $PATH
Export Ld_library_path= $LD _library_path:/usr/local/cuda-7.0/lib64
[Root@cuda02 cudainstall]# chmod 755/etc/profile.d/cuda.sh
[Root@cuda02 cudainstall]# source/etc/profile.d/cuda.sh
[Root@cuda02 cudainstall]#
=============================================================================================================== ==
Restore graphical interface display
[Root@cuda02 cudainstall]# Init 5
=============================================================================================================== ==
Installing VNC
[root@cuda02 cudainstall]# yum-y Install Tigervnc-server