간단한 내용이지만 기록해둡니다.



 인스톨 가능 패키지 확인 - yum list all

yum으로 인스톨 할 수 있는 패키지 리스트를 받아와서 java, jdk가 포함된 패키지가 있는지 확인해 봅니다.

명령 입력
 # yum list all | grep java | jdk

실행 결과
 java-1.6.0-openjdk.x86_64                    1:1.6.0.0-1.40.1.9.10.el6_1      @updates
 java-1.6.0-openjdk-devel.x86_64           1:1.6.0.0-1.40.1.9.10.el6_1      @updates
 java-1.6.0-openjdk-demo.x86_64           1:1.6.0.0-1.40.1.9.10.el6_1      updates 
 java-1.6.0-openjdk-javadoc.x86_64        1:1.6.0.0-1.40.1.9.10.el6_1      updates 
 java-1.6.0-openjdk-src.x86_64              1:1.6.0.0-1.40.1.9.10.el6_1      updates 
 ldapjdk-javadoc.x86_64                         4.18-6.el6                                  base  



 자바 설치

yum 명령어의 install을 이용해 java를 설치합니다.

명령 입력 

 # yum install java

실행 결과
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.daum.net
 * extras: ftp.daum.net
 * updates: ftp.daum.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
--> Processing Dependency: java-1.6.0-openjdk = 1:1.6.0.0-1.36.b17.el6_0 for package: 1:java-1.6.0-openjdk-devel-1.6.0.0-1.36.b17.el6_0.x86_64
---> Package java-1.6.0-openjdk.x86_64 1:1.6.0.0-1.40.1.9.10.el6_1 set to be updated
--> Running transaction check
---> Package java-1.6.0-openjdk-devel.x86_64 1:1.6.0.0-1.40.1.9.10.el6_1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                   Arch    Version                       Repository
                                                                           Size
================================================================================
Updating:
 java-1.6.0-openjdk        x86_64  1:1.6.0.0-1.40.1.9.10.el6_1   updates   25 M
Updating for dependencies:
 java-1.6.0-openjdk-devel  x86_64  1:1.6.0.0-1.40.1.9.10.el6_1   updates  8.5 M

Transaction Summary
================================================================================
Install       0 Package(s)
Upgrade       2 Package(s)

Total download size: 34 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): java-1.6.0-openjdk-1.6.0.0-1.40.1.9.10.el6_1.x86_ |  25 MB     00:02     
(2/2): java-1.6.0-openjdk-devel-1.6.0.0-1.40.1.9.10.el6_ | 8.5 MB     00:00     
--------------------------------------------------------------------------------
Total                                           8.2 MB/s |  34 MB     00:04     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating       : 1:java-1.6.0-openjdk-1.6.0.0-1.40.1.9.10.el6_1.x86_64    1/4 
  Updating       : 1:java-1.6.0-openjdk-devel-1.6.0.0-1.40.1.9.10.el6_1.x   2/4 
  Cleanup        : 1:java-1.6.0-openjdk-devel-1.6.0.0-1.36.b17.el6_0.x86_   3/4 
  Cleanup        : 1:java-1.6.0-openjdk-1.6.0.0-1.36.b17.el6_0.x86_64       4/4 

Updated:
  java-1.6.0-openjdk.x86_64 1:1.6.0.0-1.40.1.9.10.el6_1                                                                        

Dependency Updated:
  java-1.6.0-openjdk-devel.x86_64 1:1.6.0.0-1.40.1.9.10.el6_1                                                                  

Complete!     



 설치 확인

각 명령어의 -version 옵션을 이용해 설치 결과를 확인합니다.

명령 입력 
 # java -version

결과 확인
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.10) (rhel-1.40.1.9.10.el6_1-x86_64)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode) 


명령 입력 
 # javac -version

결과 확인
javac 1.6.0_20



Posted by croute

댓글을 달아 주세요