Linux下安装部署Java
Java安装6小部(适合新手)
1、下载软件包
# wget http://download.Oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz?AuthParam=1441937568_6752e90a2aa70be3cf8baa0b8905125c
更改软件名,不知为什么wget下载下来名称挺乱的
# mv jdk-7u79-linux-x64.tar.gz?AuthParam=1441937568_6752e90a2aa70be3cf8baa0b8905125c /root/jdk-7u79-linux-x64.tar.gz# cd
2、解压jdk文件
# tar zxf jdk-7u79-linux-x64.gz -C /data/
3、创建软连接
# ln -s /data/jdk1.7.0_79 /usr/local/java
4、编辑环境变量(输入:$定位到文件最后一行,再执行o在文件的最后边编辑)
# vim /etc/profile
1 #------------------------------JAVA------------------------------# 2 export JAVA_HOME=/usr/local/java 3 export PATH=$JAVA_HOME/bin:$PATH 4 export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
5、使java的环境变量生效
# source /etc/profile
6、验证java是否安装成功(这条命令会返回java的版本信息)
相关推荐
farwang 2020-11-25
星愿心愿 2020-11-24
tianhuak 2020-11-24
zhjn0 2020-11-24
昭君出塞 2020-11-23
bluecarrot 2020-11-23
linuxwcj 2020-10-21
以梦为马不负韶华 2020-10-20
彼岸随笔 2020-10-20
yutou0 2020-10-17
applecarelte 2020-10-16
ourtimes 2020-10-16
waterhorse 2020-09-19
MRFENGG 2020-11-11
rainandtear 2020-10-30
kyssfanhui 2020-10-20
liuhangtiant 2020-10-20