Ubuntu 16.04에서 발생하는 libseccomp2 의존성 문제

설치&설정|2019. 12. 23. 07:10

Ubuntu 16.04에서 docker(도커) 18.09 버전을 설치할 때 발생한 문제다.

도커 설치 문서를 참고해 설치를 진행했으나 다음과 같이 libseccomp2 패키지에 대한 의존성 문제가 발생했다.

root@ansible:~# sudo apt-get install docker-ce=5:18.09.9~3-0~ubuntu-xenial docker-ce-cli=5:18.09.9~3-0~ubuntu-xenial containerd.io
몇몇 패키지를 설치할 수 없습니다. 요청한 상황이 불가능할 수도 있고,
...
다음 패키지의 의존성이 맞지 않습니다:
 containerd.io : 의존: libseccomp2 (>= 2.4.0) 하지만 2.3.1-2.1ubuntu2~16.04.1 패키지를 설치할 것입니다

libseccomp2를 직접 설치해도 2.4 버전이 설치되진 않는다.

root@ansible:~# sudo apt-get install libseccomp2
libseccomp2 is already the newest version (2.3.1-2.1ubuntu2~16.04.1).

리눅스용 Libseccomp2 다운로드를 방문해 환경에 맞는 패키지를 다운로드한 후 설치한다.

root@ansible:~# curl -O http://archive.ubuntu.com/ubuntu/pool/main/libs/libseccomp/libseccomp2_2.4.1-0ubuntu0.16.04.2_amd64.deb

root@ansible:~# dpkg -i libseccomp2_2.4.1-0ubuntu0.16.04.2_amd64.deb
(데이터베이스 읽는중 ...현재 182339개의 파일과 디렉터리가 설치되어 있습니다.)
Preparing to unpack libseccomp2_2.4.1-0ubuntu0.16.04.2_amd64.deb ...
Unpacking libseccomp2:amd64 (2.4.1-0ubuntu0.16.04.2) over (2.3.1-2.1ubuntu2~16.04.1) ...
libseccomp2:amd64 (2.4.1-0ubuntu0.16.04.2) 설정하는 중입니다 ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...

도커를 설치하고 동작을 확인한다.

root@ansible:~# sudo apt-get install docker-ce=5:18.09.9~3-0~ubuntu-xenial docker-ce-cli=5:18.09.9~3-0~ubuntu-xenial containerd.io

root@ansible:~# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
1b930d010525: Pull complete
Digest: sha256:4df8ca8a7e309c256d60d7971ea14c27672fc0d10c5f303856d7bc48f8cc17ff
Status: Downloaded newer image for hello-world:latest

Hello from Docker!

 

도움이 됐다면 공감 버튼을 클릭해 주세요. 감사합니다.

댓글()
  1. 어흑흑 2020.08.26 15:38 댓글주소  수정/삭제  댓글쓰기

    감사합니다.. 감사합니다..

Pinpoint 빨리 설치하기(QuickStart)

설치&설정|2015. 3. 30. 15:57

Pinpoint QuickStart

얼마 전에 Hadoop, Hbase 최근 버전을 설치한 후, 네이버 Pinpint 설치를 시도해 봤습니다. 하지만 Pinpoint가 Hadoop 최신 버전을 공식 지원하지 않아서인지 실패했습니다.

어쨌든 빨리 사용해 보고 싶어서 QuickStart 가이드를 따라서 설치해 봅니다.

Linux 환경에서 QuickStart 실행하기

Pinpoint QuickStart 가이드 문서는 아래 주소에서 볼 수 있습니다(영문).

https://github.com/naver/pinpoint/tree/master/quickstart

리눅스 환경에서의 설치를 가이드하고 있어서 저는 AWS에 설치한 CentOS 7에 설치했습니다.

아래 주소에 가면 윈도 환경에서 실행하는 방법을 볼 수 있습니다.
Windows 환경에서 QuickStart 실행하기

Install JDK 6

Pinpoint 실행을 위해서는 JDK 6JDK 7+, Maven 3.2x+ 버전을 먼저 설치해야 합니다.

우선 JDK 설치를 위해서 wget 부터 설치합니다.

[centos@ip-172-31-7-87 ~]$ sudo -i
[root@ip-172-31-7-87 ~]# yum install -y wget

wget으로 JDK 6 바이너리(jdk-6u45-linux-x64.bin)를 다운로드 받은 후, chmod 명령으로 실행권한을 부여한 후 설치합니다.

[root@ip-172-31-7-87 ~]# wget http://ghaffarian.net/downloads/Java/JDK/jdk-6u45-linux-x64.bin
--2015-03-25 11:03:07--  http://ghaffarian.net/downloads/Java/JDK/jdk-6u45-linux-x64.bin
Resolving ghaffarian.net (ghaffarian.net)... 178.32.91.18
Connecting to ghaffarian.net (ghaffarian.net)|178.32.91.18|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 72087592 (69M) [application/octet-stream]
Saving to: ‘jdk-6u45-linux-x64.bin’

100%[=================================================>] 72,087,592  5.52MB/s   in 25s

2015-03-25 11:03:33 (2.78 MB/s) - ‘jdk-6u45-linux-x64.bin’ saved [72087592/72087592]

[root@ip-172-31-7-87 ~]# 
[root@ip-172-31-7-87 ~]# chmod u+x jdk-6u45-linux-x64.bin
[root@ip-172-31-7-87 ~]# ./jdk-6u45-linux-x64.bin
Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
   creating: jdk1.6.0_45/
   creating: jdk1.6.0_45/db/
   creating: jdk1.6.0_45/db/bin/
  inflating: jdk1.6.0_45/db/bin/ij
  inflating: jdk1.6.0_45/db/bin/NetworkServerControl
  inflating: jdk1.6.0_45/db/bin/setNetworkClientCP.bat
  inflating: jdk1.6.0_45/db/bin/setEmbeddedCP.bat
....
....
....
  inflating: jdk1.6.0_45/include/classfile_constants.h
  inflating: jdk1.6.0_45/COPYRIGHT
Creating jdk1.6.0_45/jre/lib/rt.jar
Creating jdk1.6.0_45/jre/lib/jsse.jar
Creating jdk1.6.0_45/jre/lib/charsets.jar
Creating jdk1.6.0_45/lib/tools.jar
Creating jdk1.6.0_45/jre/lib/ext/localedata.jar
Creating jdk1.6.0_45/jre/lib/plugin.jar
Creating jdk1.6.0_45/jre/lib/javaws.jar
Creating jdk1.6.0_45/jre/lib/deploy.jar

Done.

설치 후 생성된 jdk1.6.0_45 디렉토리를 /opt 디렉토리로 이동합니다.

[root@ip-172-31-7-87 ~]# mv jdk1.6.0_45 /opt

Install JDK 8

wget으로 JDK 8 압축 파일(jdk-8u25-linux-x64.tar.gz)을 다운로드 받은 후, /opt에 압축을 해제합니다.

압축 해제가 완료되면 /opt/jdk1.8.0_25 디렉토리가 생성됩니다.

[root@ip-172-31-7-87 ~]# wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u25-b17/jdk-8u25-linux-x64.tar.gz"

[root@ip-172-31-7-87 ~]# tar -zxvf jdk-8u25-linux-x64.tar.gz -C /opt

alternatives 명령을 사용하여 어디에서나 java 명령을 사용할 수 있도록 설정합니다.

[root@ip-172-31-7-87 ~]#  /usr/sbin/alternatives --install /usr/bin/java java /opt/jdk1.8.0_25/bin/java 100

[root@ip-172-31-7-87 ~]# java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

/etc/profile 파일을 편집하여 JAVA_HOME, JAVA_7_HOME, JAVA_6_HOME 환경변수를 설정합니다.

JAVA_HOME, JAVA_7_HOME은 앞에서 설치한 JDK 8을 가리키도록 설정했습니다.

[root@ip-172-31-7-87 ~]# vi /etc/profile
export JAVA_HOME=/opt/jdk1.8.0_25
export JAVA_7_HOME=/opt/jdk1.8.0_25
export JAVA_6_HOME=/opt/jdk1.6.0_45

source 명령으로 방금 편집한 /etc/profile을 새로 읽어 들인 후, 환경변수 설정이 잘 됐는지 확인합니다.

[root@ip-172-31-7-87 ~]# source /etc/profile

[root@ip-172-31-7-87 ~]# echo $JAVA_7_HOME
/opt/jdk1.8.0_25

[root@ip-172-31-7-87 ~]# echo $JAVA_6_HOME
/opt/jdk1.6.0_45

Install Maven

지금까지는 JDK 설치를 위해서 root 계정을 사용했습니다만, Mavencentos 계정으로 설치합니다. Pinpoint 실행 또한 centos 계정을 사용합니다.

Maven 3.2.5 버전을 wget으로 다운로드 받은 후 압축을 해제합니다.

[root@ip-172-31-7-87 ~]# exit
[centos@ip-172-31-7-87 ~]# source /etc/profile
[centos@ip-172-31-7-87 ~]# wget http://apache.tt.co.kr/maven/maven-3/3.2.5/binaries/apache-maven-3.2.5-bin.tar.gz
--2015-03-25 11:16:07--  http://apache.tt.co.kr/maven/maven-3/3.2.5/binaries/apache-maven-3.2.5-bin.tar.gz
Resolving apache.tt.co.kr (apache.tt.co.kr)... 121.125.79.185
Connecting to apache.tt.co.kr (apache.tt.co.kr)|121.125.79.185|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7956528 (7.6M) [application/x-gzip]
Saving to: ‘apache-maven-3.2.5-bin.tar.gz’

100%[======================================>] 7,956,528    124KB/s   in 62s

2015-03-25 11:17:09 (125 KB/s) - ‘apache-maven-3.2.5-bin.tar.gz’ saved [7956528/7956528]

[centos@ip-172-31-7-87 ~]$ tar xfz apache-maven-3.2.5-bin.tar.gz

.bashrc 파일을 편집하여 MAVEN_HOME, PATH 환경변수를 추가합니다.

[centos@ip-172-31-7-87 ~]$ vi ~/.bashrc
export MAVEN_HOME=/home/centos/apache-maven-3.2.5
export PATH=$PATH:$MAVEN_HOME/bin

mvn -version 명령을 실행하여 설치가 잘 됐는지 확인합니다. mvn은 Maven 실행파일입니다.

[centos@ip-172-31-7-87 ~]$ mvn -version
mvn -version
Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T17:29:23+00:00)
Maven home: /home/centos/apache-maven-3.2.5
Java version: 1.8.0_25, vendor: Oracle Corporation
Java home: /opt/jdk1.8.0_25/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-123.8.1.el7.x86_64", arch: "amd64", family: "unix"

Pinpoint 저장소 복제

Pinpoint 저장소를 복제(clone)하기 위해서 root 계정으로 Git을 설치합니다.

[centos@ip-172-31-7-87 ~]$ sudo -i
[root@ip-172-31-7-87 ~]# yum install -y git
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.riken.jp
 * extras: ftp.riken.jp
 * updates: ftp.riken.jp
Resolving Dependencies
--> Running transaction check
---> Package git.x86_64 0:1.8.3.1-4.el7 will be installed
--> Processing Dependency: perl-Git = 1.8.3.1-4.el7 for package: git-1.8.3.1-4.el7.x86_64
--> Processing Dependency: perl >= 5.008 for package: git-1.8.3.1-4.el7.x86_64
....
....
....
  perl-Time-Local.noarch 0:1.2300-2.el7    perl-constant.noarch 0:1.27-2.el7
  perl-libs.x86_64 4:5.16.3-283.el7        perl-macros.x86_64 4:5.16.3-283.el7
  perl-parent.noarch 1:0.225-244.el7       perl-podlators.noarch 0:2.5.1-3.el7
  perl-threads.x86_64 0:1.87-4.el7         perl-threads-shared.x86_64 0:1.43-6.el7

Complete!

git clone 명령으로 Pinpoint 저장소를 복제합니다.

[root@ip-172-31-7-87 ~]# exit
logout

[centos@ip-172-31-7-87 ~]$ git clone https://github.com/naver/pinpoint.git
Cloning into 'pinpoint'...
remote: Counting objects: 93939, done.
remote: Compressing objects: 100% (218/218), done.
remote: Total 93939 (delta 111), reused 0 (delta 0), pack-reused 93579
Receiving objects: 100% (93939/93939), 151.77 MiB | 7.53 MiB/s, done.
Resolving deltas: 100% (48776/48776), done.

mvn install -Dmaven.test.skip=true 명령으로 Pinpoint를 설치합니다.

maven.test.skip=true은 단위테스트를 건너뛰기 위한 옵션입니다

[centos@ip-172-31-7-87 ~]$ cd pinpoint
[centos@ip-172-31-7-87 pinpoint]$ mvn install -Dmaven.test.skip=true
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] pinpoint
[INFO] pinpoint-thrift
[INFO] pinpoint-commons
[INFO] pinpoint-bootstrap-core
[INFO] pinpoint-bootstrap
[INFO] pinpoint-rpc
[INFO] pinpoint-profiler
[INFO] pinpoint-profiler-optional
[INFO] pinpoint-jdk-http-plugin
[INFO] pinpoint-test
[INFO] pinpoint-redis-plugin
[INFO] pinpoint-servlet-plugin
[INFO] pinpoint-tomcat-plugin
[INFO] pinpoint-plugins
[INFO] pinpoint-agent-distribution
[INFO] pinpoint-collector
[INFO] pinpoint-web
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building pinpoint 1.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://repository.codehaus.org/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.pom
....
....
....
[INFO] Installing /home/centos/pinpoint/web/target/pinpoint-web-1.1.0-SNAPSHOT-classes.jar to /home/centos/.m2/repository/com/navercorp/pinpoint/pinpoint-web/1.1.0-SNAPSHOT/pinpoint-web-1.1.0-SNAPSHOT-classes.jar
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] pinpoint ........................................... SUCCESS [ 23.635 s]
[INFO] pinpoint-thrift .................................... SUCCESS [01:51 min]
[INFO] pinpoint-commons ................................... SUCCESS [01:56 min]
[INFO] pinpoint-bootstrap-core ............................ SUCCESS [  1.393 s]
[INFO] pinpoint-bootstrap ................................. SUCCESS [ 21.062 s]
[INFO] pinpoint-rpc ....................................... SUCCESS [  5.175 s]
[INFO] pinpoint-profiler .................................. SUCCESS [ 48.396 s]
[INFO] pinpoint-profiler-optional ......................... SUCCESS [  0.910 s]
[INFO] pinpoint-jdk-http-plugin ........................... SUCCESS [  0.990 s]
[INFO] pinpoint-test ...................................... SUCCESS [ 34.903 s]
[INFO] pinpoint-redis-plugin .............................. SUCCESS [  1.074 s]
[INFO] pinpoint-servlet-plugin ............................ SUCCESS [  0.887 s]
[INFO] pinpoint-tomcat-plugin ............................. SUCCESS [  1.096 s]
[INFO] pinpoint-plugins ................................... SUCCESS [  0.007 s]
[INFO] pinpoint-agent-distribution ........................ SUCCESS [ 55.523 s]
[INFO] pinpoint-collector ................................. SUCCESS [ 50.376 s]
[INFO] pinpoint-web ....................................... SUCCESS [ 42.698 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 08:37 min
[INFO] Finished at: 2015-03-25T11:38:15+00:00
[INFO] Final Memory: 33M/139M
[INFO] ------------------------------------------------------------------------

HBase 설치, 시작, 초기화

~/pinpoint/quickstart/bin/start-hbase.sh 스크립트를 이용해서 hbase를 다운로드하고 시작합니다.

[centos@ip-172-31-7-87 pinpoint]$ quickstart/bin/start-hbase.sh
Hbase not detected.
Downloading hbase...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 56.5M  100 56.5M    0     0  4030k      0  0:00:14  0:00:14 --:--:-- 5817k
starting master, logging to /home/centos/pinpoint/quickstart/hbase/hbase-0.94.25/bin/../logs/hbase-centos-master-ip-172-31-7-87.out

~/pinpoint/quickstart/bin/init-hbase.sh 스크립트를 이용해서 hbase 테이블을 초기화(initialize)합니다.

[centos@ip-172-31-7-87 pinpoint]$ quickstart/bin/init-hbase.sh
0 row(s) in 1.7520 seconds

0 row(s) in 1.0980 seconds

0 row(s) in 1.0580 seconds

0 row(s) in 2.7240 seconds

0 row(s) in 1.0700 seconds

0 row(s) in 1.0770 seconds

0 row(s) in 2.2110 seconds

0 row(s) in 1.0990 seconds

0 row(s) in 1.0650 seconds

0 row(s) in 1.0530 seconds

0 row(s) in 1.0590 seconds

0 row(s) in 1.0660 seconds

0 row(s) in 1.0470 seconds

0 row(s) in 1.0570 seconds

TABLE
AgentInfo
AgentStat
ApiMetaData
ApplicationIndex
ApplicationMapStatisticsCallee
ApplicationMapStatisticsCaller
ApplicationMapStatisticsSelf
ApplicationStatistics
ApplicationTraceIndex
HostApplicationMap
HostApplicationMap_Ver2
SqlMetaData
StringMetaData
Traces
14 row(s) in 0.0340 seconds

Collector 시작

~/pinpoint/quickstart/bin/start-collector.sh 스크립트를 이용해서 Pinpoint collector를 시작합니다.

[centos@ip-172-31-7-87 pinpoint]$ quickstart/bin/start-collector.sh
---check pinpoint-quickstart-collector process status.---
---initialize pinpoint-quickstart-collector logs.---
mkdir /home/centos/pinpoint/quickstart/logs
mkdir /home/centos/pinpoint/quickstart/logs/pid
---pinpoint-quickstart-collector initialization started. pid=10526.---
starting pinpoint-quickstart-collector. 0 /180 sec(close wait limit).
starting pinpoint-quickstart-collector. 5 /180 sec(close wait limit).
starting pinpoint-quickstart-collector. 10 /180 sec(close wait limit).
starting pinpoint-quickstart-collector. 15 /180 sec(close wait limit).
starting pinpoint-quickstart-collector. 20 /180 sec(close wait limit).
starting pinpoint-quickstart-collector. 25 /180 sec(close wait limit).
starting pinpoint-quickstart-collector. 30 /180 sec(close wait limit).
starting pinpoint-quickstart-collector. 35 /180 sec(close wait limit).
starting pinpoint-quickstart-collector. 40 /180 sec(close wait limit).
starting pinpoint-quickstart-collector. 45 /180 sec(close wait limit).
---pinpoint-quickstart-collector initialization completed. pid=10526.---
03-25 11:41:54 [INFO ](c.n.p.c.r.u.BaseUDPReceiver        :230) Pinpoint-UDP-Stat start.
03-25 11:41:54 [WARN ](c.n.p.c.r.u.BaseUDPReceiver        :211) DatagramSocket.setReceiveBu fferSize() error. 4194304!=212992
03-25 11:41:54 [INFO ](c.n.p.c.r.u.BaseUDPReceiver        :236) UDP Packet reader:2 started .
03-25 11:41:54 [INFO ](c.n.p.c.r.u.BaseUDPReceiver        :132) start ioThread localAddress :0.0.0.0/0.0.0.0, IoThread:Pinpoint-UDP-Span-Io(11-0)
03-25 11:41:54 [INFO ](c.n.p.c.r.u.BaseUDPReceiver        :132) start ioThread localAddress :0.0.0.0/0.0.0.0, IoThread:Pinpoint-UDP-Stat-Io(13-0)
03-25 11:41:54 [INFO ](c.n.p.c.r.u.BaseUDPReceiver        :132) start ioThread localAddress :0.0.0.0/0.0.0.0, IoThread:Pinpoint-UDP-Span-Io(11-1)
03-25 11:41:54 [INFO ](c.n.p.c.r.u.BaseUDPReceiver        :132) start ioThread localAddress :0.0.0.0/0.0.0.0, IoThread:Pinpoint-UDP-Stat-Io(13-1)
03-25 11:41:54 [INFO ](o.s.w.c.ContextLoader              :313) Root WebApplicationContext:  initialization completed in 2246 ms
Mar 25, 2015 11:41:54 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-28082"]

Web UI 시작

~/pinpoint/quickstart/bin/start-web.sh 스크립트를 이용해서 Pinpoint Web UI를 시작합니다.

[centos@ip-172-31-7-87 pinpoint]$ quickstart/bin/start-web.sh
---check pinpoint-quickstart-web process status.---
---initialize pinpoint-quickstart-web logs.---
---pinpoint-quickstart-web initialization started. pid=13397.---
starting pinpoint-quickstart-web. 0 /180 sec(close wait limit).
starting pinpoint-quickstart-web. 5 /180 sec(close wait limit).
starting pinpoint-quickstart-web. 10 /180 sec(close wait limit).
starting pinpoint-quickstart-web. 15 /180 sec(close wait limit).
starting pinpoint-quickstart-web. 20 /180 sec(close wait limit).
starting pinpoint-quickstart-web. 25 /180 sec(close wait limit).
---pinpoint-quickstart-web initialization completed. pid=13397.---
11:44:08 INFO (m.a.DefaultAnnotationHandlerMapping:315) Mapped URL path [/transactionInfo/] onto handler 'businessTransactionController'
11:44:08 INFO (m.a.DefaultAnnotationHandlerMapping:315) Mapped URL path [/transactionList] onto handler 'businessTransactionController'
11:44:08 INFO (m.a.DefaultAnnotationHandlerMapping:315) Mapped URL path [/transactionList.*] onto handler 'businessTransactionController'
11:44:08 INFO (m.a.DefaultAnnotationHandlerMapping:315) Mapped URL path [/transactionList/] onto handler 'businessTransactionController'
11:44:08 INFO (m.a.DefaultAnnotationHandlerMapping:315) Mapped URL path [/lastTransactionList] onto handler 'businessTransactionController'
11:44:08 INFO (m.a.DefaultAnnotationHandlerMapping:315) Mapped URL path [/lastTransactionList.*] onto handler 'businessTransactionController'
11:44:08 INFO (m.a.DefaultAnnotationHandlerMapping:315) Mapped URL path [/lastTransactionList/] onto handler 'businessTransactionController'
11:44:08 INFO (o.s.w.s.DispatcherServlet          :473) FrameworkServlet 'pinpoint-web': initialization completed in 1265 ms
Mar 25, 2015 11:44:08 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-28080"]

TestApp 시작

~/pinpoint/quickstart/bin/start-testapp.sh 스크립트를 이용해서 Pinpoint TestApp을 시작합니다.

[centos@ip-172-31-7-87 ~]$ quickstart/bin/start-testapp.sh
-bash: quickstart/bin/start-testapp.sh: No such file or directory
[centos@ip-172-31-7-87 ~]$ cd pin
-bash: cd: pin: No such file or directory
[centos@ip-172-31-7-87 ~]$ cd pinpoint/
[centos@ip-172-31-7-87 pinpoint]$ quickstart/bin/start-testapp.sh
---check pinpoint-quickstart-testapp process status.---
---initialize pinpoint-quickstart-testapp logs.---
---initialize pinpoint-quickstart-testapp agent.---
---pinpoint-quickstart-testapp initialization started. pid=4048.---
starting pinpoint-quickstart-testapp. 0 /180 sec(close wait limit).
starting pinpoint-quickstart-testapp. 5 /180 sec(close wait limit).
starting pinpoint-quickstart-testapp. 10 /180 sec(close wait limit).
starting pinpoint-quickstart-testapp. 15 /180 sec(close wait limit).
---pinpoint-quickstart-testapp initialization completed. pid=4048.---
2015-03-25 11:48:29 [DEBUG](c.n.p.p.i.b.AspectWeaverClass      :149) JointPoint method __getHeaders(Ljava/lang/String;)Ljava/util/Enumeration; -> invokeOriginal:$_=__getHeaders_$$pinpoint($$);
....
....
....
2015-03-25 11:49:05 [WARN ](c.n.p.r.c.PinpointClientSocketHandshaker:260) Handshake already completed.

확인

설치 및 실행이 완료되면 아래 주소에서 Pinpoint Web UI와 TestApp의 동작을 확인할 수 있습니다.

Web UI - https://localhost:28080

TestApp - https://localhost:28081

TestApp에 있는 여러 링크를 눌러본 후, Pinpoint가 어떻게 동작하는지 확인합니다.

종료

각각 아래의 스크립트로 종료합니다.

HBase - ~/pinpoint/quickstart/bin/stop-hbase.sh

Collector ~/pinpoint/quickstart/bin/stop-collector.sh

Web UI - ~/pinpoint/quickstart/bin/stop-web.sh

TestApp - ~/pinpoint/quickstart/bin/stop-testapp.sh


태그 : java, pinpoint

댓글()
  1. keunhyoung 2016.06.09 17:28 댓글주소  수정/삭제  댓글쓰기

    JAVA_8_HOME 값을 설정하지 않으면 mvn install 시 Error가 납니다

CentOS 7에 Hadoop 설치

설치&설정|2015. 3. 9. 21:10

CentOS 7에 Hadoop 설치

이전 글에서 CentOS 7을 AWS에 설치 했었습니다.

AWS에 CentOS 7 설치

사실 Hadoop + HBase를 설치하기 위한 사전 작업이어서 오늘은 먼저 Hadoop을 설치해 봅니다.

먼저 JDK를 설치하는 등 기본 환경을 설정합니다.

[centos@ip-172-31-3-215 ~]$ sudo -i

# Oracle JDK 8을 다운로드합니다. 혹 아래 명령으로 다운로드가 안되면 직접 사이트에서 다운로드 해서 가져옵니다
[  root@ip-172-31-3-215 ~]# wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u25-b17/jdk-8u25-linux-x64.tar.gz"

# /opt 디렉토리에 압축을 해제합니다
[  root@ip-172-31-3-215 ~]# tar -zxvf jdk-8u25-linux-x64.tar.gz -C /opt

# 방금 설치한 Oracle JDK를 기본 JDK로 설정합니다
[  root@ip-172-31-3-215 ~]#  /usr/sbin/alternatives --install /usr/bin/java java /opt/jdk1.8.0_25/bin/java 100

# java 버전을 확인합니다
[  root@ip-172-31-3-215 ~]# java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

# /etc/profile 파일에 JAVA_HOME 환경 변수를 추가합니다
[  root@ip-172-31-3-215 ~]# vi /etc/profile
export JAVA_HOME=/opt/jdk1.8.0_25

JDK 설치가 완료됐으면 이제 hadoop 계정을 추가하고 SSH 키를 생성합니다.

# root 계정으로 전환한 후 hadoop 계정을 추가합니다
[centos@ip-172-31-3-215 ~]$ sudo -i
[  root@ip-172-31-3-215 ~]# useradd hadoop
[  root@ip-172-31-3-215 ~]# su - hadoop

# 생성한 hadoop 계정으로 전환한 후 ssh-keygen 명령으로 SSH 키를 생성합니다
[hadoop@ip-172-31-3-215 ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/hadoop/.ssh/id_rsa):
Created directory '/home/hadoop/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/hadoop/.ssh/id_rsa.
Your public key has been saved in /home/hadoop/.ssh/id_rsa.pub.
The key fingerprint is:
92:14:bd:ff:f6:26:bd:4d:ad:39:99:c6:ce:2e:a4:73 hadoop@ip-172-31-3-215
The key's randomart image is:
+--[ RSA 2048]----+
|      ..         |
|       ..        |
|      .  .       |
|     . ..        |
|      o S.       |
|       .  . .   .|
|           + o oo|
|          o E.O= |
|           + OOo.|
+-----------------+

# 암호 없이 ssh 접속이 가능하도록 공개키를 authorized_keys 파일에 추가합니다
[hadoop@ip-172-31-3-215 ~]$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
[hadoop@ip-172-31-3-215 ~]$ chmod 0600 ~/.ssh/authorized_keys
[hadoop@ip-172-31-3-215 ~]$ ssh localhost
Last login: Sun Mar  8 07:01:41 2015

이제 hadoop을 내려받고 설치합니다.

[hadoop@ip-172-31-3-215 ~]$ wget http://apache.mirror.cdnetworks.com/hadoop/common/hadoop-2.5.2/hadoop-2.5.2.tar.gz
[hadoop@ip-172-31-3-215 ~]$ tar xvfz hadoop-2.5.2.tar.gz

.bashrc 파일에 관련 환경 변수를 추가합니다

[hadoop@ip-172-31-3-215 ~]$ cd hadoop-2.5.2
[hadoop@ip-172-31-3-215 hadoop-2.5.2]$ vi ~/.bashrc
export HADOOP_HOME=/home/hadoop/hadoop-2.5.2
export HADOOP_INSTALL=$HADOOP_HOME
export HADOOP_MAPRED_HOME=$HADOOP_HOME
export HADOOP_COMMON_HOME=$HADOOP_HOME
export HADOOP_HDFS_HOME=$HADOOP_HOME
export HADOOP_YARN_HOME=$HADOOP_HOME
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native
export PATH=$PATH:$HADOOP_HOME/sbin:$HADOOP_HOME/bin
export JAVA_LIBRARY_PATH=$HADOOP_HOME/lib/native:$JAVA_LIBRARY_PATH

source 명령을 이용해서 환경 변수를 현재 환경에 읽어 들입니다.

[hadoop@ip-172-31-3-215 hadoop-2.5.2]$ source ~/.bashrc

$HADOOP_HOME/etc/hadoop/core-site.xml 파일을 열고

[hadoop@ip-172-31-3-215 hadoop-2.5.2]$ vi etc/hadoop/core-site.xml

아래와 같이 내용을 추가합니다.

<configuration>
  <property>
    <name>fs.default.name</name>
    <value>hdfs://localhost:9000</value>
  </property>
</configuration>

$HADOOP_HOME/etc/hadoop/hdfs-site.xml 파일을 열고

[hadoop@ip-172-31-3-215 hadoop-2.5.2]$ vi etc/hadoop/hdfs-site.xml

아래와 같이 내용을 추가합니다.

<configuration>

  <property>
    <name>dfs.replication</name>
    <value>1</value>
  </property>

  <property>
    <name>dfs.name.dir</name>
    <value>file:///home/hadoop/hadoopdata/hdfs/namenode</value>
  </property>

  <property>
    <name>dfs.data.dir</name>
    <value>file:///home/hadoop/hadoopdata/hdfs/datanode</value>
  </property>

</configuration>

$HADOOP_HOME/etc/hadoop/mapred-site.xml 파일을 열고

아래와 같이 내용을 추가합니다.

<configuration>

  <property>
    <name>mapreduce.framework.name</name>
    <value>yarn</value>
  </property>

</configuration>

namenode를 포맷합니다.

[hadoop@ip-172-31-3-215 hadoop-2.5.2]$ hdfs namenode -format

Hadoop을 시작합니다.

# dfs daemon을 시작합니다
[hadoop@ip-172-31-3-215 hadoop-2.5.2]$ start-dfs.sh
Starting namenodes on [localhost]
localhost: starting namenode, logging to /home/hadoop/hadoop-2.5.2/logs/hadoop-hadoop-namenode-ip-172-31-3-215.ap-northeast-1.compute.internal.out
localhost: starting datanode, logging to /home/hadoop/hadoop-2.5.2/logs/hadoop-hadoop-datanode-ip-172-31-3-215.ap-northeast-1.compute.internal.out
Starting secondary namenodes [0.0.0.0]
0.0.0.0: starting secondarynamenode, logging to /home/hadoop/hadoop-2.5.2/logs/hadoop-hadoop-secondarynamenode-ip-172-31-3-215.ap-northeast-1.compute.internal.out

# yarn daemon을 시작합니다
[hadoop@ip-172-31-3-215 hadoop-2.5.2]$ start-yarn.sh
starting yarn daemons
starting resourcemanager, logging to /home/hadoop/hadoop-2.5.2/logs/yarn-hadoop-resourcemanager-ip-172-31-3-215.ap-northeast-1.compute.internal.out
localhost: starting nodemanager, logging to /home/hadoop/hadoop-2.5.2/logs/yarn-hadoop-nodemanager-ip-172-31-3-215.ap-northeast-1.compute.internal.out

jps(Java Virtual Machine Process Status Tool)로 java 프로세스를 확인합니다.

[hadoop@ip-172-31-3-215 hadoop-2.5.2]$ $JAVA_HOME/bin/jps
4981 NodeManager
5400 Jps
4889 ResourceManager
4747 SecondaryNameNode
4494 NameNode


댓글()
  1. 맞는건가 2017.08.24 16:28 댓글주소  수정/삭제  댓글쓰기

    $HADOOP_HOME/etc/hadoop/hdfs-site.xml 파일 열 떄 명령어가 잘못된 것 아닌가요? core-site.xml파일 여는 것 같은뎁

  2. BlogIcon visavis2k 2017.08.24 23:26 신고 댓글주소  수정/삭제  댓글쓰기

    수정했습니다. 감사합니다!

CentOS 공개키 인증으로 암호 없이 로그인

설치&설정|2014. 10. 18. 21:31

Client(PC)에서 키 생성

아래와 같이 ssh-keygen 명령을 이용해서 키를 생성하면, [home directory]/.ssh 디렉토리에 id_rsa.pub 파일이 생성된 것을 확인할 수 있습니다.

$ ssh-keygen -t rsa -C 'your@email.addr'
Generating public/private rsa key pair.
Enter file in which to save the key (/home/deployer/.ssh/id_rsa):
Created directory '/home/deployer/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/deployer/.ssh/id_rsa.
Your public key has been saved in /home/deployer/.ssh/id_rsa.pub.
The key fingerprint is:
df:07:63:c5:46:ff:9b:ac:03:b6:ed:70:b7:77:f2:1e your@email.addr
The key's randomart image is:
+--[ RSA 2048]----+
|              .  |
|             o . |
|              + .|
|             o  .|
|        S   +   .|
|         . = o. o|
|          o.=..E |
|           .o++ =|
|            .o.==|
+-----------------+

Server에서 키 등록

서버에서는 로그인 하려는 사용자의 홈디렉토리에 .ssh 디렉토리와 .ssh/authorized_key 파일을 생성하고, 파일 내용으로 id_rsa.pub 키를 넣어 줍니다.

$ cd ~
$ mkdir -m 700 .ssh
$ cd .ssh

### Client에서 생성한 id_rsa.pub 키 값을 내용으로       ###
### authorized_keys 파일을 ~/.ssh 디렉토리에 생성합니다 ###
$ echo 'ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAvrdrApARFpicubfKHMVmNpEB6P3KsoVuXQOPPTPTOTveWsrYiPYesFSn6c9xaS3ZN8041A0/pIZU2clc94Rt+hPoU0Lgpv2nZ8WJoVPXNbHWRehF8VtrpOp4emnyi52wRtzGF7pBaazwRhNVFI1HF89IwEKX8LNXAsbOmpTR9HGZ5Y+qt2dZzRdX4s7G3ReqFa6t8lkErVolr9Z8HxyAZ9ubOQ58tK4uTnFdSAa1bRWeEKO/E+GfPnuMfFu2kT//9BrDDc2iy/eTtXL/3bJ4CNJ0ydDutGNP/H+D2IPgXx2ueawXVACSEQ4gczBTTTy/XJjHsaLiX23Z3eb+4BFvhQ== your@email.addr' >> authorized_keys

### authorized_keys 파일에 권한 설정                   ###
$ chmod 600 authorized_keys

Server에서 키 기반 인증 허용

/etc/ssh/sshd_config 파일의 내용을 확인한 후, 키 기반 인증이 허용이 안되어 있으면 수정한다.

아래와 같이 키 기반 인증에 관한 항목에 주석 처리가 되어 있으면 주석을 해제한다.

#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile      .ssh/authorized_keys

sshd_config 파일을 수정했으면 sshd를 재시작한다.

$ service sshd restart

태그 : ssh

댓글()

시스템 환경변수 설정

설치&설정|2007. 10. 28. 19:32

이제 압축을 푼 후 새로 생성된 'D:\SDK\groovy-1.1-rc-1' 디렉토리를 Groovy의 홈디렉토리로 설정합니다. 저는 관리자 권한으로 명령 프롬프트를 실행한 후, 설정했습니다.

C:\>reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v GROOVY_HOME /d D:\SDK\groovy-1.1-rc-1
C:\Documents and Settings\MyHome>echo %GROOVY_HOME%
%GROOVY_HOME%
C:\Documents and Settings\MyHome>set GROOVY_HOME=D:\SDK\groovy-1.1-rc-1
C:\Documents and Settings\MyHome>echo %GROOVY_HOME%
D:\SDK\groovy-1.1-rc-1

첫째 줄은 시스템 환경 변수에 GROOVY_HOME을 추가하는 명령입니다. 마지막 옵션으로 쓰인 디렉토리 경로를 본인의 환경에 알맞게 고쳐서 실행하시면됩니다. 세번째 줄에서 set 명령으로 GROOVY_HOME을 다시 설정한 이유는 현재 이 명령을 수행하고 있는 유저에게는 GROOVY_HOME 환경변수가 적용이 안된 상태라서 임시로 변수를 설정한 것입니다(다시 로그인하면 set 명령 없이 환경변수가 설정됩니다).


태그 : 시스템

댓글()