AIX WAS环境下升级JDK1.4到1.5过程实录



一、检查系统
#oslevel(aix版本)
5.3.0.0
# prtconf –c(cpu位数)
CPU Type: 64-bit
 
因此,系统需要安装64位的jdk,即64-bit Java 5 SDK


二、检查原来JDK版本
# lslpp -l |grep Java
  Java14.sdk                1.4.2.75  已提交     Java SDK 32-bit 
  Java14.sdk                1.4.2.75  已提交     Java SDK 32-bit 
三、下载JDK
首先去ibm网站( http://www.ibm.com)注册一个用户,然后去下面的地址进行下载: https://www14.software.ibm.com/webapp/iwm/web/reg/download.do?source=dka&S_PKG=aix64j5b&S_TACT=105AGX05&S_CMP=JDK&lang=en_US&cp=UTF-8&&&dlmethod=http
下载Java5_64.sdk.tar。

四、上传&&解压
将Java5_64.sdk.tar上传到Aix系统,目录为为/home/oracle。
解压:tar –xvf Java5_64.sdk.tar,在/home/oracle下多了一个Java5_64.sdk
 
五、安装 smitty installp

AIX下安装JDK1.5是不需要选择安装目录,会 自动安装在/etc/java5_64   目录下。

输入
#smit
选择“Software Installation and Maintenance”,Enter
下一步,选择“Install and Update Software”,Enter
下一步,选择“Install Software”,Enter
下一步,在“INPUT device / directory for software”后面,写上要安装软件的路径:/home/oracle/Java5_64.sdk,Enter
下一步,

将光标移动到SOFTWARE to install 选项 按F4 列出目录下的文件,找到Java14_64.sdk ,Java14_64.license两个文件 按 esc+7选择文件;

“accept new license agreements” 使用tab键把对应的"no"设置成“yes”
下一步,确认界面,Enter

注意:此时若收到提示“0403-006 Execute permission denied” ,表示权限不够,换用root帐号操作。


六、查看安装后的信息
# lslpp -l |grep Java
  Java14.sdk                1.4.2.75  已提交     Java SDK 32-bit 
  Java5_64.sdk             5.0.0.290  已提交     Java SDK 64-bit 
  Java14.sdk                1.4.2.75  已提交     Java SDK 32-bit 
  Java5_64.sdk             5.0.0.290  已提交     Java SDK 64-bit 
  注:安装虽然完成,但通过#java -version查看,系统默认的JDK还是1.4版本的。此时查看/etc/下的environment文件如下

# cat /etc/environment
# @(#)18        1.25  src/bos/etc/environment/environment, cmdsh, bos53A, a2004_

35B6 8/23/04 04:13:11
# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# bos53A src/bos/etc/environment/environment 1.25
#
# Licensed Materials - Property of IBM
#
# (C) COPYRIGHT International Business Machines Corp. 1989,1994
# All Rights Reserved
#
# US Government Users Restricted Rights - Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
#
# IBM_PROLOG_END_TAG
#
# COMPONENT_NAME: (CMDSH) Shell related commands
#
# ORIGINS: 27
#
# (C) COPYRIGHT International Business Machines Corp. 1989, 1994
# All Rights Reserved
# Licensed Materials - Property of IBM
#
# US Government Users Restricted Rights - Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
#
################################################################
# System wide environment file.  This file should only contain
#     1.  comment lines which have a # in the first column,
#     2.  blank lines, and
#     3.  Lines in the form. name=value.
#
# WARNING: This file is only for establishing environment variables.
#          Execution of commands from this file or any lines other
#          than specified above may cause failure of the initialization
#          process.
#
# Searching the current directory last is usually a BIG time saver.
# If /usr/ucb is at the beginning of the PATH the BSD version of commands will
# be found.
#
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java14/jre/bin:/usr/java14/bin
TZ=BEIST-8
LANG=en_US
LOCPATH=/usr/lib/nls/loc
NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat
LC__FASTMSG=true

# ODM routines use ODMDIR to determine which objects to operate on
# the default is /etc/objrepos - this is where the device objects
# reside, which are required for hardware configuration

ODMDIR=/etc/objrepos


七、关键步骤:修改/etc/下的environment文件

主要修改
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java14/jre/bin:/usr/java14/bin
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java5_64/jre/bin:/usr/java5_64/bin
其它内容不用修改,然后重启服务器

八、查看JDK版本信息
# java -version
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pap64devifx-20100128a (SR11 FP1 ))
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 AIX ppc64-64 j9vmap6423ifx-20100128 (JIT enabled)
J9VM - 20100122_52103_BHdSMr
JIT  - 20091016_1845ifx1_r8
GC   - 20091026_AA)
JCL  - 20100128

完成!!

你可能感兴趣的:(linux)