1. 우측 상단의 전원 버튼을 클릭



2. 하단의 설정 아이콘을 클릭



3.



4. Wired 이하에 설정 버튼을 클릭



5. IPv4 탭을 클릭



6. 파워 버튼을 클릭



7.



8. 재부팅 이후에 IP 설정 확인



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

ubuntu 16.04 mysql 설치  (0) 2018.07.02
ubuntu mongo db 설치  (0) 2018.06.18
CentOS7 고정 IP 설정  (0) 2018.06.01
CentOS JDK 설치  (0) 2018.05.31
ESXi kali linux 설치  (0) 2018.05.15











1.

1
2
3
4
5
6
7
8
# apt-get update
Hit:1 http://kr.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://kr.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:3 http://kr.archive.ubuntu.com/ubuntu xenial-backports InRelease
Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]
Fetched 107 kB in 1s (72.4 kB/s)
Reading package lists... Done
 
cs



2.

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
# apt-get install bind9
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  bind9utils libirs141 libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python python-minimal python2.7
  python2.7-minimal
Suggested packages:
  bind9-doc python-doc python-tk python2.7-doc binutils binfmt-support
The following NEW packages will be installed:
  bind9 bind9utils libirs141 libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python python-minimal
  python2.7 python2.7-minimal
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 4,467 kB of archives.
After this operation, 19.5 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-updates/main amd64 libpython2.7-minimal amd64 2.7.12-1ubuntu0~16.04.3 [340 kB]
Get:2 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python2.7-minimal amd64 2.7.12-1ubuntu0~16.04.3 [1,261 kB]
Get:3 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python-minimal amd64 2.7.12-1~16.04 [28.1 kB]
Get:4 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython2.7-stdlib amd64 2.7.12-1ubuntu0~16.04.3 [1,880 kB]
Get:5 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python2.7 amd64 2.7.12-1ubuntu0~16.04.3 [224 kB]
Get:6 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython-stdlib amd64 2.7.12-1~16.04 [7,768 B]
Get:7 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python amd64 2.7.12-1~16.04 [137 kB]
Get:8 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libirs141 amd64 1:9.10.3.dfsg.P4-8ubuntu1.10 [18.0 kB]
Get:9 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 bind9utils amd64 1:9.10.3.dfsg.P4-8ubuntu1.10 [201 kB]
Get:10 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 bind9 amd64 1:9.10.3.dfsg.P4-8ubuntu1.10 [372 kB]
Fetched 4,467 kB in 1s (4,282 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libpython2.7-minimal:amd64.
(Reading database ... 92627 files and directories currently installed.)
Preparing to unpack .../libpython2.7-minimal_2.7.12-1ubuntu0~16.04.3_amd64.deb ...
Unpacking libpython2.7-minimal:amd64 (2.7.12-1ubuntu0~16.04.3) ...
Selecting previously unselected package python2.7-minimal.
Preparing to unpack .../python2.7-minimal_2.7.12-1ubuntu0~16.04.3_amd64.deb ...
Unpacking python2.7-minimal (2.7.12-1ubuntu0~16.04.3) ...
Selecting previously unselected package python-minimal.
Preparing to unpack .../python-minimal_2.7.12-1~16.04_amd64.deb ...
Unpacking python-minimal (2.7.12-1~16.04) ...
Selecting previously unselected package libpython2.7-stdlib:amd64.
Preparing to unpack .../libpython2.7-stdlib_2.7.12-1ubuntu0~16.04.3_amd64.deb ...
Unpacking libpython2.7-stdlib:amd64 (2.7.12-1ubuntu0~16.04.3) ...
Selecting previously unselected package python2.7.
Preparing to unpack .../python2.7_2.7.12-1ubuntu0~16.04.3_amd64.deb ...
Unpacking python2.7 (2.7.12-1ubuntu0~16.04.3) ...
Selecting previously unselected package libpython-stdlib:amd64.
Preparing to unpack .../libpython-stdlib_2.7.12-1~16.04_amd64.deb ...
Unpacking libpython-stdlib:amd64 (2.7.12-1~16.04) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Setting up libpython2.7-minimal:amd64 (2.7.12-1ubuntu0~16.04.3) ...
Setting up python2.7-minimal (2.7.12-1ubuntu0~16.04.3) ...
Linking and byte-compiling packages for runtime python2.7...
Setting up python-minimal (2.7.12-1~16.04) ...
Selecting previously unselected package python.
(Reading database ... 93373 files and directories currently installed.)
Preparing to unpack .../python_2.7.12-1~16.04_amd64.deb ...
Unpacking python (2.7.12-1~16.04) ...
Selecting previously unselected package libirs141:amd64.
Preparing to unpack .../libirs141_1%3a9.10.3.dfsg.P4-8ubuntu1.10_amd64.deb ...
Unpacking libirs141:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
Selecting previously unselected package bind9utils.
Preparing to unpack .../bind9utils_1%3a9.10.3.dfsg.P4-8ubuntu1.10_amd64.deb ...
Unpacking bind9utils (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
Selecting previously unselected package bind9.
Preparing to unpack .../bind9_1%3a9.10.3.dfsg.P4-8ubuntu1.10_amd64.deb ...
Unpacking bind9 (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Processing triggers for systemd (229-4ubuntu21.2) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up libpython2.7-stdlib:amd64 (2.7.12-1ubuntu0~16.04.3) ...
Setting up python2.7 (2.7.12-1ubuntu0~16.04.3) ...
Setting up libpython-stdlib:amd64 (2.7.12-1~16.04) ...
Setting up python (2.7.12-1~16.04) ...
Setting up libirs141:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
Setting up bind9utils (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
Setting up bind9 (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
Adding group `bind' (GID 117) ...
Done.
Adding system user `bind' (UID 111) ...
Adding new user `bind' (UID 111) with group `bind' ...
Not creating home directory `/var/cache/bind'.
wrote key file "/etc/bind/rndc.key"
#
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for systemd (229-4ubuntu21.2) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
 
cs



3.

1
2
# service bind9 start
 
cs



4.

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
# service bind9 status
● bind9.service - BIND Domain Name Server
   Loaded: loaded (/lib/systemd/system/bind9.service; enabled; vendor preset: enabled)
  Drop-In: /run/systemd/generator/bind9.service.d
           └─50-insserv.conf-$named.conf
   Active: active (running) since Mon 2018-06-04 10:45:05 KST; 27s ago
     Docs: man:named(8)
 Main PID: 4135 (named)
    Tasks: 5
   Memory: 14.3M
      CPU: 45ms
   CGroup: /system.slice/bind9.service
           └─4135 /usr/sbin/named -f -u bind
 
Jun 04 10:45:05 ubuntu01 named[4135]: zone 255.in-addr.arpa/IN: loaded serial 1
Jun 04 10:45:05 ubuntu01 named[4135]: zone localhost/IN: loaded serial 2
Jun 04 10:45:05 ubuntu01 named[4135]: all zones loaded
Jun 04 10:45:05 ubuntu01 named[4135]: running
Jun 04 10:45:05 ubuntu01 named[4135]: network unreachable resolving './DNSKEY/IN': 2001:503:ba3e::2:30#53
Jun 04 10:45:05 ubuntu01 named[4135]: network unreachable resolving './NS/IN': 2001:503:ba3e::2:30#53
Jun 04 10:45:05 ubuntu01 named[4135]: network unreachable resolving 'E.ROOT-SERVERS.NET/AAAA/IN': 2001:500:2d::d#53
Jun 04 10:45:05 ubuntu01 named[4135]: network unreachable resolving './DNSKEY/IN': 2001:500:2d::d#53
Jun 04 10:45:05 ubuntu01 named[4135]: network unreachable resolving './NS/IN': 2001:500:2d::d#53
Jun 04 10:45:05 ubuntu01 named[4135]: network unreachable resolving 'G.ROOT-SERVERS.NET/AAAA/IN': 2001:500:2d::d#53
 
cs



5.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# host google.co.kr 127.0.0.1
Using domain server:
Name: 127.0.0.1
Address: 127.0.0.1#53
Aliases:
 
google.co.kr has address 172.217.26.3
google.co.kr has IPv6 address 2404:6800:4004:809::2003
google.co.kr mail is handled by 50 alt4.aspmx.l.google.com.
google.co.kr mail is handled by 40 alt3.aspmx.l.google.com.
google.co.kr mail is handled by 30 alt2.aspmx.l.google.com.
google.co.kr mail is handled by 10 aspmx.l.google.com.
google.co.kr mail is handled by 20 alt1.aspmx.l.google.com.
 
cs



6.

1
2
# vi /etc/bind/named.conf.options
 
cs



7.

 : default

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
options {
        directory "/var/cache/bind";
 
        // If there is a firewall between you and nameservers you want
        // to talk to, you may need to fix the firewall to allow multiple
        // ports to talk.  See http://www.kb.cert.org/vuls/id/800113
 
        // If your ISP provided one or more IP addresses for stable
        // nameservers, you probably want to use them as forwarders.
        // Uncomment the following block, and insert the addresses replacing
        // the all-0's placeholder.
 
        // forwarders {
        //      0.0.0.0;
        // };
 
        //========================================================================
        // If BIND logs error messages about the root key being expired,
        // you will need to update your keys.  See https://www.isc.org/bind-keys
        //========================================================================
        dnssec-validation auto;
 
        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { any; };
};
 
cs


 : edit

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
options {
        directory "/var/cache/bind";
 
        // If there is a firewall between you and nameservers you want
        // to talk to, you may need to fix the firewall to allow multiple
        // ports to talk.  See http://www.kb.cert.org/vuls/id/800113
 
        // If your ISP provided one or more IP addresses for stable
        // nameservers, you probably want to use them as forwarders.
        // Uncomment the following block, and insert the addresses replacing
        // the all-0's placeholder.
 
        // forwarders {
        //      0.0.0.0;
        // };
 
        //========================================================================
        // If BIND logs error messages about the root key being expired,
        // you will need to update your keys.  See https://www.isc.org/bind-keys
        //========================================================================
        dnssec-validation auto;
 
        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { any; };
 
        recursion yes;
        allow-transfer { none; };
 
        forwarders {
                8.8.8.8;
                8.8.4.4;
        };
 
        forward only;
        allow-query { any; };
};
 
cs



8.

1
2
# vi /etc/bind/named.conf.local
 
cs



9.

 : default

1
2
3
4
5
6
7
8
//
// Do any local configuration here
//
 
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
 
cs


 : edit

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//
// Do any local configuration here
//
 
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
 
zone "ubuntu01.local" {
        type master;
        file "/etc/bind/forward.ubuntu01.local";
};
 
zone "0.168.192.in-addr.arpa" {
        type master;
        file "/etc/bind/reverse.ubuntu01.local";
};
 
cs



10.

1
2
# cp /etc/bind/db.local /etc/bind/forward.ubuntu01.local
 
cs



11.

1
2
# vi /etc/bind/forward.ubuntu01.local
 
cs



12.

 : default

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
;
; BIND data file for local loopback interface
;
$TTL    604800
@       IN      SOA     localhost. root.localhost. (
                              2         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      localhost.
@       IN      A       127.0.0.1
@       IN      AAAA    ::1
 
cs



13.

1
2
# cp /etc/bind/db.local /etc/bind/reverse.ubuntu01.local
 
cs



14.

 : default

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
;
; BIND data file for local loopback interface
;
$TTL    604800
@       IN      SOA     localhost. root.localhost. (
                              2         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      localhost.
@       IN      A       127.0.0.1
@       IN      AAAA    ::1
 
cs



15.

1
2
# systemctl restart bind9
 
cs



16.

1
2
3
4
# systemctl enable bind9
Synchronizing state of bind9.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install enable bind9
 
cs


17.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# systemctl status bind9
● bind9.service - BIND Domain Name Server
   Loaded: loaded (/lib/systemd/system/bind9.service; enabled; vendor preset: enabled)
  Drop-In: /run/systemd/generator/bind9.service.d
           └─50-insserv.conf-$named.conf
   Active: active (running) since Mon 2018-06-04 11:22:51 KST; 26s ago
     Docs: man:named(8)
 Main PID: 4287 (named)
   CGroup: /system.slice/bind9.service
           └─4287 /usr/sbin/named -f -u bind
 
Jun 04 11:22:51 ubuntu01 named[4287]: managed-keys-zone: journal file is out of date: removing journal file
Jun 04 11:22:51 ubuntu01 named[4287]: managed-keys-zone: loaded serial 2
Jun 04 11:22:51 ubuntu01 named[4287]: zone 0.in-addr.arpa/IN: loaded serial 1
Jun 04 11:22:51 ubuntu01 named[4287]: zone 127.in-addr.arpa/IN: loaded serial 1
Jun 04 11:22:51 ubuntu01 named[4287]: zone 0.168.192.in-addr.arpa/IN: loaded serial 2
Jun 04 11:22:51 ubuntu01 named[4287]: zone ubuntu01.local/IN: loaded serial 2
Jun 04 11:22:51 ubuntu01 named[4287]: zone localhost/IN: loaded serial 2
Jun 04 11:22:51 ubuntu01 named[4287]: zone 255.in-addr.arpa/IN: loaded serial 1
Jun 04 11:22:51 ubuntu01 named[4287]: all zones loaded
Jun 04 11:22:51 ubuntu01 named[4287]: running
 
cs


18.

1
2
3
4
# ufw allow 53
Rules updated
Rules updated (v6)
 
cs



19.

1
2
# named-checkconf /etc/bind/named.conf.local
 
cs



20.

1
2
3
4
# named-checkzone ubuntu01.local /etc/bind/forward.ubuntu01.local
zone ubuntu01.local/IN: loaded serial 2
OK
 
cs



21.

1
2
3
4
# named-checkzone ubuntu01.local /etc/bind/reverse.ubuntu01.local
zone ubuntu01.local/IN: loaded serial 2
OK
 
cs



22. Test




Cloudera CDH 설치 시 다음과 같은 에러 발생 시



다음과 같이 방화벽 해제 후

1
2
3
4
5
6
7
# pssh -h dept.hosts systemctl disable firewalld
[1] 18:10:16 [SUCCESS] root@192.168.0.24
[2] 18:10:16 [SUCCESS] root@192.168.0.23
[3] 18:10:16 [SUCCESS] root@192.168.0.25
[4] 18:10:16 [SUCCESS] root@192.168.0.27
[5] 18:10:16 [SUCCESS] root@192.168.0.26
 
cs


방화벽 정지 후 다시 진행

1
2
3
4
5
6
7
# pssh -h dept.hosts systemctl stop firewalld
[1] 18:10:24 [SUCCESS] root@192.168.0.24
[2] 18:10:24 [SUCCESS] root@192.168.0.25
[3] 18:10:24 [SUCCESS] root@192.168.0.26
[4] 18:10:24 [SUCCESS] root@192.168.0.27
[5] 18:10:24 [SUCCESS] root@192.168.0.23
 
cs



재시도 후 결과




기존의 사용하던 서버 및 단말의 정보를 변경 후 아래와 같은 문제 발생 시

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# pssh -h dept.hosts -i ls
[1] 14:06:49 [FAILURE] root@192.168.0.26 Exited with error code 255
Stderr: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:qo/WOgVXbxSOZIivYXQJ4ZcxmZ88lqgRYwivbObzHYc.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /root/.ssh/known_hosts:4
ECDSA host key for 192.168.0.26 has changed and you have requested strict checking.
Host key verification failed.
 
cs



다음의 명령어로 초기화

1
2
3
4
5
# ssh-keygen -R 192.168.0.26
# Host 192.168.0.26 found: line 3
/root/.ssh/known_hosts updated.
Original contents retained as /root/.ssh/known_hosts.old
 
cs



확인

1
2
3
4
[3] 14:12:01 [SUCCESS] root@192.168.0.26
anaconda-ks.cfg
initial-setup-ks.cfg
 
cs



'Tools > PSSH' 카테고리의 다른 글

CentOS PSSH 설치  (0) 2018.06.01


1.

1
2
$ vi /etc/sysconfig/network-scripts/ifcfg-eno16780032
 
cs



2.

1
2
3
4
5
BOOTPROTO="static"
IPADDR="192.168.0.23"
GATEWAY="192.168.0.1"
DNS1="8.8.8.8"
 
cs



3.

1
2
systemctl restart network
 
cs




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

ubuntu mongo db 설치  (0) 2018.06.18
Kali Linux 고정 IP 설정하기  (0) 2018.06.12
CentOS JDK 설치  (0) 2018.05.31
ESXi kali linux 설치  (0) 2018.05.15
Ubuntu 한글 깨짐  (0) 2018.05.03


1.

1
2
3
4
5
6
7
8
9
10
11
12
# wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/parallel-ssh/pssh-2.3.1.tar.gz
--2018-06-01 11:39:06--  https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/parallel-ssh/pssh-2.3.1.tar.gz
Resolving storage.googleapis.com (storage.googleapis.com)... 216.58.200.176, 2404:6800:4004:816::2010
Connecting to storage.googleapis.com (storage.googleapis.com)|216.58.200.176|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 23427 (23K) [application/octet-stream]
Saving to: ‘pssh-2.3.1.tar.gz’
 
100%[===========================================================================>] 23,427      --.-K/s   in 0.04s
 
2018-06-01 11:39:06 (539 KB/s) - ‘pssh-2.3.1.tar.gz’ saved [23427/23427]
 
cs



2.

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
# tar -xvzf ./pssh-2.3.1.tar.gz
pssh-2.3.1/
pssh-2.3.1/setup.py
pssh-2.3.1/man/
pssh-2.3.1/man/man1/
pssh-2.3.1/man/man1/pslurp.1
pssh-2.3.1/man/man1/pssh.1
pssh-2.3.1/man/man1/pscp.1
pssh-2.3.1/man/man1/prsync.1
pssh-2.3.1/man/man1/pnuke.1
pssh-2.3.1/INSTALL
pssh-2.3.1/ChangeLog
pssh-2.3.1/bin/
pssh-2.3.1/bin/pscp
pssh-2.3.1/bin/prsync
pssh-2.3.1/bin/pnuke
pssh-2.3.1/bin/pssh-askpass
pssh-2.3.1/bin/pssh
pssh-2.3.1/bin/pslurp
pssh-2.3.1/COPYING
pssh-2.3.1/AUTHORS
pssh-2.3.1/psshlib/
pssh-2.3.1/psshlib/psshutil.py
pssh-2.3.1/psshlib/askpass_client.py
pssh-2.3.1/psshlib/manager.py
pssh-2.3.1/psshlib/version.py
pssh-2.3.1/psshlib/__init__.py
pssh-2.3.1/psshlib/color.py
pssh-2.3.1/psshlib/task.py
pssh-2.3.1/psshlib/cli.py
pssh-2.3.1/psshlib/askpass_server.py
pssh-2.3.1/PKG-INFO
pssh-2.3.1/test/
pssh-2.3.1/test/test.py
 
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
# python setup.py install
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/psshlib
copying psshlib/psshutil.py -> build/lib/psshlib
copying psshlib/askpass_client.py -> build/lib/psshlib
copying psshlib/manager.py -> build/lib/psshlib
copying psshlib/version.py -> build/lib/psshlib
copying psshlib/__init__.py -> build/lib/psshlib
copying psshlib/color.py -> build/lib/psshlib
copying psshlib/task.py -> build/lib/psshlib
copying psshlib/cli.py -> build/lib/psshlib
copying psshlib/askpass_server.py -> build/lib/psshlib
running build_scripts
creating build/scripts-2.7
copying and adjusting bin/pssh -> build/scripts-2.7
copying and adjusting bin/pnuke -> build/scripts-2.7
copying and adjusting bin/prsync -> build/scripts-2.7
copying and adjusting bin/pslurp -> build/scripts-2.7
copying and adjusting bin/pscp -> build/scripts-2.7
copying and adjusting bin/pssh-askpass -> build/scripts-2.7
changing mode of build/scripts-2.7/pssh from 644 to 755
changing mode of build/scripts-2.7/pnuke from 644 to 755
changing mode of build/scripts-2.7/prsync from 644 to 755
changing mode of build/scripts-2.7/pslurp from 644 to 755
changing mode of build/scripts-2.7/pscp from 644 to 755
changing mode of build/scripts-2.7/pssh-askpass from 644 to 755
running install_lib
creating /usr/lib/python2.7/site-packages/psshlib
copying build/lib/psshlib/psshutil.py -> /usr/lib/python2.7/site-packages/psshlib
copying build/lib/psshlib/askpass_client.py -> /usr/lib/python2.7/site-packages/psshlib
copying build/lib/psshlib/manager.py -> /usr/lib/python2.7/site-packages/psshlib
copying build/lib/psshlib/version.py -> /usr/lib/python2.7/site-packages/psshlib
copying build/lib/psshlib/__init__.py -> /usr/lib/python2.7/site-packages/psshlib
copying build/lib/psshlib/color.py -> /usr/lib/python2.7/site-packages/psshlib
copying build/lib/psshlib/task.py -> /usr/lib/python2.7/site-packages/psshlib
copying build/lib/psshlib/cli.py -> /usr/lib/python2.7/site-packages/psshlib
copying build/lib/psshlib/askpass_server.py -> /usr/lib/python2.7/site-packages/psshlib
byte-compiling /usr/lib/python2.7/site-packages/psshlib/psshutil.py to psshutil.pyc
byte-compiling /usr/lib/python2.7/site-packages/psshlib/askpass_client.py to askpass_client.pyc
byte-compiling /usr/lib/python2.7/site-packages/psshlib/manager.py to manager.pyc
byte-compiling /usr/lib/python2.7/site-packages/psshlib/version.py to version.pyc
byte-compiling /usr/lib/python2.7/site-packages/psshlib/__init__.py to __init__.pyc
byte-compiling /usr/lib/python2.7/site-packages/psshlib/color.py to color.pyc
byte-compiling /usr/lib/python2.7/site-packages/psshlib/task.py to task.pyc
byte-compiling /usr/lib/python2.7/site-packages/psshlib/cli.py to cli.pyc
byte-compiling /usr/lib/python2.7/site-packages/psshlib/askpass_server.py to askpass_server.pyc
running install_scripts
copying build/scripts-2.7/pssh -> /usr/bin
copying build/scripts-2.7/pnuke -> /usr/bin
copying build/scripts-2.7/prsync -> /usr/bin
copying build/scripts-2.7/pslurp -> /usr/bin
copying build/scripts-2.7/pscp -> /usr/bin
copying build/scripts-2.7/pssh-askpass -> /usr/bin
changing mode of /usr/bin/pssh to 755
changing mode of /usr/bin/pnuke to 755
changing mode of /usr/bin/prsync to 755
changing mode of /usr/bin/pslurp to 755
changing mode of /usr/bin/pscp to 755
changing mode of /usr/bin/pssh-askpass to 755
running install_data
creating /usr/man
creating /usr/man/man1
copying man/man1/pssh.1 -> /usr/man/man1
copying man/man1/pscp.1 -> /usr/man/man1
copying man/man1/prsync.1 -> /usr/man/man1
copying man/man1/pslurp.1 -> /usr/man/man1
copying man/man1/pnuke.1 -> /usr/man/man1
running install_egg_info
Writing /usr/lib/python2.7/site-packages/pssh-2.3.1-py2.7.egg-info
 
cs



4.

1
2
# vi ./dept.hosts
 
cs



5.

1
2
3
4
5
192.168.0.24 root
192.168.0.25 root
192.168.0.27 root
192.168.0.26 root
 
cs


6.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# pssh -h dept.hosts -i ls
[1] 11:49:36 [SUCCESS] root@192.168.0.24
anaconda-ks.cfg
initial-setup-ks.cfg
[2] 11:49:36 [SUCCESS] root@192.168.0.27
anaconda-ks.cfg
initial-setup-ks.cfg
[3] 11:49:36 [SUCCESS] root@192.168.0.25
anaconda-ks.cfg
initial-setup-ks.cfg
[4] 11:49:36 [SUCCESS] root@192.168.0.26
anaconda-ks.cfg
initial-setup-ks.cfg
 
cs



'Tools > PSSH' 카테고리의 다른 글

SSH 접속 시 SHA 공유키 충돌 문제 발생 시  (0) 2018.06.01


1.

1
2
# hostnamectl set-hostname cdh00.rabbit.kr
 
cs



2.

1
2
# vi /etc/hosts
 
cs



3.

1
2
3
4
5
6
192.168.0.23 cdh00
192.168.0.24 cdh01
192.168.0.25 cdh02
192.168.0.27 cdh03
192.168.0.26 cdh04
        
cs


4,

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:MdT7uyeHUWBNsZ6Oi3hqa6qy/UeVp/ZyPUp0qQJfIrI root@cdh00.rabbit.kr
The key's randomart image is:
+---[RSA 2048]----+
        ..   oo. |
       .  . o .. |
        o  + ..  |
         o+ ...o |
      . S..+o.=  |
       o.+o+o=   |
      E. .o.+=.  |
  ..    +.o+*.=  |
  .oooo=++.o+* . |
+----[SHA256]-----+
 
cs



5.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# ssh-copy-id -i ~/.ssh/id_rsa.pub cdh01
/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
The authenticity of host 'cdh01 (192.168.0.24)' can't be established.
ECDSA key fingerprint is SHA256:wS8cbjSpKH87w+gzj99YrffsEminjggyur8RD9olnuQ.
ECDSA key fingerprint is MD5:24:b0:77:d4:01:db:47:2e:c5:cc:06:68:7f:32:d5:66.
Are you sure you want to continue connecting (yes/no)? yes
/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@cdh01's password:
 
Number of key(s) added: 1
 
Now try logging into the machine, with:   "ssh 'cdh01'"
and check to make sure that only the key(s) you wanted were added.
 
cs



6.

1
2
3
4
5
# scp -r ~/.ssh/* cdh01:~/.ssh/
id_rsa                                                                             100% 1679     2.4MB/s   00:00
id_rsa.pub                                                                         100%  402     1.1MB/s   00:00
known_hosts                                                                        100%  720     1.2MB/s   00:00
 
cs



7. pssh 설치

 : 관련 게시글 참조 요망



8.

1
2
3
4
5
6
7
# pssh -h dept.hosts service iptables stop
[1] 14:25:01 [SUCCESS] root@192.168.0.26
[2] 14:25:01 [SUCCESS] root@192.168.0.24
[3] 14:25:01 [SUCCESS] root@192.168.0.25
[4] 14:25:01 [SUCCESS] root@192.168.0.27
[5] 14:25:01 [SUCCESS] root@192.168.0.23
 
cs



9.

1
2
3
4
5
6
7
# pssh -h dept.hosts chkconfig iptables off
[1] 14:25:55 [SUCCESS] root@192.168.0.24
[2] 14:25:55 [SUCCESS] root@192.168.0.26
[3] 14:25:55 [SUCCESS] root@192.168.0.27
[4] 14:25:56 [SUCCESS] root@192.168.0.25
[5] 14:25:56 [SUCCESS] root@192.168.0.23
 
cs



10.

1
2
# vi /etc/sysconfig/selinux
 
cs



11.

1
2
3
#SELINUX=enforcing
SELINUX=disabled
 
cs



12.

1
2
3
4
5
6
7
# pscp -h dept.hosts /etc/sysconfig/selinux /etc/sysconfig/selinux
[1] 14:29:55 [SUCCESS] root@192.168.0.25
[2] 14:29:55 [SUCCESS] root@192.168.0.24
[3] 14:29:55 [SUCCESS] root@192.168.0.26
[4] 14:29:55 [SUCCESS] root@192.168.0.27
[5] 14:29:55 [SUCCESS] root@192.168.0.23
 
cs



13.

1
2
3
4
5
6
7
# pssh -h dept.hosts 'sysctl -w vm.swappiness=0'
[1] 14:31:06 [SUCCESS] root@192.168.0.24
[2] 14:31:06 [SUCCESS] root@192.168.0.25
[3] 14:31:06 [SUCCESS] root@192.168.0.26
[4] 14:31:06 [SUCCESS] root@192.168.0.27
[5] 14:31:06 [SUCCESS] root@192.168.0.23
 
cs



14.

1
2
# echo 'vm.swappiness=0' >> /etc/sysctl.conf
 
cs



15.

1
2
3
4
5
6
7
# pscp -h dept.hosts /etc/sysctl.conf /etc/sysctl.conf
[1] 14:32:07 [SUCCESS] root@192.168.0.24
[2] 14:32:07 [SUCCESS] root@192.168.0.25
[3] 14:32:07 [SUCCESS] root@192.168.0.26
[4] 14:32:07 [SUCCESS] root@192.168.0.23
[5] 14:32:07 [SUCCESS] root@192.168.0.27
 
cs



16.

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

* All Node



17.

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

* All Nodes



18.

1
2
3
4
5
# cat << EOT >> /etc/rc.local
> echo never > /sys/kernel/mm/transparent_hugepage/defrag
> echo never > /sys/kernel/mm/transparent_hugepage/enabled
> EOT
 
cs


19.

1
2
3
4
5
6
7
# pscp -h dept.hosts /etc/rc.local /etc/rc.local
[1] 14:39:55 [SUCCESS] root@192.168.0.24
[2] 14:39:55 [SUCCESS] root@192.168.0.25
[3] 14:39:55 [SUCCESS] root@192.168.0.26
[4] 14:39:55 [SUCCESS] root@192.168.0.23
[5] 14:39:55 [SUCCESS] root@192.168.0.27
 
cs



20.

1
2
3
4
5
6
7
# pssh -h dept.hosts yum install -y ntp
[1] 14:41:42 [SUCCESS] root@192.168.0.26
[2] 14:41:43 [SUCCESS] root@192.168.0.25
[3] 14:41:43 [SUCCESS] root@192.168.0.27
[4] 14:41:43 [SUCCESS] root@192.168.0.24
[5] 14:41:44 [SUCCESS] root@192.168.0.23
 
cs



21.

1
2
3
4
5
6
7
# cat << EOT >> /etc/ntp.conf
> server 0.kr.pool.ntp.org
> server 1.asia.pool.ntp.org
> server 2.kr.pool.ntp.org
> server 3.asia.pool.ntp.org
> EOT
 
cs



22.

1
2
3
4
5
6
7
# pscp -h dept.hosts /etc/ntp.conf /etc/ntp.conf
[1] 14:48:07 [SUCCESS] root@192.168.0.25
[2] 14:48:07 [SUCCESS] root@192.168.0.26
[3] 14:48:07 [SUCCESS] root@192.168.0.24
[4] 14:48:07 [SUCCESS] root@192.168.0.23
[5] 14:48:07 [SUCCESS] root@192.168.0.27
 
cs



23.

1
2
3
4
5
6
7
# pssh -h dept.hosts service ntpd stop
[1] 14:48:47 [SUCCESS] root@192.168.0.24
[2] 14:48:47 [SUCCESS] root@192.168.0.26
[3] 14:48:47 [SUCCESS] root@192.168.0.25
[4] 14:48:47 [SUCCESS] root@192.168.0.23
[5] 14:48:47 [SUCCESS] root@192.168.0.27
 
cs



24.

1
2
3
4
5
6
7
# pssh -h dept.hosts ntpdate kr.pool.ntp.org
[1] 14:49:18 [SUCCESS] root@192.168.0.24
[2] 14:49:20 [SUCCESS] root@192.168.0.25
[3] 14:49:20 [SUCCESS] root@192.168.0.26
[4] 14:49:20 [SUCCESS] root@192.168.0.27
[5] 14:49:21 [SUCCESS] root@192.168.0.23
 
cs



25.

1
2
3
4
5
6
7
# pssh -h dept.hosts service ntpd start
[1] 14:49:31 [SUCCESS] root@192.168.0.24
[2] 14:49:31 [SUCCESS] root@192.168.0.25
[3] 14:49:31 [SUCCESS] root@192.168.0.26
[4] 14:49:31 [SUCCESS] root@192.168.0.27
[5] 14:49:31 [SUCCESS] root@192.168.0.23
 
cs



26.

1
2
3
4
5
6
7
# pssh -h dept.hosts chkconfig ntpd on
[1] 14:49:51 [SUCCESS] root@192.168.0.25
[2] 14:49:51 [SUCCESS] root@192.168.0.24
[3] 14:49:51 [SUCCESS] root@192.168.0.26
[4] 14:49:51 [SUCCESS] root@192.168.0.27
[5] 14:49:51 [SUCCESS] root@192.168.0.23
 
cs



27.

1
2
3
4
5
6
7
# cat << EOT >> /etc/security/limits.conf
> *    hard nofile 131072
> *    soft nofile 131072
> root hard nofile 131072
> root soft nofile 131072
> EOT
 
cs



28.

1
2
3
4
5
6
7
# pscp -h dept.hosts /etc/security/limits.conf /etc/security/limits.conf
[1] 15:38:09 [SUCCESS] root@192.168.0.25
[2] 15:38:09 [SUCCESS] root@192.168.0.24
[3] 15:38:09 [SUCCESS] root@192.168.0.26
[4] 15:38:09 [SUCCESS] root@192.168.0.27
[5] 15:38:09 [SUCCESS] root@192.168.0.23
 
cs



29.

1
2
# pssh -h dept.hosts reboot
 
cs



30.

1
2
3
4
5
6
7
8
9
10
11
12
# wget http://archive.cloudera.com/cm5/installer/latest/cloudera-manager-installer.bin
--2018-06-01 16:28:20--  http://archive.cloudera.com/cm5/installer/latest/cloudera-manager-installer.bin
Resolving archive.cloudera.com (archive.cloudera.com)... 151.101.0.167, 151.101.64.167, 151.101.128.167, ...
Connecting to archive.cloudera.com (archive.cloudera.com)|151.101.0.167|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 521190 (509K) [application/octet-stream]
Saving to: ‘cloudera-manager-installer.bin’
 
100%[===========================================================================>] 521,190     1.11MB/s   in 0.4s
 
2018-06-01 16:28:21 (1.11 MB/s) - ‘cloudera-manager-installer.bin’ saved [521190/521190]
 
cs



31.

1
2
# chmod u+x cloudera-manager-installer.bin
 
cs



32.

1
2
# ./cloudera-manager-installer.bin
 
cs



33.



34.



35.



36.



37.



38.



39.



40.



41.

* 초기 계정 정보 : admin / admin



42.



43.



44.



45.



46.



47.



48.



49.



50.



51.



52.



53.



54.



55.



56.



57.



58.



59.



60.


+ Recent posts