레이블이 download인 게시물을 표시합니다. 모든 게시물 표시
레이블이 download인 게시물을 표시합니다. 모든 게시물 표시

2022년 12월 7일 수요일

Microsoft .NET 7, 이제 IBM Power에서도 지원

 


.NET 7이 이제 Linux on Power (ppc64le)에서도 지원됩니다.  즉 ppc64le 아키텍처의 Power 서버에서는 C# 언어도 지원하게 되었습니다.  이로써 microservices app 개발에 사용되는 5개 프로그래밍 언어가 모두 ppc64le에서 지원됩니다.  





즉, 과거에는 Oracle 등 AIX에서 수행되는 기간계 시스템과 연계하여 C# 언어로 작성된 업무 프로그램을 사용하기 위해서는 Windows 또는 Linux를 설치한 x86 시스템이 필요했으나, 이제는 x86이 필요하지 않고 같은 Power 시스템에 설치된 Redhat 또는 Openshift container에서 C# 업무 프로그램을 운용할 수 있게 된 것입니다.  





2021년 Stack Overflow에서의 개발자 설문에 따르면 .NET framework은 전업 개발자들에게 있어서 가장 중요한 프레임웍 및 라이브러리입니다. 







관련 발표는 아래 URL에서 좀 더 자세히 보실 수 있습니다.


https://community.ibm.com/community/user/powerdeveloper/blogs/janani-janakiraman/2022/11/07/net7-support-linux-on-power


또한 .NET 7 ppc64le는 이미 고객 reference가 있습니다.  독일의 컴퓨터 설계 관련 기업인 SKM Informatik GmbH인데, 이 기업의 요청으로 .NET 7의 ppc64le 지원이 시작되었다고 합니다.


https://www.ibm.com/downloads/cas/29RYARBY


.NET 7은 github에 그 source code가 공개되니 직접 build 하셔도 됩니다만, .NET 7 for ppc64le는 Openshift container 이미지로 제공되고 또 RHEL 8.7 또는 RHEL 9.1에서 YUM repository를 통해서도 제공됩니다.  


.NET 7 관련된 패키지들은 yum 명령어를 통해 패키지로 아래 예와 같이 설치하실 수 있습니다.  


[cecuser@p1274-pvm1 ~]$ hostnamectl

   Static hostname: p1274-pvm1

         Icon name: computer-vm

           Chassis: vm

        Machine ID: e5e70adcd98c4b56b00cc49cbf093412

           Boot ID: 36e5448112b5432c91f40abe413cb05a

    Virtualization: powervm

  Operating System: Red Hat Enterprise Linux 8.7 (Ootpa)

       CPE OS Name: cpe:/o:redhat:enterprise_linux:8::baseos

            Kernel: Linux 4.18.0-372.9.1.el8.ppc64le

      Architecture: ppc64-le



[cecuser@p1274-pvm1 ~]$ yum list | grep dotnet

dotnet.ppc64le                                          7.0.100-1.el8_7                                             rhel-8-for-ppc64le-appstream-rpms

dotnet-apphost-pack-7.0.ppc64le                         7.0.0-1.el8_7                                               rhel-8-for-ppc64le-appstream-rpms

dotnet-host.ppc64le                                     7.0.0-1.el8_7                                               rhel-8-for-ppc64le-appstream-rpms

dotnet-hostfxr-7.0.ppc64le                              7.0.0-1.el8_7                                               rhel-8-for-ppc64le-appstream-rpms

dotnet-runtime-7.0.ppc64le                              7.0.0-1.el8_7                                               rhel-8-for-ppc64le-appstream-rpms

dotnet-sdk-7.0.ppc64le                                  7.0.100-1.el8_7                                             rhel-8-for-ppc64le-appstream-rpms

dotnet-sdk-7.0-source-built-artifacts.ppc64le           7.0.100-1.el8_7                                             codeready-builder-for-rhel-8-ppc64le-rpms

dotnet-targeting-pack-7.0.ppc64le                       7.0.0-1.el8_7                                               rhel-8-for-ppc64le-appstream-rpms

dotnet-templates-7.0.ppc64le                            7.0.100-1.el8_7                                             rhel-8-for-ppc64le-appstream-rpms




[cecuser@p1274-pvm1 ~]$ sudo yum install dotnet-sdk-7.0

Updating Subscription Management repositories.

Last metadata expiration check: 23:10:11 ago on Tue 06 Dec 2022 03:10:01 AM EST.

Dependencies resolved.

===================================================================================================

 Package                        Arch    Version            Repository                         Size

===================================================================================================

Installing:

 dotnet-sdk-7.0                 ppc64le 7.0.100-1.el8_7    rhel-8-for-ppc64le-appstream-rpms  53 M

Installing dependencies:

 aspnetcore-runtime-7.0         ppc64le 7.0.0-1.el8_7      rhel-8-for-ppc64le-appstream-rpms 2.8 M

 aspnetcore-targeting-pack-7.0  ppc64le 7.0.0-1.el8_7      rhel-8-for-ppc64le-appstream-rpms 1.6 M

 dotnet-apphost-pack-7.0        ppc64le 7.0.0-1.el8_7      rhel-8-for-ppc64le-appstream-rpms 100 k

 dotnet-host                    ppc64le 7.0.0-1.el8_7      rhel-8-for-ppc64le-appstream-rpms 190 k

 dotnet-hostfxr-7.0             ppc64le 7.0.0-1.el8_7      rhel-8-for-ppc64le-appstream-rpms 175 k

 dotnet-runtime-7.0             ppc64le 7.0.0-1.el8_7      rhel-8-for-ppc64le-appstream-rpms 7.8 M

 dotnet-targeting-pack-7.0      ppc64le 7.0.0-1.el8_7      rhel-8-for-ppc64le-appstream-rpms 2.9 M

 dotnet-templates-7.0           ppc64le 7.0.100-1.el8_7    rhel-8-for-ppc64le-appstream-rpms 3.1 M

 netstandard-targeting-pack-2.1 ppc64le 7.0.100-1.el8_7    rhel-8-for-ppc64le-appstream-rpms 1.5 M


Transaction Summary

===================================================================================================

Install  10 Packages


Total download size: 73 M

Installed size: 311 M

Is this ok [y/N]: y


...


Installed:

  aspnetcore-runtime-7.0-7.0.0-1.el8_7.ppc64le

  aspnetcore-targeting-pack-7.0-7.0.0-1.el8_7.ppc64le

  dotnet-apphost-pack-7.0-7.0.0-1.el8_7.ppc64le

  dotnet-host-7.0.0-1.el8_7.ppc64le

  dotnet-hostfxr-7.0-7.0.0-1.el8_7.ppc64le

  dotnet-runtime-7.0-7.0.0-1.el8_7.ppc64le

  dotnet-sdk-7.0-7.0.100-1.el8_7.ppc64le

  dotnet-targeting-pack-7.0-7.0.0-1.el8_7.ppc64le

  dotnet-templates-7.0-7.0.100-1.el8_7.ppc64le

  netstandard-targeting-pack-2.1-7.0.100-1.el8_7.ppc64le


Complete!


설치는 위와 같이 매우 간단합니다.  이제 "Hello, World!"를 프린트하는 샘플 프로그램을 돌려보도록 하겠습니다.


[cecuser@p1274-pvm1 ~]$ dotnet


Usage: dotnet [options]

Usage: dotnet [path-to-application]


Options:

  -h|--help         Display help.

  --info            Display .NET information.

  --list-sdks       Display the installed SDKs.

  --list-runtimes   Display the installed runtimes.


path-to-application:

  The path to an application .dll file to execute.



[cecuser@p1274-pvm1 ~]$ dotnet new console -o MyApp -f net7.0


Welcome to .NET 7.0!

---------------------

SDK Version: 7.0.100


----------------

Installed an ASP.NET Core HTTPS development certificate.

To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).

Learn about HTTPS: https://aka.ms/dotnet-https

----------------

Write your first app: https://aka.ms/dotnet-hello-world

Find out what's new: https://aka.ms/dotnet-whats-new

Explore documentation: https://aka.ms/dotnet-docs

Report issues and find source on GitHub: https://github.com/dotnet/core

Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli

--------------------------------------------------------------------------------------

The template "Console App" was created successfully.


Processing post-creation actions...

Restoring /home/cecuser/MyApp/MyApp.csproj:

  Determining projects to restore...

  Restored /home/cecuser/MyApp/MyApp.csproj (in 200 ms).

Restore succeeded.



[cecuser@p1274-pvm1 ~]$ cd MyApp


[cecuser@p1274-pvm1 MyApp]$  ls -la

total 12

drwxrwxr-x.  3 cecuser cecuser   55 Dec  7 02:24 .

drwx------. 23 cecuser cecuser 4096 Dec  7 02:24 ..

-rw-rw-r--.  1 cecuser cecuser  239 Dec  7 02:24 MyApp.csproj

drwxrwxr-x.  2 cecuser cecuser  168 Dec  7 02:24 obj

-rw-rw-r--.  1 cecuser cecuser  103 Dec  7 02:24 Program.cs


[cecuser@p1274-pvm1 MyApp]$ cat Program.cs

// See https://aka.ms/new-console-template for more information

Console.WriteLine("Hello, World!");


[cecuser@p1274-pvm1 MyApp]$ dotnet run

Hello, World!


[cecuser@p1274-pvm1 MyApp]$ ls -ltr

total 8

-rw-rw-r--. 1 cecuser cecuser 239 Dec  7 02:24 MyApp.csproj

-rw-rw-r--. 1 cecuser cecuser 103 Dec  7 02:24 Program.cs

drwxrwxr-x. 3 cecuser cecuser 181 Dec  7 02:26 obj

drwxrwxr-x. 3 cecuser cecuser  19 Dec  7 02:26 bin


[cecuser@p1274-pvm1 MyApp]$ ls -ltr bin/Debug/net7.0

total 168

-rw-rw-r--. 1 cecuser cecuser  10828 Dec  7 02:26 MyApp.pdb

-rw-rw-r--. 1 cecuser cecuser   4608 Dec  7 02:26 MyApp.dll

-rwxr-xr-x. 1 cecuser cecuser 139488 Dec  7 02:26 MyApp

-rw-rw-r--. 1 cecuser cecuser    385 Dec  7 02:26 MyApp.deps.json

-rw-rw-r--. 1 cecuser cecuser    139 Dec  7 02:26 MyApp.runtimeconfig.json


[cecuser@p1274-pvm1 MyApp]$ ./bin/Debug/net7.0/MyApp

Hello, World!




다만 아래의 MS 홈페이지의 .NET download 사이트에서는 ppc64le 관련 패키지는 별도로 제공되지 않네요.


https://devblogs.microsoft.com/dotnet/announcing-dotnet-7/







2017년 11월 22일 수요일

ppc64le에서의 hadoop build와 구성 방법

* 아래에서 빌드한 hadoop-2.7.4.tar.gz는 아래 링크에서 download 받으실 수 있도록 google drive에 올려놓았습니다.

https://drive.google.com/open?id=1W0QYAD5DkSeY_vBHRHmu_iril4t9svJz

POWER (ppc64le) chip 위에서 hadoop을 compile하는 것은 매우 간단합니다.  그냥 https://github.com/apache/hadoop/blob/trunk/BUILDING.txt 에 나온 대로 따라 하면 됩니다.  딱 하나, protobuf 버전이 안 맞는 문제 때문에 아래와 처럼 protobuf 2.5를 별도로 설치하는 부분만 추가됩니다.

먼저 Ubuntu OS에서 기본으로 필요한 다음 package들을 설치합니다.

u0017649@sys-90043:~$ sudo apt-get install software-properties-common

u0017649@sys-90043:~$ sudo apt-get -y install maven build-essential autoconf automake libtool cmake zlib1g-dev pkg-config libssl-dev  protobuf-compiler snappy libsnappy-dev 

u0017649@sys-90043:~$ sudo apt-get install libjansson-dev bzip2 libbz2-dev fuse libfuse-dev zstd

protoc를 위해 protobuf 2.5.0의 source를 다운받아서 아래와 같이 설치합니다.  apt-get으로 설치 가능한 OS에 포함된 버전은 2.6.1인데, 묘하게도 hadoop에서는 2.5.0을 꼭 써야 한다고 고집하네요.

u0017649@sys-90043:~$ git clone --recursive https://github.com/ibmsoe/Protobuf.git
u0017649@sys-90043:~$ cd Protobuf
u0017649@sys-90043:~/Protobuf$ ./configure
u0017649@sys-90043:~/Protobuf$ make
u0017649@sys-90043:~/Protobuf$ sudo make install
u0017649@sys-90043:~/Protobuf$ which protoc
/usr/local/bin/protoc

* 참고로, 위와 같이 protobuf를 따로 해주지 않으면 아래와 같은 error 발생합니다.

[ERROR] Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:3.1.0-SNAPSHOT:protoc (compile-protoc) on project hadoop-common: org.apache.maven.plugin.MojoExecutionException: protoc version is 'libprotoc 2.6.1', expected version is '2.5.0' -> [Help 1]

환경 변수도 설정합니다.

u0017649@sys-90043:~$ export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-ppc64el
u0017649@sys-90043:~$ export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
u0017649@sys-90043:~$ export MAVEN_OPTS="-Xmx2048m"

그리고나서 hadoop-2.7.4의 source를 다음과 같이 download 받습니다.   현재 최신 버전은 3.0인데, 이건 아직 안정화 버전은 아닌 것 같고, 최근 버전의 HortonWorks에 포함된 버전인 2.7.4로 하겠습니다.

u0017649@sys-90043:~$ wget http://apache.tt.co.kr/hadoop/common/hadoop-2.7.4/hadoop-2.7.4-src.tar.gz
u0017649@sys-90043:~$ tar -zxf hadoop-2.7.4-src.tar.gz
u0017649@sys-90043:~$ cd hadoop-2.7.4-src

빌드 자체는 maven으로 수행되는데, 시간은 좀 걸립니다만 상대적으로 매우 간단합니다.  아래와 같이 수행하면 빌드된 binary가 tar.gz로 묶여서 hadoop-dist/target 디렉토리에 생성됩니다.

u0017649@sys-90043:~/hadoop-2.7.4-src$ mvn package -Pdist -DskipTests -Dtar
...
main:
     [exec] $ tar cf hadoop-2.7.4.tar hadoop-2.7.4
     [exec] $ gzip -f hadoop-2.7.4.tar
     [exec]
     [exec] Hadoop dist tar available at: /home/u0017649/hadoop-2.7.4-src/hadoop-dist/target/hadoop-2.7.4.tar.gz
     [exec]
[INFO] Executed tasks
[INFO]
[INFO] --- maven-javadoc-plugin:2.8.1:jar (module-javadocs) @ hadoop-dist ---
[INFO] Building jar: /home/u0017649/hadoop-2.7.4-src/hadoop-dist/target/hadoop-dist-2.7.4-javadoc.jar
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Hadoop Main ................................. SUCCESS [  4.780 s]
[INFO] Apache Hadoop Build Tools .......................... SUCCESS [  2.711 s]
[INFO] Apache Hadoop Project POM .......................... SUCCESS [  1.633 s]
[INFO] Apache Hadoop Annotations .......................... SUCCESS [  2.645 s]
[INFO] Apache Hadoop Assemblies ........................... SUCCESS [  0.386 s]
[INFO] Apache Hadoop Project Dist POM ..................... SUCCESS [  2.546 s]
[INFO] Apache Hadoop Maven Plugins ........................ SUCCESS [  6.019 s]
[INFO] Apache Hadoop MiniKDC .............................. SUCCESS [ 11.630 s]
[INFO] Apache Hadoop Auth ................................. SUCCESS [ 12.236 s]
[INFO] Apache Hadoop Auth Examples ........................ SUCCESS [  9.364 s]
[INFO] Apache Hadoop Common ............................... SUCCESS [02:21 min]
[INFO] Apache Hadoop NFS .................................. SUCCESS [ 11.743 s]
[INFO] Apache Hadoop KMS .................................. SUCCESS [ 16.980 s]
[INFO] Apache Hadoop Common Project ....................... SUCCESS [  3.316 s]
[INFO] Apache Hadoop HDFS ................................. SUCCESS [02:42 min]
[INFO] Apache Hadoop HttpFS ............................... SUCCESS [ 34.161 s]
[INFO] Apache Hadoop HDFS BookKeeper Journal .............. SUCCESS [ 13.819 s]
[INFO] Apache Hadoop HDFS-NFS ............................. SUCCESS [  5.306 s]
[INFO] Apache Hadoop HDFS Project ......................... SUCCESS [  0.080 s]
[INFO] hadoop-yarn ........................................ SUCCESS [  0.073 s]
[INFO] hadoop-yarn-api .................................... SUCCESS [ 39.900 s]
[INFO] hadoop-yarn-common ................................. SUCCESS [ 41.698 s]
[INFO] hadoop-yarn-server ................................. SUCCESS [  0.160 s]
[INFO] hadoop-yarn-server-common .......................... SUCCESS [ 13.859 s]
[INFO] hadoop-yarn-server-nodemanager ..................... SUCCESS [ 16.781 s]
[INFO] hadoop-yarn-server-web-proxy ....................... SUCCESS [  5.143 s]
[INFO] hadoop-yarn-server-applicationhistoryservice ....... SUCCESS [ 10.619 s]
[INFO] hadoop-yarn-server-resourcemanager ................. SUCCESS [ 25.832 s]
[INFO] hadoop-yarn-server-tests ........................... SUCCESS [  6.436 s]
[INFO] hadoop-yarn-client ................................. SUCCESS [  9.209 s]
[INFO] hadoop-yarn-server-sharedcachemanager .............. SUCCESS [  4.691 s]
[INFO] hadoop-yarn-applications ........................... SUCCESS [  0.052 s]
[INFO] hadoop-yarn-applications-distributedshell .......... SUCCESS [  4.187 s]
[INFO] hadoop-yarn-applications-unmanaged-am-launcher ..... SUCCESS [  2.589 s]
[INFO] hadoop-yarn-site ................................... SUCCESS [  0.052 s]
[INFO] hadoop-yarn-registry ............................... SUCCESS [  8.977 s]
[INFO] hadoop-yarn-project ................................ SUCCESS [  4.737 s]
[INFO] hadoop-mapreduce-client ............................ SUCCESS [  0.271 s]
[INFO] hadoop-mapreduce-client-core ....................... SUCCESS [ 28.766 s]
[INFO] hadoop-mapreduce-client-common ..................... SUCCESS [ 18.916 s]
[INFO] hadoop-mapreduce-client-shuffle .................... SUCCESS [  6.326 s]
[INFO] hadoop-mapreduce-client-app ........................ SUCCESS [ 12.547 s]
[INFO] hadoop-mapreduce-client-hs ......................... SUCCESS [  8.090 s]
[INFO] hadoop-mapreduce-client-jobclient .................. SUCCESS [ 10.544 s]
[INFO] hadoop-mapreduce-client-hs-plugins ................. SUCCESS [  2.727 s]
[INFO] Apache Hadoop MapReduce Examples ................... SUCCESS [  7.638 s]
[INFO] hadoop-mapreduce ................................... SUCCESS [  3.216 s]
[INFO] Apache Hadoop MapReduce Streaming .................. SUCCESS [  6.935 s]
[INFO] Apache Hadoop Distributed Copy ..................... SUCCESS [ 15.235 s]
[INFO] Apache Hadoop Archives ............................. SUCCESS [  4.425 s]
[INFO] Apache Hadoop Rumen ................................ SUCCESS [  7.658 s]
[INFO] Apache Hadoop Gridmix .............................. SUCCESS [  5.281 s]
[INFO] Apache Hadoop Data Join ............................ SUCCESS [  3.525 s]
[INFO] Apache Hadoop Ant Tasks ............................ SUCCESS [  2.382 s]
[INFO] Apache Hadoop Extras ............................... SUCCESS [  4.387 s]
[INFO] Apache Hadoop Pipes ................................ SUCCESS [  0.031 s]
[INFO] Apache Hadoop OpenStack support .................... SUCCESS [  6.296 s]
[INFO] Apache Hadoop Amazon Web Services support .......... SUCCESS [ 14.099 s]
[INFO] Apache Hadoop Azure support ........................ SUCCESS [  6.764 s]
[INFO] Apache Hadoop Client ............................... SUCCESS [  8.594 s]
[INFO] Apache Hadoop Mini-Cluster ......................... SUCCESS [  1.873 s]
[INFO] Apache Hadoop Scheduler Load Simulator ............. SUCCESS [  8.096 s]
[INFO] Apache Hadoop Tools Dist ........................... SUCCESS [  8.972 s]
[INFO] Apache Hadoop Tools ................................ SUCCESS [  0.039 s]
[INFO] Apache Hadoop Distribution ......................... SUCCESS [01:00 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15:09 min
[INFO] Finished at: 2017-11-21T22:31:05-05:00
[INFO] Final Memory: 205M/808M
[INFO] ------------------------------------------------------------------------


이제 이렇게 빌드된 tar.gz을 가지고 hadoop을 (비록 1대이지만) 기본 구성하는 것을 해보겠습니다.

가령 Minsky 서버로 docker 기반의 cloud 서비스를 해주는 Nimbix cloud의 가상 머신을 사용하고 계시다면, 유일한 persistent storage인 /data에 hadoop을 설치하셔야 합니다.  그 외의 directory들에 설치하면 이 Nimbix instance를 reboot 하면 다 초기화 되어 없어져 버립니다.  이는 Nimbix가 진짜 가상 머신이 아니라 docker instance이기 때문입니다.

아래와 같이 /data 밑에 그냥 hadoop tar.gz 파일을 풀어놓으면 설치는 끝납니다.

u0017649@sys-90043:~$ cd /data
u0017649@sys-90043:/data$ tar -zxf /home/u0017649/hadoop-2.7.4-src/hadoop-dist/target/hadoop-2.7.4.tar.gz
u0017649@sys-90043:/data$ cd hadoop-2.7.4

이제 기본 환경 변수를 설정합니다.  JAVA_HOME도 위에서처럼 제대로 설정해주셔야 합니다.

u0017649@sys-90043:/data/hadoop-2.7.4$ export HADOOP_INSTALL=/data/hadoop-2.7.4
u0017649@sys-90043:/data/hadoop-2.7.4$ export PATH=$PATH:$HADOOP_INSTALL/bin:$HADOOP_INSTALL/sbin

일단 hadoop binary가 제대로 작동하는지 확인합니다.

u0017649@sys-90043:/data/hadoop-2.7.4$ hadoop version
Hadoop 2.7.4
Subversion Unknown -r Unknown
Compiled by u0017649 on 2017-11-22T03:17Z
Compiled with protoc 2.5.0
From source with checksum 50b0468318b4ce9bd24dc467b7ce1148
This command was run using /data/hadoop-2.7.4/share/hadoop/common/hadoop-common-2.7.4.jar

그리고나서 configuration directory에 들어가 기본 설정을 다음과 같이 해줍니다.

u0017649@sys-90043:/data/hadoop-2.7.4$ cd etc/hadoop

u0017649@sys-90043:/data/hadoop-2.7.4/etc/hadoop$ vi hadoop-env.sh
...
#export JAVA_HOME=${JAVA_HOME}
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-ppc64el
...

u0017649@sys-90043:/data/hadoop-2.7.4/etc/hadoop$ vi core-site.xml
<configuration>
 <property>
  <name>fs.default.name</name>
  <value>hdfs://localhost:9000</value>
 </property>

 <property>
  <name>hadoop.tmp.dir</name>
  <value>/data/hadoop-2.7.4/hadoop-${user.name}</value>
 </property>
</configuration>

u0017649@sys-90043:/data/hadoop-2.7.4/etc/hadoop$ vi mapred-site.xml
<configuration>
 <property>
  <name>mapred.job.tracker</name>
  <value>localhost:9001</value>
 </property>

 <property>
  <name>mapred.local.dir</name>
  <value>${hadoop.tmp.dir}/mapred/local</value>
 </property>

 <property>
  <name>mapred.system.dir</name>
  <value>${hadoop.tmp.dir}/mapred/system</value>
 </property>
</configuration>

slaves 파일에는 자기 자신인 localhost를 적어 줍니다.  그러면 자기 자신이 namenode도 되고 datanode도 되는 것입니다.

u0017649@sys-90043:/data/hadoop-2.7.4/etc/hadoop$ cat slaves
localhost

이제 hadoop을 기동시켜 볼텐데, 그러자면 먼저 localhost 자신에 대해서도 passwd 없이 "ssh localhost" 와 "ssh 0.0.0.0"이 가능하도록 ssh-keygen 및 ssh-copy-id가 수행되어야 합니다.

이제 namenode 포맷을 합니다.

u0017649@sys-90043:~$ hadoop namenode -format
...
17/11/21 23:53:38 INFO namenode.FSImageFormatProtobuf: Image file /data/hadoop-2.7.4/hadoop-u0017649/dfs/name/current/fsimage.ckpt_0000000000000000000 of size 325 bytes saved in 0 seconds.
17/11/21 23:53:38 INFO namenode.NNStorageRetentionManager: Going to retain 1 images with txid >= 0
17/11/21 23:53:38 INFO util.ExitUtil: Exiting with status 0
17/11/21 23:53:38 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at sys-90043/172.29.160.241
************************************************************/

그리고나서 hadoop과 yarn을 start 합니다.

u0017649@sys-90043:~$ start-all.sh
...
node-sys-90043.out
starting yarn daemons
starting resourcemanager, logging to /data/hadoop-2.7.4/logs/yarn-u0017649-resourcemanager-sys-90043.out
localhost: starting nodemanager, logging to /data/hadoop-2.7.4/logs/yarn-u0017649-nodemanager-sys-90043.out

다음과 같이 기초적인 hdfs 명령을 수행해 봅니다.  잘 되는 것을 보실 수 있습니다.

u0017649@sys-90043:~$ hadoop fs -df
Filesystem                    Size   Used   Available  Use%
hdfs://localhost:9000  36849713152  24576  5312647168    0%

u0017649@sys-90043:~$ hadoop fs -mkdir -p /user/u0017649
u0017649@sys-90043:~$ hadoop fs -mkdir input

u0017649@sys-90043:~$ hadoop fs -ls -R
drwxr-xr-x   - u0017649 supergroup          0 2017-11-21 23:58 input
-rw-r--r--   3 u0017649 supergroup        258 2017-11-21 23:58 input/hosts

u0017649@sys-90043:~$ hadoop fs -text input/hosts
127.0.0.1       localhost
127.0.1.1       ubuntu1604-dr-01.dal-ebis.ihost.com     ubuntu1604-dr-01
# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
172.29.160.241  sys-90043