Centos JDK 安装及环境变量设置

[ 2014-08-03 17:11:38 | Author: zhenhua ]
Font Size: Large | Medium | Small
1. rpm -ivh jdk-7-linux-x64.rpm

2. vi + /etc/profile
增加:

JAVA_HOME=/usr/java/jdk1.7.0
JRE_HOME=/usr/java/jdk1.7.0/jre
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
export JAVA_HOME JRE_HOME PATH CLASSPATH

3.使修改生效

source /etc/profile //使修改立即生效
echo $PATH //查看PATH值
Comments Feed Comments Feed: http://www.zhenhua.org/feed.asp?q=comment&id=774
UTF-8 Encoding Trackback URL: http://www.zhenhua.org/trackback.asp?id=774

View Mode: Show All | Comments: 2 | Trackbacks: 0 | Toggle Order | Views: 13923
1
Quote zhenhua
[ 2016-04-05 12:59:25 ]
vi /etc/sysconfig/i18n

LANG="zh_CN.GBK"
SUPPORTED="zh_CN.UTF-8:zh_CN:zh"
SYSFONT="latarcyrheb-sun16"

vi /etc/my.cnf

max_allowed_packet = 190M
wait_timeout=31536000
interactive_timeout=31536000
lower_case_table_names=1
Quote zhenhua
[ 2016-07-07 11:53:19 ]
rpm -qa | grep java

rpm -e --nodeps java-1.4.2-gcj-compat-1.4.2.0-40jpp.115
1

If you feel this site you find this information helpful, please click on the donation, which is voluntary,Thank you.
Post Comment
Smilies
[arrow] [biggrin] [confused] [cool]
[cry] [eek] [evil] [exclaim]
[frown] [idea] [lol] [mad]
[mrgreen] [neutral] [question] [razz]
[redface] [rolleyes] [sad] [smile]
[surprised] [twisted] [wink]
Enable UBB Codes
Auto Convert URL
Show Smilies
Hidden Comment
Username:   Password:   Register Now?
Security Code * Please Enter the Security Code