jdk的安装

yum install snmp-*
ll

yum -y install patch make gcc gcc-c++ libtool libtool-libs libart_lgpl libart_lgpl-devel autoconf libjpeg libjpeg-devel libpng libpng-devel fontconfig fontconfig-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers pcre glibc glibc-common gd gd-devel gmp-devel apr-devel pd-devel perl pspell-devel libmcrypt-devel libxslt-devel flex openssl openssl-devel net-snmp* sysstat mysql-devel *apr-* cmake pango* rrdtool-perl openssl openssl-devel net-snmp* sysstat mysql-devel



yum -y install patch make gcc gcc-c++ libtool libtool-libs libart_lgpl libart_lgpl-devel autoconf libjpeg libjpeg-devel libpng libpng-devel fontconfig fontconfig-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel libidn libidn-devel pcre glibc glibc-common gd gd-devel gmp-devel apr-devel pd-devel perl pspell-devel libmcrypt-devel libxslt-devel flex openssl openssl-devel net-snmp* sysstat *apr-* cmake pango* rrdtool-perl openssl openssl-devel net-snmp* sysstat



[b]1.jdk的卸载[/b]
rpm -qa|grep jdk 查看jdk的安装包
rpm -e rpm包名 卸载

centOS的jdk卸载
rpm -qa | grep jdk
rpm -qa | grep gcj
卸载
yum -y remove java-1.4.2-gcj-compat-1.4.2.0-40jpp.115


[b]2.jdk安装[/b]

安装(这里以jdk-1_5_0_09-linux-i586-rpm.bin为例):
将jdk-1_5_0_09-linux-i586-rpm.bin拷贝到服务器
给其运行权限: chomd u+x jdk-1_5_0_09-linux-i586-rpm.bin
运行: ./jdk-1_5_0_09-linux-i586-rpm.bin
安装rpm包: rpm -iv jdk-1_5_0_09-linux-i586.rpm 这样将jdk安装到了/usr/java下

然后修改/etc/profile:
export JAVA_HOME=/usr/java/default
export M2_HOME=/usr/local/maven
export PATH=$PATH:$JAVA_HOME/bin:$M2_HOME/bin
export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar


保存,并执行source /etc/profile
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值