(编辑:jimmy 日期: 2024/12/25 浏览:2)
对tar.z进行安装和卸载
# zcat jdk-6u10-beta-solaris-sparc.tar.Z | tar -xf - (解压文件,执行一次就可以) # pkgadd -d . SUNWj6rt SUNWj6dev SUNWj6cfg SUNWj6man SUNWj6dmo (Default install) # pkgadd -d . -a /export/default SUNWj6rt SUNWj6dev SUNWj6cfg SUNWj6man SUNWj6dmo (No default install)
执行自定义路径安装命令之前,需做如下配置:
1、 拷贝安装配置文件到/export/目录下
#cp /var/sadm/install/admin/default /export/default
2、 设置自定义安装路径:
# cd /export # vi default "default" [Read only] 22 lines, 363 characters # # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # #ident "@(#)default 1.7 04/12/21 SMI" # mail= instance=unique partial=ask runlevel=ask idepend=ask rdepend=ask space=ask setuid=ask conflict=ask action=ask networktimeout=60 networkretries=3 authentication=quit keystore=/var/sadm/security proxy= basedir=/usr/local #设定自定义安装路径
3、 JDK的默认安装路径为:/usr/jdk/instances/,自定义安装路径为:/usr/local/执行下列命令:
# cd /jdk-install-path/bin # ./java -version (查看Java 版本号) # ./java -fullversion
4、 查看JDK的安装目录结构,执行下列命令:
# cd /java-install-path # ls -l
5、 查看JDK的安装信息,执行下列命令:
# pkginfo SUNWj6rt SUNWj6dev SUNWj6cfg SUNWj6man SUNWj6dmo
JDK 卸载步骤:
1、 在命令行中执行下列命令:
# cd / # pkgrm SUNWj6rt SUNWj6dev SUNWj6cfg SUNWj6man SUNWj6dmo
2、 查看下列目录是否为空:
# cd /java-install-path # ls