os: ubuntu 16.04


사전 요구 사항: ROOT CA 키 발급이 되어 있어야 함


개인키

1.

1
2
# mkdir -p /etc/pki/tls/private
 
cs



2.

1
2
3
4
5
6
7
8
# openssl genrsa -aes256 -out /etc/pki/tls/private/server.key 2048
Generating RSA private key, 2048 bit long modulus
.......................................................................+++
.......................................+++
e is 65537 (0x10001)
Enter pass phrase for /etc/pki/tls/private/server.key:
Verifying - Enter pass phrase for /etc/pki/tls/private/server.key:
 
cs



3.

1
2
# chmod 600 /etc/pki/tls/private/server.key
 
cs



4.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# openssl req -new -key /etc/pki/tls/private/server.key -out /etc/pki/tls/certs/server.csr
Enter pass phrase for /etc/pki/tls/private/server.key:
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:Kr
State or Province Name (full name) [Some-State]:
Locality Name (eg, city) []:Seoul
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
Organizational Unit Name (eg, section) []:DevOps
Common Name (e.g. server FQDN or YOUR name) []:rabbit.kr
Email Address []:admin@rabbit.kr
 
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
 
cs



5. root ca 개인키로 서명

1
2
3
4
5
6
# openssl x509 -req -days 1825 -extensions v3_user -in /etc/pki/tls/certs/server.csr -CA /etc/pki/tls/certs/rootca.crt -CAcreateserial -CAkey /etc/pki/tls/private/rootca.key -out /etc/pki/tls/certs/server.crt
Signature ok
subject=/C=Kr/ST=Some-State/L=Seoul/O=Internet Widgits Pty Ltd/OU=DevOps/CN=rabbit.kr/emailAddress=admin@rabbit.kr
Getting CA Private Key
Enter pass phrase for /etc/pki/tls/private/rootca.key:
 
cs



6. 생성 여부 확인

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# openssl x509 -text -in /etc/pki/tls/certs/server.crt
Certificate:
    Data:
        Version: 1 (0x0)
        Serial Number: 12213494513153143114 (0xa97f0c8cc2acf14a)
    Signature Algorithm: sha256WithRSAEncryption
        Issuer: C=Kr, ST=Some-State, L=Seoul, O=Internet Widgits Pty Ltd, OU=DevOps, CN=rabbit.kr/emailAddress=admin@rabbit.kr
        Validity
            Not Before: Jun 21 05:46:43 2018 GMT
            Not After : Jun 20 05:46:43 2023 GMT
        Subject: C=Kr, ST=Some-State, L=Seoul, O=Internet Widgits Pty Ltd, OU=DevOps, CN=rabbit.kr/emailAddress=admin@rabbit.kr
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (2048 bit)
                Modulus:
                    ...
                Exponent: 65537 (0x10001)
    Signature Algorithm: sha256WithRSAEncryption
         ...
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
 
cs



'Operating System > SSL & TLS' 카테고리의 다른 글

ROOT CA 인증서 생성  (0) 2018.06.21


os: ubuntu 16.04


개인키

1.

1
2
# mkdir -p /etc/pki/tls/private
 
cs



2.

1
2
3
4
5
6
7
8
# openssl genrsa -aes256 -out /etc/pki/tls/private/rootca.key 2048
Generating RSA private key, 2048 bit long modulus
......................+++
.............................................................................................+++
e is 65537 (0x10001)
Enter pass phrase for /etc/pki/tls/private/rootca.key:
Verifying - Enter pass phrase for /etc/pki/tls/private/rootca.key:
 
cs


3.

1
2
# chmod 600 /etc/pki/tls/private/rootca.key
 
cs



공개키

4.

1
2
# mkdir /etc/pki/tls/certs
 
cs



5.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# openssl req -new -key /etc/pki/tls/private/rootca.key -out /etc/pki/tls/certs/rootca.csr
Enter pass phrase for /etc/pki/tls/private/rootca.key:
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:Kr
State or Province Name (full name) [Some-State]:
Locality Name (eg, city) []:Seoul
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
Organizational Unit Name (eg, section) []:DevOps
Common Name (e.g. server FQDN or YOUR name) []:rabbit.kr
Email Address []:admin@rabbit.kr
 
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
 
cs


인증서 기한 및 self-signed 인증서 생성

6.

1
2
3
4
5
6
7
8
9
10
11
12
# openssl x509 -req \
> -days 3650 \
> -extensions v3_ca \
> -set_serial 1 \
> -in /etc/pki/tls/certs/rootca.csr \
> -signkey /etc/pki/tls/private/rootca.key \
> -out /etc/pki/tls/certs/rootca.crt
Signature ok
subject=/C=Kr/ST=Some-State/L=Seoul/O=Internet Widgits Pty Ltd/OU=DevOps/CN=rabbit.kr/emailAddress=admin@rabbit.kr
Getting Private key
Enter pass phrase for /etc/pki/tls/private/rootca.key:
 
cs



7. 생성 여부 확인

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# openssl x509 -text -in /etc/pki/tls/certs/rootca.crt
Certificate:
    Data:
        Version: 1 (0x0)
        Serial Number: 1 (0x1)
    Signature Algorithm: sha256WithRSAEncryption
        Issuer: C=Kr, ST=Some-State, L=Seoul, O=Internet Widgits Pty Ltd, OU=DevOps, CN=rabbit.kr/emailAddress=admin@rabbit.kr
        Validity
            Not Before: Jun 21 05:26:14 2018 GMT
            Not After : Jun 18 05:26:14 2028 GMT
        Subject: C=Kr, ST=Some-State, L=Seoul, O=Internet Widgits Pty Ltd, OU=DevOps, CN=rabbit.kr/emailAddress=admin@rabbit.kr
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (2048 bit)
                Modulus:
                    ...
                Exponent: 65537 (0x10001)
    Signature Algorithm: sha256WithRSAEncryption
         ...
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
 
cs


'Operating System > SSL & TLS' 카테고리의 다른 글

SSL 인증서 생성  (0) 2018.06.21

사전 준비 사항: Domain Name Server

1. 공유기 관리자 페이지 로그인


2.


3. 아래의 이미지와 다소 상이할 수 있지만 다음 "기본 DNS 주소" 혹은 "보조 DNS 주소"에 해당 네임 서버의 IP를 입력합니다.









os: windows 10

node: 7.4.0


1. node.js를 시작할 폴더의 경로를 지정하여 다음의 명령어를 실행합니다.

npm은 프로젝트 구성을 위해 몇 가지 파라미터를 요청하므로 적절히 입력 후 엔터

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
C:\Users\Admin\Downloads\node>npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
 
See `npm help json` for definitive documentation on these fields
and exactly what they do.
 
Use `npm install <pkg> --save` afterwards to install a package and
save it as a dependency in the package.json file.
 
Press ^C at any time to quit.
name: (node) rabbit
version: (1.0.0)
description:
entry point: (index.js)
test command:
git repository:
keywords:
author:
license: (ISC)
About to write to C:\Users\Admin\Downloads\node\package.json:
 
{
  "name": "rabbit",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC"
}
 
 
Is this ok? (yes) yes
 
cs



2. 2~3번 과정은 추후 사용할 프레임워크 및 툴이므로 필요치 않을 경우 하지 않아도 무방합니다.

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
C:\Users\Admin\Downloads\node>npm install --save seneca
rabbit@1.0.0 C:\Users\Admin\Downloads\node
`-- seneca@3.6.0
  +-- archy@1.0.0
  +-- eraro@1.0.0
  +-- gate-executor@1.1.1
  +-- gex@0.3.0
  +-- json-stringify-safe@5.0.1
  +-- jsonic@0.3.0
  +-- lodash@4.17.10
  +-- minimist@1.2.0
  +-- nid@0.3.2
  +-- norma@0.4.1
  +-- ordu@0.1.1
  +-- patrun@1.0.0
  +-- qs@6.5.2
  +-- rolling-stats@0.1.1
  +-- semver@5.5.0
  +-- seneca-transport@2.3.0
  | +-- lru-cache@4.1.3
  | | +-- pseudomap@1.0.2
  | | `-- yallist@2.1.2
  | +-- ndjson@1.5.0
  | | +-- split2@2.2.0
  | | `-- through2@2.0.3
  | |   +-- readable-stream@2.3.6
  | |   | +-- core-util-is@1.0.2
  | |   | +-- inherits@2.0.3
  | |   | +-- isarray@1.0.0
  | |   | +-- process-nextick-args@2.0.0
  | |   | +-- safe-buffer@5.1.2
  | |   | +-- string_decoder@1.1.1
  | |   | `-- util-deprecate@1.0.2
  | |   `-- xtend@4.0.1
  | `-- reconnect-core@1.3.0
  |   `-- backoff@2.5.0
  |     `-- precond@0.2.3
  +-- use-plugin@1.0.2
  `-- wreck@12.5.1
    +-- boom@5.2.0
    `-- hoek@4.2.1
 
npm WARN rabbit@1.0.0 No description
npm WARN rabbit@1.0.0 No repository field.
 
cs



3.

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
C:\Users\Admin\Downloads\node>npm install -g pm2
C:\Users\Admin\AppData\Roaming\npm\pm2-runtime -> C:\Users\Admin\AppData\Roaming\npm\node_modules\pm2\bin\pm2-runtime
C:\Users\Admin\AppData\Roaming\npm\pm2-dev -> C:\Users\Admin\AppData\Roaming\npm\node_modules\pm2\bin\pm2-dev
C:\Users\Admin\AppData\Roaming\npm\pm2-docker -> C:\Users\Admin\AppData\Roaming\npm\node_modules\pm2\bin\pm2-docker
C:\Users\Admin\AppData\Roaming\npm\pm2 -> C:\Users\Admin\AppData\Roaming\npm\node_modules\pm2\bin\pm2
C:\Users\Admin\AppData\Roaming\npm
`-- pm2@2.10.4
  +-- async@2.6.1
  | `-- lodash@4.17.10
  +-- blessed@0.1.81
  +-- chalk@1.1.3
  | +-- ansi-styles@2.2.1
  | +-- escape-string-regexp@1.0.5
  | +-- has-ansi@2.0.0
  | | `-- ansi-regex@2.1.1
  | +-- strip-ansi@3.0.1
  | `-- supports-color@2.0.0
  +-- chokidar@2.0.3
  | +-- anymatch@2.0.0
  | | `-- micromatch@3.1.10
  | |   +-- arr-diff@4.0.0
  | |   +-- define-property@2.0.2
  | |   | `-- is-descriptor@1.0.2
  | |   |   +-- is-accessor-descriptor@1.0.0
  | |   |   `-- is-data-descriptor@1.0.0
  | |   +-- extend-shallow@3.0.2
  | |   | +-- assign-symbols@1.0.0
  | |   | `-- is-extendable@1.0.1
  | |   |   `-- is-plain-object@2.0.4
  | |   +-- extglob@2.0.4
  | |   | +-- define-property@1.0.0
  | |   | | `-- is-descriptor@1.0.2
  | |   | |   +-- is-accessor-descriptor@1.0.0
  | |   | |   `-- is-data-descriptor@1.0.0
  | |   | +-- expand-brackets@2.1.4
  | |   | | +-- debug@2.6.9
  | |   | | +-- define-property@0.2.5
  | |   | | +-- extend-shallow@2.0.1
  | |   | | `-- posix-character-classes@0.1.1
  | |   | `-- extend-shallow@2.0.1
  | |   +-- fragment-cache@0.2.1
  | |   +-- kind-of@6.0.2
  | |   +-- nanomatch@1.2.9
  | |   | +-- is-odd@2.0.0
  | |   | | `-- is-number@4.0.0
  | |   | `-- is-windows@1.0.2
  | |   +-- object.pick@1.3.0
  | |   `-- regex-not@1.0.2
  | +-- async-each@1.0.1
  | +-- braces@2.3.2
  | | +-- arr-flatten@1.1.0
  | | +-- array-unique@0.3.2
  | | +-- extend-shallow@2.0.1
  | | | `-- is-extendable@0.1.1
  | | +-- fill-range@4.0.0
  | | | +-- extend-shallow@2.0.1
  | | | +-- is-number@3.0.0
  | | | | `-- kind-of@3.2.2
  | | | |   `-- is-buffer@1.1.6
  | | | +-- repeat-string@1.6.1
  | | | `-- to-regex-range@2.1.1
  | | +-- isobject@3.0.1
  | | +-- repeat-element@1.1.2
  | | +-- snapdragon@0.8.2
  | | | +-- base@0.11.2
  | | | | +-- cache-base@1.0.1
  | | | | | +-- collection-visit@1.0.0
  | | | | | | +-- map-visit@1.0.0
  | | | | | | `-- object-visit@1.0.1
  | | | | | +-- get-value@2.0.6
  | | | | | +-- has-value@1.0.0
  | | | | | | `-- has-values@1.0.0
  | | | | | |   `-- kind-of@4.0.0
  | | | | | +-- set-value@2.0.0
  | | | | | | `-- extend-shallow@2.0.1
  | | | | | +-- to-object-path@0.3.0
  | | | | | | `-- kind-of@3.2.2
  | | | | | +-- union-value@1.0.0
  | | | | | | `-- set-value@0.4.3
  | | | | | |   `-- extend-shallow@2.0.1
  | | | | | `-- unset-value@1.0.0
  | | | | |   `-- has-value@0.3.1
  | | | | |     +-- has-values@0.1.4
  | | | | |     `-- isobject@2.1.0
  | | | | +-- class-utils@0.3.6
  | | | | | +-- arr-union@3.1.0
  | | | | | +-- define-property@0.2.5
  | | | | | `-- static-extend@0.1.2
  | | | | |   +-- define-property@0.2.5
  | | | | |   `-- object-copy@0.1.0
  | | | | |     +-- copy-descriptor@0.1.1
  | | | | |     +-- define-property@0.2.5
  | | | | |     `-- kind-of@3.2.2
  | | | | +-- component-emitter@1.2.1
  | | | | +-- define-property@1.0.0
  | | | | | `-- is-descriptor@1.0.2
  | | | | |   +-- is-accessor-descriptor@1.0.0
  | | | | |   `-- is-data-descriptor@1.0.0
  | | | | +-- mixin-deep@1.3.1
  | | | | | +-- for-in@1.0.2
  | | | | | `-- is-extendable@1.0.1
  | | | | `-- pascalcase@0.1.1
  | | | +-- debug@2.6.9
  | | | +-- define-property@0.2.5
  | | | | `-- is-descriptor@0.1.6
  | | | |   +-- is-accessor-descriptor@0.1.6
  | | | |   | `-- kind-of@3.2.2
  | | | |   +-- is-data-descriptor@0.1.4
  | | | |   | `-- kind-of@3.2.2
  | | | |   `-- kind-of@5.1.0
  | | | +-- extend-shallow@2.0.1
  | | | +-- map-cache@0.2.2
  | | | +-- source-map@0.5.7
  | | | +-- source-map-resolve@0.5.2
  | | | | +-- atob@2.1.1
  | | | | +-- decode-uri-component@0.2.0
  | | | | +-- resolve-url@0.2.1
  | | | | +-- source-map-url@0.4.0
  | | | | `-- urix@0.1.0
  | | | `-- use@3.1.0
  | | +-- snapdragon-node@2.1.1
  | | | +-- define-property@1.0.0
  | | | | `-- is-descriptor@1.0.2
  | | | |   +-- is-accessor-descriptor@1.0.0
  | | | |   `-- is-data-descriptor@1.0.0
  | | | `-- snapdragon-util@3.0.1
  | | |   `-- kind-of@3.2.2
  | | +-- split-string@3.1.0
  | | `-- to-regex@3.0.2
  | |   `-- safe-regex@1.1.0
  | |     `-- ret@0.1.15
  | +-- glob-parent@3.1.0
  | | +-- is-glob@3.1.0
  | | `-- path-dirname@1.0.2
  | +-- inherits@2.0.3
  | +-- is-binary-path@1.0.1
  | | `-- binary-extensions@1.11.0
  | +-- is-glob@4.0.0
  | | `-- is-extglob@2.1.1
  | +-- normalize-path@2.1.1
  | | `-- remove-trailing-separator@1.1.0
  | +-- path-is-absolute@1.0.1
  | +-- readdirp@2.1.0
  | | +-- graceful-fs@4.1.11
  | | +-- minimatch@3.0.4
  | | | `-- brace-expansion@1.1.11
  | | |   +-- balanced-match@1.0.0
  | | |   `-- concat-map@0.0.1
  | | +-- readable-stream@2.3.6
  | | | +-- core-util-is@1.0.2
  | | | +-- isarray@1.0.0
  | | | +-- process-nextick-args@2.0.0
  | | | +-- safe-buffer@5.1.2
  | | | +-- string_decoder@1.1.1
  | | | `-- util-deprecate@1.0.2
  | | `-- set-immediate-shim@1.0.1
  | `-- upath@1.1.0
  +-- cli-table-redemption@1.0.1
  +-- commander@2.13.0
  +-- cron@1.3.0
  | `-- moment-timezone@0.5.18
  +-- debug@3.1.0
  | `-- ms@2.0.0
  +-- eventemitter2@1.0.5
  +-- fclone@1.0.11
  +-- gkt@1.0.0
  +-- mkdirp@0.5.1
  | `-- minimist@0.0.8
  +-- moment@2.22.2
  +-- needle@2.2.1
  | +-- debug@2.6.9
  | +-- iconv-lite@0.4.23
  | | `-- safer-buffer@2.1.2
  | `-- sax@1.2.4
  +-- nssocket@0.6.0
  | +-- eventemitter2@0.4.14
  | `-- lazy@1.0.11
  +-- pidusage@1.2.0
  +-- pm2-axon@3.1.0
  | +-- amp@0.3.1
  | +-- amp-message@0.1.2
  | `-- escape-regexp@0.0.1
  +-- pm2-axon-rpc@0.5.1
  +-- pm2-deploy@0.3.9
  | +-- async@1.5.2
  | `-- tv4@1.3.0
  +-- pm2-multimeter@0.1.2
  | `-- charm@0.1.2
  +-- pmx@1.6.7
  | +-- deep-metrics@0.0.1
  | +-- json-stringify-safe@5.0.1
  | `-- vxx@1.2.2
  |   +-- continuation-local-storage@3.2.1
  |   | +-- async-listener@0.6.9
  |   | `-- emitter-listener@1.1.1
  |   +-- debug@2.6.9
  |   +-- extend@3.0.1
  |   +-- is@3.2.1
  |   +-- lodash.findindex@4.6.0
  |   +-- lodash.isequal@4.5.0
  |   +-- lodash.merge@4.6.1
  |   +-- methods@1.1.2
  |   +-- shimmer@1.2.0
  |   `-- uuid@3.2.1
  +-- promptly@2.2.0
  | `-- read@1.0.7
  |   `-- mute-stream@0.0.7
  +-- semver@5.5.0
  +-- shelljs@0.7.8
  | +-- glob@7.1.2
  | | +-- fs.realpath@1.0.0
  | | +-- inflight@1.0.6
  | | | `-- wrappy@1.0.2
  | | `-- once@1.4.0
  | +-- interpret@1.1.0
  | `-- rechoir@0.6.2
  |   `-- resolve@1.8.1
  |     `-- path-parse@1.0.5
  +-- source-map-support@0.5.6
  | +-- buffer-from@1.1.0
  | `-- source-map@0.6.1
  +-- sprintf-js@1.1.1
  +-- v8-compile-cache@1.1.2
  +-- vizion@0.2.13
  | `-- async@1.5.2
  `-- yamljs@0.3.0
    `-- argparse@1.0.10
      `-- sprintf-js@1.0.3
 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.1.2 (node_modules\pm2\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
 
cs



4. 해당 폴더에 app.js 파일 작성




5. app.js 코드

1
2
3
4
5
6
7
8
9
var http = require('http');
 
var server = http.createServer(function(request, response) {
    response.writeHead(200, { "Content-Type": "text/plain" });
    response.end("Hello World\n");
});
 
server.listen(8000);
 
cs



6. 웹 브라우저에서 출력 확인

* 브라우저의 환경에 따라 "localhost:8000" 으로 접속되지 않을 경우 "http://127.0.0.1:8000/" 를 입력합니다.



'Programming > Node.js' 카테고리의 다른 글

node-v10.12.0-x64 설치 및 환경 구축  (0) 2018.10.20
node-v7.4.0-x64 설치 및 환경 구축  (0) 2017.01.24


os version: ubuntu 16.04.3

db version: 2.6.10


1. mongo db 서버와 클라이언트 설치 명령어를 실행합니다.

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
# apt-get install mongodb-server mongodb-clients
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libboost-filesystem1.58.0 libboost-program-options1.58.0 libboost-system1.58.0 libboost-thread1.58.0
  libgoogle-perftools4 libpcrecpp0v5 libsnappy1v5 libtcmalloc-minimal4 libunwind8 libv8-3.14.5 libyaml-cpp0.5v5
The following NEW packages will be installed:
  libboost-filesystem1.58.0 libboost-program-options1.58.0 libboost-system1.58.0 libboost-thread1.58.0
  libgoogle-perftools4 libpcrecpp0v5 libsnappy1v5 libtcmalloc-minimal4 libunwind8 libv8-3.14.5 libyaml-cpp0.5v5
  mongodb-clients mongodb-server
0 upgraded, 13 newly installed, 0 to remove and 0 not upgraded.
Need to get 58.0 MB of archives.
After this operation, 196 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libpcrecpp0v5 amd64 2:8.38-3.1 [15.2 kB]
Get:2 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libboost-system1.58.0 amd64 1.58.0+dfsg-5ubuntu3.1 [9,146 B]
Get:3 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libboost-filesystem1.58.0 amd64 1.58.0+dfsg-5ubuntu3.1 [37.5 kB]
Get:4 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libboost-program-options1.58.0 amd64 1.58.0+dfsg-5ubuntu3.1 [138 kB]
Get:5 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libboost-thread1.58.0 amd64 1.58.0+dfsg-5ubuntu3.1 [47.0 kB]
Get:6 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libtcmalloc-minimal4 amd64 2.4-0ubuntu5.16.04.1 [105 kB]
Get:7 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libunwind8 amd64 1.1-4.1 [46.5 kB]
Get:8 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgoogle-perftools4 amd64 2.4-0ubuntu5.16.04.1 [187 kB]
Get:9 http://kr.archive.ubuntu.com/ubuntu xenial/universe amd64 libv8-3.14.5 amd64 3.14.5.8-5ubuntu2 [1,189 kB]
Get:10 http://kr.archive.ubuntu.com/ubuntu xenial/universe amd64 libyaml-cpp0.5v5 amd64 0.5.2-3 [158 kB]
Get:11 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libsnappy1v5 amd64 1.1.3-2 [16.0 kB]
Get:12 http://kr.archive.ubuntu.com/ubuntu xenial/universe amd64 mongodb-clients amd64 1:2.6.10-0ubuntu1 [48.6 MB]
Get:13 http://kr.archive.ubuntu.com/ubuntu xenial/universe amd64 mongodb-server amd64 1:2.6.10-0ubuntu1 [7,425 kB]
Fetched 58.0 MB in 6s (9,073 kB/s)
Selecting previously unselected package libpcrecpp0v5:amd64.
(Reading database ... 92628 files and directories currently installed.)
Preparing to unpack .../libpcrecpp0v5_2%3a8.38-3.1_amd64.deb ...
Unpacking libpcrecpp0v5:amd64 (2:8.38-3.1) ...
Selecting previously unselected package libboost-system1.58.0:amd64.
Preparing to unpack .../libboost-system1.58.0_1.58.0+dfsg-5ubuntu3.1_amd64.deb ...
Unpacking libboost-system1.58.0:amd64 (1.58.0+dfsg-5ubuntu3.1) ...
Selecting previously unselected package libboost-filesystem1.58.0:amd64.
Preparing to unpack .../libboost-filesystem1.58.0_1.58.0+dfsg-5ubuntu3.1_amd64.deb ...
Unpacking libboost-filesystem1.58.0:amd64 (1.58.0+dfsg-5ubuntu3.1) ...
Selecting previously unselected package libboost-program-options1.58.0:amd64.
Preparing to unpack .../libboost-program-options1.58.0_1.58.0+dfsg-5ubuntu3.1_amd64.deb ...
Unpacking libboost-program-options1.58.0:amd64 (1.58.0+dfsg-5ubuntu3.1) ...
Selecting previously unselected package libboost-thread1.58.0:amd64.
Preparing to unpack .../libboost-thread1.58.0_1.58.0+dfsg-5ubuntu3.1_amd64.deb ...
Unpacking libboost-thread1.58.0:amd64 (1.58.0+dfsg-5ubuntu3.1) ...
Selecting previously unselected package libtcmalloc-minimal4.
Preparing to unpack .../libtcmalloc-minimal4_2.4-0ubuntu5.16.04.1_amd64.deb ...
Unpacking libtcmalloc-minimal4 (2.4-0ubuntu5.16.04.1) ...
Selecting previously unselected package libunwind8.
Preparing to unpack .../libunwind8_1.1-4.1_amd64.deb ...
Unpacking libunwind8 (1.1-4.1) ...
Selecting previously unselected package libgoogle-perftools4.
Preparing to unpack .../libgoogle-perftools4_2.4-0ubuntu5.16.04.1_amd64.deb ...
Unpacking libgoogle-perftools4 (2.4-0ubuntu5.16.04.1) ...
Selecting previously unselected package libv8-3.14.5.
Preparing to unpack .../libv8-3.14.5_3.14.5.8-5ubuntu2_amd64.deb ...
Unpacking libv8-3.14.5 (3.14.5.8-5ubuntu2) ...
Selecting previously unselected package libyaml-cpp0.5v5:amd64.
Preparing to unpack .../libyaml-cpp0.5v5_0.5.2-3_amd64.deb ...
Unpacking libyaml-cpp0.5v5:amd64 (0.5.2-3) ...
Selecting previously unselected package libsnappy1v5:amd64.
Preparing to unpack .../libsnappy1v5_1.1.3-2_amd64.deb ...
Unpacking libsnappy1v5:amd64 (1.1.3-2) ...
Selecting previously unselected package mongodb-clients.
Preparing to unpack .../mongodb-clients_1%3a2.6.10-0ubuntu1_amd64.deb ...
Unpacking mongodb-clients (1:2.6.10-0ubuntu1) ...
Selecting previously unselected package mongodb-server.
Preparing to unpack .../mongodb-server_1%3a2.6.10-0ubuntu1_amd64.deb ...
Unpacking mongodb-server (1:2.6.10-0ubuntu1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for systemd (229-4ubuntu21.2) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up libpcrecpp0v5:amd64 (2:8.38-3.1) ...
Setting up libboost-system1.58.0:amd64 (1.58.0+dfsg-5ubuntu3.1) ...
Setting up libboost-filesystem1.58.0:amd64 (1.58.0+dfsg-5ubuntu3.1) ...
Setting up libboost-program-options1.58.0:amd64 (1.58.0+dfsg-5ubuntu3.1) ...
Setting up libboost-thread1.58.0:amd64 (1.58.0+dfsg-5ubuntu3.1) ...
Setting up libtcmalloc-minimal4 (2.4-0ubuntu5.16.04.1) ...
Setting up libunwind8 (1.1-4.1) ...
Setting up libgoogle-perftools4 (2.4-0ubuntu5.16.04.1) ...
Setting up libv8-3.14.5 (3.14.5.8-5ubuntu2) ...
Setting up libyaml-cpp0.5v5:amd64 (0.5.2-3) ...
Setting up libsnappy1v5:amd64 (1.1.3-2) ...
Setting up mongodb-clients (1:2.6.10-0ubuntu1) ...
Setting up mongodb-server (1:2.6.10-0ubuntu1) ...
Adding system user `mongodb' (UID 111) ...
Adding new user `mongodb' (UID 111) with group `nogroup' ...
Not creating home directory `/var/lib/mongodb'.
Adding group `mongodb' (GID 117) ...
Done.
Adding user `mongodb' to group `mongodb' ...
Adding user mongodb to group mongodb
Done.
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for systemd (229-4ubuntu21.2) ...
Processing triggers for ureadahead (0.100.0-19) ...
 
cs



2. 설치 여부 확인

1
2
3
4
5
# mongod --version
db version v2.6.10
2018-06-18T12:09:42.177+0900 git version: nogitversion
2018-06-18T12:09:42.177+0900 OpenSSL version: OpenSSL 1.0.2g  1 Mar 2016
 
cs



3. 실행

1
2
3
4
5
6
7
8
9
10
11
# mongo
MongoDB shell version: 2.6.10
connecting to: test
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
        http://docs.mongodb.org/
Questions? Try the support group
        http://groups.google.com/group/mongodb-user
>
 
cs



4. 간단한 테스트

1
2
3
4
> show dbs
admin  (empty)
local  0.078GB
 
cs



'Operating System > Linux' 카테고리의 다른 글

TensorFlow 설치 및 환경 구축  (0) 2018.07.18
ubuntu 16.04 mysql 설치  (0) 2018.07.02
Kali Linux 고정 IP 설정하기  (0) 2018.06.12
CentOS7 고정 IP 설정  (0) 2018.06.01
CentOS JDK 설치  (0) 2018.05.31


r Installation 진행 중 다음과 같은 문제 발생 시

출처: http://abc2080.tistory.com/ [Another Windows]


Cloudera Installation 진행 중 다음과 같은 문제 발생 시



jdk 설치 여부를 확인하여 jdk 설치를 진행합니다.

1
2
3
4
5
6
7
# pssh -h dept.hosts yum install -y java-1.8.0-openjdk-devel.x86_64
[1] 18:28:22 [SUCCESS] root@192.168.0.31
[2] 18:28:30 [SUCCESS] root@192.168.0.34
[3] 18:28:35 [SUCCESS] root@192.168.0.33
[4] 18:28:35 [SUCCESS] root@192.168.0.32
[5] 18:28:35 [SUCCESS] root@192.168.0.35
 
cs


설치 후 확인

1
2
3
4
5
6
7
8
9
10
11
12
# pssh -h dept.hosts -i rpm -qa java*jdk-devel
[1] 18:30:20 [SUCCESS] root@192.168.0.35
java-1.8.0-openjdk-devel-1.8.0.171-8.b10.el7_5.x86_64
[2] 18:30:20 [SUCCESS] root@192.168.0.32
java-1.8.0-openjdk-devel-1.8.0.171-8.b10.el7_5.x86_64
[3] 18:30:20 [SUCCESS] root@192.168.0.34
java-1.8.0-openjdk-devel-1.8.0.171-8.b10.el7_5.x86_64
[4] 18:30:20 [SUCCESS] root@192.168.0.31
java-1.8.0-openjdk-devel-1.8.0.171-8.b10.el7_5.x86_64
[5] 18:30:20 [SUCCESS] root@192.168.0.33
java-1.8.0-openjdk-devel-1.8.0.171-8.b10.el7_5.x86_64
 
cs



확인 필요

'Big Data Platform' 카테고리의 다른 글

[경고] CDH Transparent Huge Page Compaction is enabled  (0) 2018.06.17
[에러] No route to host  (0) 2018.06.01
CentOS Cloudera Manager 설치  (0) 2018.05.31


Cluster Installation 진행 중 다음과 같은 문제 발생 시



아래의 절차를 확인

1. /etc/rc.local 파일에 다음 사항을 확인

1
2
3
echo never > /sys/kernel/mm/transparent_hugepage/defrag
echo never > /sys/kernel/mm/transparent_hugepage/enabled
 
cs



2.

1
2
3
4
5
6
7
# pssh -h dept.hosts chmod +x /etc/rc.d/rc.local
[1] 18:16:11 [SUCCESS] root@192.168.0.31
[2] 18:16:11 [SUCCESS] root@192.168.0.33
[3] 18:16:12 [SUCCESS] root@192.168.0.32
[4] 18:16:12 [SUCCESS] root@192.168.0.34
[5] 18:16:12 [SUCCESS] root@192.168.0.35
 
cs



3.

 3-1.

1
2
3
4
# cat << EOT >> /etc/default/grub
> transparent_hugepage=never
> EOT
 
cs


 3-2.

1
2
3
4
5
6
7
# pscp -h dept.hosts /etc/default/grub /etc/default/grub
[1] 18:19:23 [SUCCESS] root@192.168.0.31
[2] 18:19:23 [SUCCESS] root@192.168.0.33
[3] 18:19:23 [SUCCESS] root@192.168.0.34
[4] 18:19:23 [SUCCESS] root@192.168.0.32
[5] 18:19:23 [SUCCESS] root@192.168.0.35
 
cs



4.

1
2
3
4
5
6
7
# pssh -h dept.hosts grub2-mkconfig -o /boot/grub2/grub.cfg
[1] 18:20:30 [SUCCESS] root@192.168.0.31
[2] 18:20:30 [SUCCESS] root@192.168.0.32
[3] 18:20:30 [SUCCESS] root@192.168.0.35
[4] 18:20:31 [SUCCESS] root@192.168.0.33
[5] 18:20:31 [SUCCESS] root@192.168.0.34
 
cs



5.

1
2
3
4
5
6
7
# pssh -h dept.hosts systemctl start tuned
[1] 18:35:14 [SUCCESS] root@192.168.0.32
[2] 18:35:14 [SUCCESS] root@192.168.0.33
[3] 18:35:14 [SUCCESS] root@192.168.0.35
[4] 18:35:14 [SUCCESS] root@192.168.0.34
[5] 18:35:14 [SUCCESS] root@192.168.0.31
 
cs



6.

1
2
3
4
5
6
7
# pssh -h dept.hosts tuned-adm off
[1] 18:35:31 [SUCCESS] root@192.168.0.31
[2] 18:35:31 [SUCCESS] root@192.168.0.32
[3] 18:35:31 [SUCCESS] root@192.168.0.34
[4] 18:35:31 [SUCCESS] root@192.168.0.33
[5] 18:35:32 [SUCCESS] root@192.168.0.35
 
cs



7.

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
# pssh -h dept.hosts -i tuned-adm list
[1] 18:35:55 [SUCCESS] root@192.168.0.31
Available profiles:
- balanced                    - General non-specialized tuned profile
- desktop                     - Optimize for the desktop use-case
- latency-performance         - Optimize for deterministic performance at the cost of increased power consumption
- network-latency             - Optimize for deterministic performance at the cost of increased power consumption, focused on low latency network performance
- network-throughput          - Optimize for streaming network throughput, generally only necessary on older CPUs or 40G+ networks
- powersave                   - Optimize for low power consumption
- throughput-performance      - Broadly applicable tuning that provides excellent performance across a variety of common server workloads
- virtual-guest               - Optimize for running inside a virtual guest
- virtual-host                - Optimize for running KVM guests
No current active profile.
[2] 18:35:55 [SUCCESS] root@192.168.0.32
Available profiles:
- balanced                    - General non-specialized tuned profile
- desktop                     - Optimize for the desktop use-case
- latency-performance         - Optimize for deterministic performance at the cost of increased power consumption
- network-latency             - Optimize for deterministic performance at the cost of increased power consumption, focused on low latency network performance
- network-throughput          - Optimize for streaming network throughput, generally only necessary on older CPUs or 40G+ networks
- powersave                   - Optimize for low power consumption
- throughput-performance      - Broadly applicable tuning that provides excellent performance across a variety of common server workloads
- virtual-guest               - Optimize for running inside a virtual guest
- virtual-host                - Optimize for running KVM guests
No current active profile.
[3] 18:35:55 [SUCCESS] root@192.168.0.33
Available profiles:
- balanced                    - General non-specialized tuned profile
- desktop                     - Optimize for the desktop use-case
- latency-performance         - Optimize for deterministic performance at the cost of increased power consumption
- network-latency             - Optimize for deterministic performance at the cost of increased power consumption, focused on low latency network performance
- network-throughput          - Optimize for streaming network throughput, generally only necessary on older CPUs or 40G+ networks
- powersave                   - Optimize for low power consumption
- throughput-performance      - Broadly applicable tuning that provides excellent performance across a variety of common server workloads
- virtual-guest               - Optimize for running inside a virtual guest
- virtual-host                - Optimize for running KVM guests
No current active profile.
[4] 18:35:55 [SUCCESS] root@192.168.0.35
Available profiles:
- balanced                    - General non-specialized tuned profile
- desktop                     - Optimize for the desktop use-case
- latency-performance         - Optimize for deterministic performance at the cost of increased power consumption
- network-latency             - Optimize for deterministic performance at the cost of increased power consumption, focused on low latency network performance
- network-throughput          - Optimize for streaming network throughput, generally only necessary on older CPUs or 40G+ networks
- powersave                   - Optimize for low power consumption
- throughput-performance      - Broadly applicable tuning that provides excellent performance across a variety of common server workloads
- virtual-guest               - Optimize for running inside a virtual guest
- virtual-host                - Optimize for running KVM guests
No current active profile.
[5] 18:35:55 [SUCCESS] root@192.168.0.34
Available profiles:
- balanced                    - General non-specialized tuned profile
- desktop                     - Optimize for the desktop use-case
- latency-performance         - Optimize for deterministic performance at the cost of increased power consumption
- network-latency             - Optimize for deterministic performance at the cost of increased power consumption, focused on low latency network performance
- network-throughput          - Optimize for streaming network throughput, generally only necessary on older CPUs or 40G+ networks
- powersave                   - Optimize for low power consumption
- throughput-performance      - Broadly applicable tuning that provides excellent performance across a variety of common server workloads
- virtual-guest               - Optimize for running inside a virtual guest
- virtual-host                - Optimize for running KVM guests
No current active profile.
 
cs

* 위와 같이 마지막 줄에 "No current active profile."라고 출력되는지 확인 필요



8.

1
2
3
4
5
6
7
# pssh -h dept.hosts systemctl stop tuned
[1] 18:36:36 [SUCCESS] root@192.168.0.32
[2] 18:36:36 [SUCCESS] root@192.168.0.33
[3] 18:36:36 [SUCCESS] root@192.168.0.34
[4] 18:36:36 [SUCCESS] root@192.168.0.31
[5] 18:36:36 [SUCCESS] root@192.168.0.35
 
cs



9.

1
2
3
4
5
6
7
# pssh -h dept.hosts systemctl disable tuned
[1] 18:36:50 [SUCCESS] root@192.168.0.32
[2] 18:36:50 [SUCCESS] root@192.168.0.33
[3] 18:36:51 [SUCCESS] root@192.168.0.31
[4] 18:36:51 [SUCCESS] root@192.168.0.34
[5] 18:36:51 [SUCCESS] root@192.168.0.35
 
cs



확인 필요.


+ Recent posts