728x90
반응형

==========================================================================================
리눅스 java 삭제 및 설치
==========================================================================================


■ java 설치 유무 확인 및 버전 확인

# rpm -qa | grep jdk
java-1.6.0-openjdk-1.6.0.0-1.66.1.13.0.el6.x86_64

# yum list installed java*jdk
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: centos.mirror.cdnetworks.com
 * extras: centos.mirror.cdnetworks.com
 * updates: centos.mirror.cdnetworks.com
Installed Packages
java-1.6.0-openjdk.x86_64                     1:1.6.0.0-1.66.1.13.0.el6                     @anaconda-CentOS-201311272149.x86_64/6.5

■ java 설치 가능 패키지 확인

# yum list java*jdk-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: centos.mirror.cdnetworks.com
 * extras: centos.mirror.cdnetworks.com
 * updates: centos.mirror.cdnetworks.com
Available Packages
java-1.6.0-openjdk-devel.x86_64                                   1:1.6.0.0-7.1.13.4.el6_5                                   updates
java-1.7.0-openjdk-devel.x86_64                                   1:1.7.0.65-2.5.1.2.el6_5                                   updates

■ java 설치(yum)

# yum install java-1.6.0-openjdk-devel.x86_64
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: centos.mirror.cdnetworks.com
 * extras: centos.mirror.cdnetworks.com
 * updates: centos.mirror.cdnetworks.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package java-1.6.0-openjdk-devel.x86_64 1:1.6.0.0-7.1.13.4.el6_5 will be installed
--> Processing Dependency: java-1.6.0-openjdk = 1:1.6.0.0-7.1.13.4.el6_5 for package: 1:java-1.6.0-openjdk-devel-1.6.0.0-7.1.13.4.el6_5.x86_64
--> Running transaction check
---> Package java-1.6.0-openjdk.x86_64 1:1.6.0.0-1.66.1.13.0.el6 will be updated
---> Package java-1.6.0-openjdk.x86_64 1:1.6.0.0-7.1.13.4.el6_5 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================
 Package                                 Arch                  Version                                 Repository              Size
====================================================================================================================================
Installing:
 java-1.6.0-openjdk-devel                x86_64                1:1.6.0.0-7.1.13.4.el6_5                updates                 15 M
Updating for dependencies:
 java-1.6.0-openjdk                      x86_64                1:1.6.0.0-7.1.13.4.el6_5                updates                 41 M

Transaction Summary
====================================================================================================================================
Install       1 Package(s)
Upgrade       1 Package(s)

Total download size: 56 M
Is this ok [y/N]:
Exiting on user Command

■ java 삭제(yum)

# yum remove java-1.7.0-openjdk.x86_64
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package java-1.7.0-openjdk.x86_64 1:1.7.0.45-2.4.3.3.el6 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================
 Package                    Arch           Version                           Repository                                        Size
====================================================================================================================================
Removing:
 java-1.7.0-openjdk         x86_64         1:1.7.0.45-2.4.3.3.el6            @anaconda-CentOS-201311272149.x86_64/6.5          90 M

Transaction Summary
====================================================================================================================================
Remove        1 Package(s)

Installed size: 90 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing    : 1:java-1.7.0-openjdk-1.7.0.45-2.4.3.3.el6.x86_64                                                                 1/1
  Verifying  : 1:java-1.7.0-openjdk-1.7.0.45-2.4.3.3.el6.x86_64                                                                 1/1

Removed:
  java-1.7.0-openjdk.x86_64 1:1.7.0.45-2.4.3.3.el6                                                                                 

Complete!

 

728x90
반응형
블로그 이미지

nineDeveloper

안녕하세요 현직 개발자 입니다 ~ 빠르게 변화하는 세상에 뒤쳐지지 않도록 우리모두 열심히 공부합시다 ~! 개발공부는 넘나 재미있는 것~!

,