Linux服务器安装JDK的步骤:
?
1.利用SSH工具上传下载好的JDK
?
cd D:\Program Files\SSH Communications Security\SSH Secure Shell
?
scp2.exe C:\Users\Administrator\Desktop\jdk-7u75-linux-x64.rpm root@121.41.82.62:/root
?
Are you sure you want to continue connecting (yes/no)? yes
root@121.41.82.62‘s password:
?
2.在Linux端安装jdk
?
cd /root
?
chmod +x jdk-7u75-linux-x64.rpm
?
rpm -ivh jdk-7u75-linux-x64.rpm
?
3.配置环境变量,并验证是否安装成功
vi /etc/profile
?
JAVA_HOME=/usr/java/jdk1.7.0_75
CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME CLASSPATH PATH
?
java -version
javac -version
原文:http://qiangjiyi.iteye.com/blog/2183842