1.创建安装目录
mkdir -p /usr/local/jdk
2.解压到安装目录中
tar -zxvf xxx.tar -C /usr/local/jdk
3.添加环境变量
export JAVA_HOME = /usr/local/jdk
export JRE_HOME = JAVA_HOME/lib/:JAVA_HOME/bin:JAVA_HOME
java -version
重启测试
shutdown -r now
yum安装
yum search java | grep jdk
yum install java-1.8.0-openjdk
yum remove java-1.8.0-openjdk
rpm安装
chmod +x /tmp/jdk-8u161-linux-x64.rpm
rpm -ivh /tmp/jdk-8u161-linux-x64.rpm
ps:
查看Linux的版本uname
uname -a
uname -m
下载wget
wget http://xxx/xx.tar.gz
wget http://xxx/xx.tar.gz -O /usr/local/yy.tar.gz
wget -p /target/to http://xxx/xx.tar.gz
-c断点续传
网友评论