forked from rctrh/rh-tthw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrhel6-notes-log.txt
381 lines (266 loc) · 11.8 KB
/
rhel6-notes-log.txt
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
Python
------
Pre-installed.
# yum install python
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Setting up Install Process
Package python-2.6.6-64.el6.x86_64 already installed and latest version
Nothing to do
# yum list installed python\*
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Installed Packages
python.x86_64 2.6.6-64.el6 @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7
python-argparse.noarch 1.2.1-2.1.el6 @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7
# yum list available python\*
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Available Packages
python.i686 2.6.5-3.el6_0.2 rhel-6-server-aus-rpms
$ python
Python 2.6.6 (r266:84292, May 22 2015, 08:34:51)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-15)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print "Hello, Red Hat Developers World!"
Hello, Red Hat Developers World!
>>> quit()
$ cat hello-py26.py
#!/usr/bin/env python
import sys
version = "Python %d.%d" % (sys.version_info[0], sys.version_info[1])
print "Hello, Red Hat Developers World from" + version
$ ./hello-py26.py
Hello, Red Hat Developers World fromPython 2.6
PERL
# yum install perl
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Setting up Install Process
Package 4:perl-5.10.1-141.el6.x86_64 already installed and latest version
# yum list installed perl\*
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Installed Packages
perl.x86_64 4:5.10.1-141.el6 @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7
$ ./hello.pl
Hello, Red Hat Developers World from Perl v5.10.1
$ perl -v
This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi
$ ./hello.pl
Hello, Red Hat Developers World from Perl v5.10.1
-------------------------------------------------------------------------
PHP
-------------------------------------------------------------------------
# yum install php
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:5.3.3-46.el6_6 will be installed
# yum list install php\*
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Installed Packages
php.x86_64 5.3.3-46.el6_6 @rhel-6-server-aus-rpms
# yum list available php\*
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Available Packages
php-gd.x86_64 5.3.3-46.el6_6 rhel-6-server-aus-rpms
$ php -v
PHP 5.3.3 (cli) (built: Jul 3 2015 03:10:33)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
$ php -a
Interactive shell
php > printf("Hello, Red Hat Developers World from PHP %s\n", PHP_VERSION);
Hello, Red Hat Developers World from PHP 5.3.3
php > quit
$ ./hello.php
Hello, Red Hat Developers World from PHP 5.3.3
--------------------------------------------------------
Ruby
--------------------------------------------------------
# yum install ruby ruby-irb # ****** Need to install ruby-irb explicitly
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ruby.x86_64 0:1.8.7.374-4.el6_6 will be installed
# yum list installed ruby\*
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Installed Packages
ruby.x86_64 1.8.7.374-4.el6_6 @rhel-6-server-aus-rpms
ruby-libs.x86_64 1.8.7.374-4.el6_6 @rhel-6-server-aus-rpms
[root@localhost ~]# yum list available ruby\*
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Available Packages
ruby-devel.i686 1.8.7.374-4.el6_6 rhel-6-server-aus-rpms
ruby-devel.x86_64 1.8.7.374-4.el6_6 rhel-6-server-aus-rpms
********* NOTE: Ruby-irb not installed by default ***********
$ irb
irb(main):001:0> puts "Hello, Red Hat Developers World from Ruby " + RUBY_VERSION
Hello, Red Hat Developers World from Ruby 1.8.7
=> nil
$ ./hello.rb
Hello, Red Hat Developers World from Ruby 1.8.7
-------------------------------------------------------------
GCC C++ Native
-------------------------------------------------------------
# yum groupinstall 'Development Tools'
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Setting up Group Process
---> Package gcc.x86_64 0:4.4.7-16.el6 will be installed
$ g++ -v
gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC)
$ which g++
/usr/bin/g++
$ g++ -o hello hello.cpp
[rt@localhost hello]$ ./hello
Hello, Red Hat Developers World!
=======================================================================================================================
RHSCL for RHEL 6
=======================================================================================================================
# subscription-manager repos --enable rhel-server-rhscl-6-rpms
Repository 'rhel-server-rhscl-6-rpms' is enabled for this system.
# subscription-manager repos --enable rhel-6-server-optional-rpms
Repository 'rhel-6-server-optional-rpms' is enabled for this system.
# yum install rh-python34
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Setting up Install Process
--> Running transaction check
---> Package rh-python34.x86_64 0:2.0-5.el6 will be installed
$ scl enable rh-python34 bash
[rt@localhost tthw-rhel6]$
[rt@localhost tthw-rhel6]$
[rt@localhost tthw-rhel6]$ python3
Python 3.4.2 (default, Mar 25 2015, 02:43:36)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
$ ./hello.py
Hello, Red Hat Developers World from Python 3.4
--------------------------
PERL SCL
---------------------------
# yum install rh-perl520
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package rh-perl520.x86_64 0:2.0-7.el6 will be installed
$ scl enable rh-perl520 bash
[rt@localhost tthw-rhel6]$ perl -v
This is perl 5, version 20, subversion 1 (v5.20.1) built for x86_64-linux-thread-multi
(with 16 registered patches, see perl -V for more detail)
$ ./hello.pl
Hello, Red Hat Developers World from Perl v5.20.1
**** Tested .bashrc, scl_source works the same.
source scl_source enable rh-perl520
-----------------------------------------------
PHP
------------------------------------------------
# yum install rh-php56
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package rh-php56.x86_64 0:2.0-6.el6 will be installed
$ scl enable rh-php56 bash
[rt@localhost tthw-rhel6]$ php -a
Interactive shell
php > printf("Hello, Red Hat Developers World from PHP %s", PHP_VERSION);
Hello, Red Hat Developers World from PHP 5.6.5
php > quit
[rt@localhost tthw-rhel6]$ ./hello/hello.php
Hello, Red Hat Developers World from PHP 5.6.5
$ which php
/opt/rh/rh-php56/root/usr/bin/php
--------------------
Ruby
--------------------
# yum install rh-ruby22
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package rh-ruby22.x86_64 0:2.0-6.el6 will be installed
$ scl enable rh-ruby22 bash
[rt@localhost tthw-rhel6]$ irb
irb(main):001:0> puts "Hello, Red Hat Developers World from Ruby " + PHP_VERSION
NameError: uninitialized constant PHP_VERSION
from (irb):1
from /opt/rh/rh-ruby22/root/usr/bin/irb:11:in `<main>'
irb(main):002:0>
irb(main):003:0* quit
[rt@localhost tthw-rhel6]$ irb
irb(main):001:0> puts "Hello, Red Hat Developers World from Ruby " + RUBY_VERSION
Hello, Red Hat Developers World from Ruby 2.2.2
=> nil
irb(main):002:0> quit
$ ./hello/hello.rb
Hello, Red Hat Developers World from Ruby 2.2.2
-------------------------------------
Node.js
-------------------------------------
# yum install nodejs010
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Setting up Install Process
Package nodejs010-2.0-3.el6.x86_64 already installed and latest version
** Missed the install, it scrolled off. ***
$ scl enable nodejs010 bash
[rt@localhost tthw-rhel6]$ node --version
v0.10.35
[rt@localhost tthw-rhel6]$ node ./hello/hello.
hello.cpp hello.js hello.js~ hello.php hello.php~ hello.pl hello.py hello.py~ hello.rb
[rt@localhost tthw-rhel6]$ node ./hello/hello.js
Hello, Red Hat Developers World!
$ node ./hello/hello-http.js
Server running at http://127.0.0.1:8000/
[rt@localhost tthw-rhel6]$ scl --list
nodejs010
rh-perl520
rh-php56
rh-python34
rh-ruby22
v8314
===========================================
DTS/RHSCL Eclipse / G++ / C++
===========================================
# yum install devtoolset-3-toolchain
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package devtoolset-3-toolchain.x86_64 0:3.1-12.el6 will be installed
$ scl enable devtoolset-3 bash
[rt@localhost tthw-rhel6]$ which gcc
/usr/bin/gcc
[rt@localhost tthw-rhel6]$ which g++
/usr/bin/g++
[rt@localhost tthw-rhel6]$ scl enable rh-php56 bash
[rt@localhost tthw-rhel6]$ exit
exit
[rt@localhost tthw-rhel6]$ exit
exit
[rt@localhost tthw-rhel6]$ scl enable devtoolset-3 bash
[rt@localhost tthw-rhel6]$
[rt@localhost tthw-rhel6]$ which gcc
/opt/rh/devtoolset-3/root/usr/bin/gcc
[rt@localhost tthw-rhel6]$ which g++
/opt/rh/devtoolset-3/root/usr/bin/g++
[rt@localhost tthw-rhel6]$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-3/root/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/opt/rh/devtoolset-3/root/usr --mandir=/opt/rh/devtoolset-3/root/usr/share/man --infodir=/opt/rh/devtoolset-3/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,fortran,lto --enable-plugin --with-linker-hash-style=gnu --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/cloog-install --with-mpc=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/mpc-install --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.9.2 20150212 (Red Hat 4.9.2-6) (GCC)
[rt@localhost tthw-rhel6]$ cd hello/
[rt@localhost hello]$ g++ -o hello hello.cpp
[rt@localhost hello]$ ./hello
Hello, Red Hat Developers World!
# yum install devtoolset-3
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Setting up Install Process
Package devtoolset-3-3.1-12.el6.x86_64 already installed and latest version
Nothing to do
DTS is on menu under Programming
Ran into a problem that run wouldn't work for some reason had to change to "production" from "debug" then it worked ?!?.
"Unable to launch, no recent ...?" saved screenshot
Had to touch run configurations