0%

IBM 收购 Redhat && 咏远有李

时光像指尖的沙漏,不留情面滴匆匆滑落,重阳、霜降马上就要立冬了。

看起来今年好像已经接近尾声了。

经历了春的娇艳/夏的火热/秋的繁华,在冬日的暖阳中又开始喋喋不休了。

今天去办事的时候读到两个消息,一个是蓝色巨人IBM斥资340亿美元收购Linux巨头Red Hat,这应该是今年Microsoft收购Github后的有一个重磅消息,也是开源市场有史以来的最大一次交易,看来free is not free;另一个就是李咏,咏哥是我比较喜欢的主持人,仔细算算好像是真的好久没有见到他了,愿他安息,一路走好,也希望医学界继续能给患者们带来一些福音。

也是在工作中碰到一些需要Linux GNU Build System,所以花了一些时间研究了一下相关内容,絮絮叨叨一些基本够用的知识,其他的做为非主文也是基本够了,OK,是时候开始下一段旅程了….

安装 Parseltongue

下载源码包

MacOSX 安装

1
2
brew install http://www.jive.nl/parseltongue/releases/obit.rb
brew install http://www.jive.nl/parseltongue/releases/parseltongue.rb

Ubuntu安装

1
2
3
$ sudo add-apt-repository ppa:kettenis-w/parseltongue
$ sudo apt-get update
$ sudo apt-get install parseltongue

源码安装

1
2
3
4
5
$ tar zxvf parseltongue-x.x.tar.gz
$ cd parseltongue-x.x
$ ./configure --with-obit=/usr/lib64/obit --prefix=/the/path/you/want/to/install
$ make
$ make install

使用conda

1
2
3
conda create --name python27 python=2.7
conda activate python27
conda install -c kettenis parseltongue

代码参考 https://www.github.com/shaoguangleo/radio_astronomy

探索网络信息的利器 whois

在网络的世界中,虚虚实实,真真假假,了解域名、IP地址的所有者信息是至关重要的。
Linux系统也提供了一个强大的工具whois,它能够查询并展示域名、IP地址的注册信息、所有者以及其他相关细节。

什么是whois命令?

whois是一个用于查询互联网资源的命令行工具。
通过whois命令,用户可以获取关于域名、IP地址和AS号码(Autonomous System Number,自治系统号码)等网络资源的注册信息。
这些信息包括域名的所有者、注册商、注册日期、过期日期等重要数据。

如何使用whois命令?

在Linux终端中,使用whois命令非常简单。

  1. 查询域名信息

    1
    whois example.com

    这将显示example.com域名的注册信息,包括注册商、注册日期、过期日期等。

  2. 查询IP地址信息

    1
    whois 8.8.8.8

    这将显示IP地址8.8.8.8的注册信息,提供该IP地址的所有者和注册信息。

  3. 通过管道和grep过滤需要的信息

    1
    whois example.com | grep "Registrar"

    通过管道和grep命令,可以筛选出包含特定关键词(如”Registrar”)的信息,使查询结果更易读。

注意事项

  • whois提供的信息可能因注册商、注册政策等因素而有所不同,不一定是100%准确的。
  • 有些注册商对whois查询设置了限制,可能会要求输入验证码或限制查询次数。

Windows下的软件 msys2

Software Distribution and Building Platform for Windows

MSYS2 is a collection of tools and libraries providing you with an easy-to-use environment for building, installing and running native Windows software.

详细的参考:

https://www.msys2.org/

Windows下的客户端软件 cmder

Cmderconemumsysgitclink打包在一起,解压即可使用无需配置。可以在 官网 下载。

下载的时候,有两个版本,分别是minifull版;唯一的差别在于有没有内建msysgit工具,这是Git for Windows的标配。我们的Linux子系统中工具齐全,所以下载mini版即可。

cmder 添加到右键菜单

cmder 加到环境变量,然后打开一个cmder命令行窗口,ctrl+T,勾选 Run as administrator,点击Start就打开了一个管理员权限的终端,在新终端中输入以下命令,就可以使用右键打开cmder窗口了。

1
Cmder.exe /REGISTER ALL

设置启动 cmder 时直接运行 bash

打开一个cmder窗口,

1
点击右下角的目录按钮——>Settings——>Startup——>Command line,输入“bash -cur_console:p

lspci 显示当前设备的PCI总线信息

.. note::
东风夜放花千树。更吹落、星如雨
辛弃疾 - 青玉案·元夕

lspci命令用于显示PCI总线的信息,以及所有已连接的PCI设备信息。

官方定义为:

lspci - list all PCI devices

默认情况下,lspci会显示一个简短的设备列表。 使用使用一些参数来显示更详细的输出或供其他程序解析的输出。

不过需要注意的是,在许多操作系统上,对 PCI 配置空间的某些部分的访问仅限于 root,因此普通用户可用的 lspci 功能受到限制。

使用方法为:

1
$ lspci [options]

其中常用的三个选项为:

  • -n 以数字方式显示PCI厂商和设备代码
  • -t 以树状结构显示PCI设备的层次关系
  • -v 显示更详细的输出信息

显示当前主机的所有PCI总线信息:

默认无参数的显示

1
2
3
4
5
6
7
8
9
10
11
$ lspci
00:00.0 Host bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DMI2 (rev 02)
00:01.0 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 1 (rev 02)
00:02.0 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 2 (rev 02)
00:03.0 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 3 (rev 02)
00:03.2 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 3 (rev 02)
00:04.0 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DMA Channel 0 (rev 02)
00:04.1 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DMA Channel 1 (rev 02)
00:04.2 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DMA Channel 2 (rev 02)
......

以数字方式显示PCI厂商和设备代码

以数字形式显示

1
2
3
4
5
6
7
8
9
10
$ lspci -n
00:00.0 0600: 8086:2f00 (rev 02)
00:01.0 0604: 8086:2f02 (rev 02)
00:02.0 0604: 8086:2f04 (rev 02)
00:03.0 0604: 8086:2f08 (rev 02)
00:03.2 0604: 8086:2f0a (rev 02)
00:04.0 0880: 8086:2f20 (rev 02)
00:04.1 0880: 8086:2f21 (rev 02)
00:04.2 0880: 8086:2f22 (rev 02)
......

同时显示数字方式还有设备代码信息

1
2
3
4
5
6
7
8
9
10
$ lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DMI2 [8086:2f00] (rev 02)
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 1 [8086:2f02] (rev 02)
00:02.0 PCI bridge [0604]: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 2 [8086:2f04] (rev 02)
00:03.0 PCI bridge [0604]: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 3 [8086:2f08] (rev 02)
00:03.2 PCI bridge [0604]: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 3 [8086:2f0a] (rev 02)
00:04.0 System peripheral [0880]: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DMA Channel 0 [8086:2f20] (rev 02)
00:04.1 System peripheral [0880]: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DMA Channel 1 [8086:2f21] (rev 02)
00:04.2 System peripheral [0880]: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DMA Channel 2 [8086:2f22] (rev 02)
......

以树状结构显示PCI设备的层次关系:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$ lspci -t
lspci -t
-+-[0000:ff]-+-08.0
| +-08.2
| +-1f.0
| \-1f.2
+-[0000:80]-+-01.0-[81]----00.0
| +-04.0
| +-05.1
| +-05.2
| \-05.4
+-[0000:7f]-+-08.0
| +-08.2
| +-0c.1
\+-0c.2

真假转换之间 tr

.. note::
假作真时真亦假,无为有处有还无。
曹雪芹《红楼梦》

Linux tr 命令用于转换或删除字符。

tr 命令可以从标准输入读取数据,经过字符串转译后,将结果输出到标准输出。

官方定义为:

tr - translate or delete characters

使用方法为:

1
$ tr [OPTION]... SET1 [SET2]

其中常用的三个选项为:

  • -d, --delete:删除指令字符
  • [:lower:] :所有小写字母
  • [:upper:] :所有大写字母
  • [:blank:] :所有空格

a-z小写全部转换为大写

默认无参数的显示

1
2
3
4
5
6
$ echo "Hello World, Welcome to Linux!" | tr a-z A-Z
HELLO WORLD, WELCOME TO LINUX!

# 还有一种方法
$ echo "Hello World, Welcome to Linux!" | tr [:lower:] [:upper:]
HELLO WORLD!

A-Z大写全部转换为小写

默认无参数的显示

1
2
3
4
5
6
$ echo "Hello World, Welcome to Linux!" | tr  A-Z a-z
hello world, welcome to linux!

# 还有一种方法
$ echo "Hello World, Welcome to Linux!" | tr [:upper:] [:lower:]
hello world, welcome to linux!

貌似起名可以用这个

很多变量或者函数起名字都会移除元音字符,可以考虑使用-d参数,如下:

1
2
$ echo "Hello World, Welcome to Linux!" | tr -d a,o,e,i
Hll Wrld Wlcm t Lnux!

不过感觉删除的多了,也不一定是好事。。。

比如里外看Wlcm不晓得啥意思

移除文件中的所有空格

同理,使用-d,结合[:blank:]可以快速删除所有空格。

1
2
$ echo "Hello World, Welcome to Linux!" | tr -d [:blank:]
HelloWorld,WelcometoLinux!

快速确定CentOS/RHEL的系统版本

你是否清楚的知道目前你使用的CentOS/RHEL的系统版本呢?

或许你认为系统版本对你而言不是很重要,不过如果涉及到bug修改,驱动支持,软件配置的问题,你就需要很清楚的知道到底属于哪个发行版,内核版本是多少了。

对于系统管理员这个问题可能比较简单,如果你是个小白,给你提供几个方法来快速确定吧。

uname命令

1
2
3
4
$ uname -or
3.10.0-693.17.1.el7.x86_64 GNU/Linux
$ uname -a
Linux local 3.10.0-693.17.1.el7.x86_64 #1 SMP Thu Jan 25 20:13:58 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

$uname$主要用于打印系统的信息,其中$-a$表示打印所有信息,$-or$表示打印操作系统和内核版本信息。

RPM命令

$RPM$为$Red\ Hat\ Package\ Manager$的缩写,是类Redhat系统普遍使用的软件包管理程序,我们可以使用它来确定CentOS/RHEL的发行版本。

1
2
$rpm --query centos-release/redhat-release
centos-release-7-4.1708.el7.centos.x86_64

hostnamectl命令

1
2
3
4
5
6
7
8
9
10
$ hostnamectl
Static hostname: local
Icon name: computer-server
Chassis: server
Machine ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Boot ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-693.17.1.el7.x86_64
Architecture: x86-64

lsb_release命令

lsb_release命令显示一些$LSB$ (Linux Standard Base)和发行信息。

如果这个命令找不到,可能需要安装一下yum install redhat-lsb

1
2
$ lsb_release -d
Description: CentOS Linux release 7.4.1708 (Core)

通过查看系统文件

上面的一些命令都是通过检索系统的一些信息来得到,我们也可以通过系统本身的文件直接获取,如下所示:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$ cat /etc/centos-release
CentOS Linux release 7.4.1708 (Core)

$ cat /etc/system-release
CentOS Linux release 7.4.1708 (Core)

$ cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

[TOC]

NVIDIA

Nvidia显卡驱动安装

CentOS7/RHEL

安装依赖包

1
2
3
yum -y update
yum -y groupinstall "GNOME Desktop" "Development Tools"
yum -y install kernel-devel

下载最新的NVIDIA驱动,==> http://www.nvidia.com/object/unix.html ==> Latest Long Lived Branch version

增加自动内核编辑的选项

1
2
yum -y install epel-release
yum -y install dkms

重新启动系统确保系统使用的为最新的内核版本。

编辑 /etc/default/grub在 “GRUB_CMDLINE_LINUX”增加rd.driver.blacklist=nouveau nouveau.modeset=0

更新包含上述更改的grub文件

1
grub2-mkconfig -o /boot/grub2/grub.cfg

编辑或创建文件`/etc/modprobe.d/blacklist.conf并增加内容blacklist nouveau

备份旧的initramfs文件并创建一个新的

1
2
3
4
mv /boot/initramfs-(uname -r).img /boot/initramfs-(uname -r)-nouveau.img

dracut /boot/initramfs-$(uname -r).img $(uname -r)

重启机器,切换到文本模式,systemctl isolate multi-user.target,运行sh NVIDIA-Linux-x86_64-*.run,选项全部选yes即可。

CUDA Toolkit安装

Redhat/CentOS

下载最新的CUDA Toolkit文件 (run文件,不要下载rpm)
==> https://developer.nvidia.com/cuda-downloads ==> Linux ==> x86_64 ==> RHEL/CentOS ==> 7 ==> runfile (local)

sh cuda_*.run
在安装NVIDIA driver的时候选no,因为我们已经在前面安装了,一般CUDA内置的会旧一些。其他选项默认即可。

添加环境变量:

1
2
3
$ export PATH=/usr/local/cuda-9.2/bin:$PATH
$ export LD_LIBRARY_PATH=/usr/local/cuda-9.2/lib64:$LD_LIBRARY_PATH

过程

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
sudo ./cuda_9.2.88_396.26_linux.run 
Logging to /tmp/cuda_install_6554.log
Using more to view the EULA.
End User License Agreement
--------------------------


Preface
-------

The Software License Agreement in Chapter 1 and the Supplement
in Chapter 2 contain license terms and conditions that govern
the use of NVIDIA software. By accepting this agreement, you
agree to comply with all the terms and conditions applicable
to the product(s) included herein.


NVIDIA Driver


Description

This package contains the operating system driver and
fundamental system software components for NVIDIA GPUs.


NVIDIA CUDA Toolkit


Description

The NVIDIA CUDA Toolkit provides command-line and graphical
tools for building, debugging and optimizing the performance
of applications accelerated by NVIDIA GPUs, runtime and math
libraries, and documentation including programming guides,
user manuals, and API references.


Default Install Location of CUDA Toolkit

Windows platform:

%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v#.#

Linux platform:

/usr/local/cuda-#.#

Mac platform:

/Developer/NVIDIA/CUDA-#.#


NVIDIA CUDA Samples


Description

This package includes over 100+ CUDA examples that demonstrate
various CUDA programming principles, and efficient CUDA
implementation of algorithms in specific application domains.


Default Install Location of CUDA Samples

Windows platform:

%ProgramData%\NVIDIA Corporation\CUDA Samples\v#.#

Linux platform:

/usr/local/cuda-#.#/samples

and

$HOME/NVIDIA_CUDA-#.#_Samples

Mac platform:

/Developer/NVIDIA/CUDA-#.#/samples


NVIDIA Nsight Visual Studio Edition (Windows only)


Description

NVIDIA Nsight Development Platform, Visual Studio Edition is a
development environment integrated into Microsoft Visual
Studio that provides tools for debugging, profiling, analyzing
and optimizing your GPU computing and graphics applications.


Default Install Location of Nsight Visual Studio Edition

Windows platform:

%ProgramFiles(x86)%\NVIDIA Corporation\Nsight Visual Studio Edition #.#


1. NVIDIA Software License Agreement
------------------------------------


Release Date: October 20, 2016
------------------------------


IMPORTANT NOTICE -- READ BEFORE DOWNLOADING, INSTALLING,
COPYING OR USING THE LICENSED SOFTWARE:
--------------------------------------------------------

This Software License Agreement ("SLA”), made and entered
into as of the time and date of click through action
(“Effective Date”), is a legal agreement between you and
NVIDIA Corporation ("NVIDIA") and governs the use of the
NVIDIA computer software and the documentation made available
for use with such NVIDIA software. By downloading, installing,
copying, or otherwise using the NVIDIA software and/or
documentation, you agree to be bound by the terms of this SLA.
If you do not agree to the terms of this SLA, do not download,
install, copy or use the NVIDIA software or documentation. IF
YOU ARE ENTERING INTO THIS SLA ON BEHALF OF A COMPANY OR OTHER
LEGAL ENTITY, YOU REPRESENT THAT YOU HAVE THE LEGAL AUTHORITY
TO BIND THE ENTITY TO THIS SLA, IN WHICH CASE “YOU” WILL
MEAN THE ENTITY YOU REPRESENT. IF YOU DON’T HAVE SUCH
AUTHORITY, OR IF YOU DON’T ACCEPT ALL THE TERMS AND
CONDITIONS OF THIS SLA, THEN NVIDIA DOES NOT AGREE TO LICENSE
THE LICENSED SOFTWARE TO YOU, AND YOU MAY NOT DOWNLOAD,
INSTALL, COPY OR USE IT.


1.1. License


1.1.1. License Grant

Subject to the terms of the AGREEMENT, NVIDIA hereby grants
you a non-exclusive, non-transferable license, without the
right to sublicense (except as expressly set forth in a
Supplement), during the applicable license term unless earlier
terminated as provided below, to have Authorized Users install
and use the Software, including modifications (if expressly
permitted in a Supplement), in accordance with the
Documentation. You are only licensed to activate and use
Licensed Software for which you a have a valid license, even
if during the download or installation you are presented with
other product options. No Orders are binding on NVIDIA until
accepted by NVIDIA. Your Orders are subject to the AGREEMENT.

SLA Supplements

Certain Licensed Software licensed under this SLA may be
subject to additional terms and conditions that will be
presented to you in a Supplement for acceptance prior to the
delivery of such Licensed Software under this SLA and the
applicable Supplement. Licensed Software will only be
delivered to you upon your acceptance of all applicable terms.


1.1.2. Limited Purposes Licenses

If your license is provided for one of the purposes indicated
below, then notwithstanding contrary terms in Section 1.1 or
in a Supplement, such licenses are for internal use and do not
include any right or license to sub-license and distribute the
Licensed Software or its output in any way in any public
release, however limited, and/or in any manner that provides
third parties with use of or access to the Licensed Software
or its functionality or output, including (but not limited to)
external alpha or beta testing or development phases. Further:

1.

Evaluation License: You may use evaluation licenses solely
for your internal evaluation of the Licensed Software for
broader adoption within your Enterprise or in connection
with a NVIDIA product purchase decision, and such licenses
have an expiration date as indicated by NVIDIA in its sole
discretion (or ninety days from the date of download if no
other duration is indicated).

2.

Educational/Academic License: You may use
educational/academic licenses solely for educational
purposes and all users must be enrolled or employed by an
academic institution. If you do not meet NVIDIA’s
academic program requirements for educational
institutions, you have no rights under this license.

3.

Test/Development License. You may use test/development
licenses solely for your internal development, testing
and/or debugging of your software applications or for
interoperability testing with the Licensed Software, and
such licenses have an expiration date as indicated by
NVIDIA in its sole discretion (or one year from the date
of download if no other duration is indicated). NVIDIA
Confidential Information under the AGREEMENT includes
output from Licensed Software developer tools identified
as “Pro” versions, where the output reveals
functionality or performance data pertinent to NVIDIA
hardware or software products.


1.1.3. Pre-release Licenses

With respect to alpha, beta, preview, and other pre-release
Software and Documentation (“Pre-Release Licensed
Software”) delivered to you under the AGREEMENT you
acknowledge and agree that such Pre-Release Licensed Software
(i) may not be fully functional, may contain errors or design
flaws, and may have reduced or different security, privacy,
accessibility, availability, and reliability standards
relative to commercially provided NVIDIA software and
documentation, and (ii) use of such Pre-Release Licensed
Software may result in unexpected results, loss of data,
project delays or other unpredictable damage or loss.
THEREFORE, PRE-RELEASE LICENSED SOFTWARE IS NOT INTENDED FOR
USE, AND SHOULD NOT BE USED, IN PRODUCTION OR
BUSINESS-CRITICAL SYSTEMS. NVIDIA has no obligation to make
available a commercial version of any Pre-Release Licensed
Software and NVIDIA has the right to abandon development of
Pre-Release Licensed Software at any time without liability.


1.1.4. Enterprise and Contractor Usage

You may allow your Enterprise employees and Contractors to
access and use the Licensed Software pursuant to the terms of
the AGREEMENT solely to perform work on your behalf, provided
further that with respect to Contractors: (i) you obtain a
written agreement from each Contractor which contains terms
and obligations with respect to access to and use of Licensed
Software no less protective of NVIDIA than those set forth in
the AGREEMENT, and (ii) such Contractor’s access and use
expressly excludes any sublicensing or distribution rights for
the Licensed Software. You are responsible for the compliance
with the terms and conditions of the AGREEMENT by your
Enterprise and Contractors. Any act or omission that, if
committed by you, would constitute a breach of the AGREEMENT
shall be deemed to constitute a breach of the AGREEMENT if
committed by your Enterprise or Contractors.


1.1.5. Services

Except as expressly indicated in an Order, NVIDIA is under no
obligation to provide support for the Licensed Software or to
provide any patches, maintenance, updates or upgrades under
the AGREEMENT. Unless patches, maintenance, updates or
upgrades are provided with their separate governing terms and
conditions, they constitute Licensed Software licensed to you
under the AGREEMENT.


1.2. Limitations


1.2.1. License Restrictions

Except as expressly authorized in the AGREEMENT, you agree
that you will not (nor authorize third parties to): (i) copy
and use Software that was licensed to you for use in one or
more NVIDIA hardware products in other unlicensed products
(provided that copies solely for backup purposes are allowed);
(ii) reverse engineer, decompile, disassemble (except to the
extent applicable laws specifically require that such
activities be permitted) or attempt to derive the source code,
underlying ideas, algorithm or structure of Software provided
to you in object code form; (iii) sell, transfer, assign,
distribute, rent, loan, lease, sublicense or otherwise make
available the Licensed Software or its functionality to third
parties (a) as an application services provider or service
bureau, (b) by operating hosted/virtual system environments,
(c) by hosting, time sharing or providing any other type of
services, or (d) otherwise by means of the internet; (iv)
modify, translate or otherwise create any derivative works of
any Licensed Software; (v) remove, alter, cover or obscure any
proprietary notice that appears on or with the Licensed
Software or any copies thereof; (vi) use the Licensed
Software, or allow its use, transfer, transmission or export
in violation of any applicable export control laws, rules or
regulations; (vii) distribute, permit access to, or sublicense
the Licensed Software as a stand-alone product; (viii) bypass,
disable, circumvent or remove any form of copy protection,
encryption, security or digital rights management or
authentication mechanism used by NVIDIA in connection with the
Licensed Software, or use the Licensed Software together with
any authorization code, serial number, or other copy
protection device not supplied by NVIDIA directly or through
an authorized reseller; (ix) use the Licensed Software for the
purpose of developing competing products or technologies or
assisting a third party in such activities; (x) use the
Licensed Software with any system or application where the use
or failure of such system or application can reasonably be
expected to threaten or result in personal injury, death, or
catastrophic loss including, without limitation, use in
connection with any nuclear, avionics, navigation, military,
medical, life support or other life critical application
(“Critical Applications”), unless the parties have entered
into a Critical Applications agreement; (xi) distribute any
modification or derivative work you make to the Licensed
Software under or by reference to the same name as used by
NVIDIA; or (xii) use the Licensed Software in any manner that
would cause the Licensed Software to become subject to an Open
Source License. Nothing in the AGREEMENT shall be construed to
give you a right to use, or otherwise obtain access to, any
source code from which the Software or any portion thereof is
compiled or interpreted. You acknowledge that NVIDIA does not
design, test, manufacture or certify the Licensed Software for
use in the context of a Critical Application and NVIDIA shall
not be liable to you or any third party, in whole or in part,
for any claims or damages arising from such use. You agree to
defend, indemnify and hold harmless NVIDIA and its Affiliates,
and their respective employees, contractors, agents, officers
and directors, from and against any and all claims, damages,
obligations, losses, liabilities, costs or debt, fines,
restitutions and expenses (including but not limited to
attorney’s fees and costs incident to establishing the right
of indemnification) arising out of or related to you and your
Enterprise, and their respective employees, contractors,
agents, distributors, resellers, end users, officers and
directors use of Licensed Software outside of the scope of the
AGREEMENT or any other breach of the terms of the AGREEMENT.


1.2.2. Third Party License Obligations

You acknowledge and agree that the Licensed Software may
include or incorporate third party technology (collectively
“Third Party Components”), which is provided for use in or
with the Software and not otherwise used separately. If the
Licensed Software includes or incorporates Third Party
Components, then the third-party pass-through terms and
conditions (“Third Party Terms”) for the particular Third
Party Component will be bundled with the Software or otherwise
made available online as indicated by NVIDIA and will be
incorporated by reference into the AGREEMENT. In the event of
any conflict between the terms in the AGREEMENT and the Third
Party Terms, the Third Party Terms shall govern. Copyright to
Third Party Components are held by the copyright holders
indicated in the copyright notices indicated in the Third
Party Terms.

Audio/Video Encoders and Decoders

You acknowledge and agree that it is your sole responsibility
to obtain any additional third party licenses required to
make, have made, use, have used, sell, import, and offer for
sale your products or services that include or incorporate any
Third Party Components and content relating to audio and/or
video encoders and decoders from, including but not limited
to, Microsoft, Thomson, Fraunhofer IIS, Sisvel S.p.A.,
MPEG-LA, and Coding Technologies as NVIDIA does not grant to
you under the AGREEMENT any necessary patent or other rights
with respect to audio and/or video encoders and decoders.


1.2.3. Limited Rights

Your rights in the Licensed Software are limited to those
expressly granted under the AGREEMENT and no other licenses
are granted whether by implication, estoppel or otherwise.
NVIDIA reserves all rights, title and interest in and to the
Licensed Software not expressly granted under the AGREEMENT.


1.3. Confidentiality

Neither party will use the other party’s Confidential
Information, except as necessary for the performance of the
AGREEMENT, nor will either party disclose such Confidential
Information to any third party, except to personnel of NVIDIA
and its Affiliates, you, your Enterprise, your Enterprise
Contractors, and each party’s legal and financial advisors
that have a need to know such Confidential Information for the
performance of the AGREEMENT, provided that each such
personnel, employee and Contractor is subject to a written
agreement that includes confidentiality obligations consistent
with those set forth herein. Each party will use all
reasonable efforts to maintain the confidentiality of all of
the other party’s Confidential Information in its possession
or control, but in no event less than the efforts that it
ordinarily uses with respect to its own Confidential
Information of similar nature and importance. The foregoing
obligations will not restrict either party from disclosing the
other party’s Confidential Information or the terms and
conditions of the AGREEMENT as required under applicable
securities regulations or pursuant to the order or requirement
of a court, administrative agency, or other governmental body,
provided that the party required to make such disclosure (i)
gives reasonable notice to the other party to enable it to
contest such order or requirement prior to its disclosure
(whether through protective orders or otherwise), (ii) uses
reasonable effort to obtain confidential treatment or similar
protection to the fullest extent possible to avoid such public
disclosure, and (iii) discloses only the minimum amount of
information necessary to comply with such requirements.


1.4. Ownership

You are not obligated to disclose to NVIDIA any modifications
that you, your Enterprise or your Contractors make to the
Licensed Software as permitted under the AGREEMENT. As between
the parties, all modifications are owned by NVIDIA and
licensed to you under the AGREEMENT unless otherwise expressly
provided in a Supplement. The Licensed Software and all
modifications owned by NVIDIA, and the respective Intellectual
Property Rights therein, are and will remain the sole and
exclusive property of NVIDIA or its licensors, whether the
Licensed Software is separate from or combined with any other
products or materials. You shall not engage in any act or
omission that would impair NVIDIA’s and/or its licensors’
Intellectual Property Rights in the Licensed Software or any
Do you accept the previously read EULA?
accept/decline/quit: accept

Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 396.26?
(y)es/(n)o/(q)uit: y

Do you want to install the OpenGL libraries?
(y)es/(n)o/(q)uit [ default is yes ]:

Do you want to run nvidia-xconfig?
This will update the system X configuration file so that the NVIDIA X driver
is used. The pre-existing X configuration file will be backed up.
This option should not be used on systems that require a custom
X configuration, such as systems with multiple GPU vendors.
(y)es/(n)o/(q)uit [ default is no ]: y

Install the CUDA 9.2 Toolkit?
(y)es/(n)o/(q)uit: y

Enter Toolkit Location
[ default is /usr/local/cuda-9.2 ]:

Do you want to install a symbolic link at /usr/local/cuda?
(y)es/(n)o/(q)uit: y

Install the CUDA 9.2 Samples?
(y)es/(n)o/(q)uit: y

Enter CUDA Samples Location
[ default is /home/leo ]: /home/leo/cuda-example

Installing the NVIDIA display driver...
Installing the CUDA Toolkit in /usr/local/cuda-9.2 ...
Missing recommended library: libGLU.so
Missing recommended library: libXi.so
Missing recommended library: libXmu.so

Installing the CUDA Samples in /home/leo/cuda-example ...
Copying samples to /home/leo/cuda-example/NVIDIA_CUDA-9.2_Samples now...
Finished copying samples.

===========
= Summary =
===========

Driver: Installed
Toolkit: Installed in /usr/local/cuda-9.2
Samples: Installed in /home/leo/cuda-example, but missing recommended libraries

Please make sure that
- PATH includes /usr/local/cuda-9.2/bin
- LD_LIBRARY_PATH includes /usr/local/cuda-9.2/lib64, or, add /usr/local/cuda-9.2/lib64 to /etc/ld.so.conf and run ldconfig as root

To uninstall the CUDA Toolkit, run the uninstall script in /usr/local/cuda-9.2/bin
To uninstall the NVIDIA Driver, run nvidia-uninstall

Please see CUDA_Installation_Guide_Linux.pdf in /usr/local/cuda-9.2/doc/pdf for detailed information on setting up CUDA.

Logfile is /tmp/cuda_install_6554.log

问题集锦

  1. ERROR: Unable to load the ‘nvidia-drm’ kernel module.

One probable reason is that the system is boot from UEFI but Secure Boot option is turned on in the BIOS setting. Turn it off and the problem will be solved.

  1. Error: You Appear To Be Running An X Server; Please Exit X Before Installing
    1
    2
    3
    4
    5
    6
    7
    8
    9
    1.按住CTRL+ALT+F1 进入命令行

    2.sudo service lightdm stop 或者 sudo stop lightdm

    3.sudo init 3

    4.安装驱动程序:#: sudo ./NVIDIA-Linux-x86_64-177.67-pkg2.run //当前目录下执行NVIDIA驱动程序

    5.按照提示安装完成,简单方法重启就好了 sudo reboot