centos环境下安装java环境
1-上java官网下载rpm安装包
jdk-7u80-linux-i586.rpm
2-新建文件夹,并把jdk-7u80-linux-i586.rpm上传到此文件夹下面
cd /usr/local/ mkdir java
cp jdk-7u80-linux-i586.rpm /usr/local/java/
3-添加可执行权限
chmod +x jdk-7u80-linux-i586.rpm
4-执行rpm命令安装:
rpm -ivh jdk-7u80-linux-i586.rpm
5-查看是否安装成功:
java -version