jk安装
[root@localhost ~]# java -version openjdk version "1.8.0_161" [root@localhost ~]# rpm -qa | grep java tzdata-java-2018c-1.el7.noarch python-javapackages-3.4.1-11.el7.noarch java-1.7.0-openjdk-1.7.0.171-2.6.13.2.el7.x86_64 java-1.8.0-openjdk-1.8.0.161-2.b14.el7.x86_64 java-1.7.0-openjdk-headless-1.7.0.171-2.6.13.2.el7.x86_64 javapackages-tools-3.4.1-11.el7.noarch [root@localhost ~]# rpm -e --nodeps 1.7.0-openjdk-1.7.0.171-2.6.13.2.el7.x86_64 error: package 1.7.0-openjdk-1.7.0.171-2.6.13.2.el7.x86_64 is not installed [root@localhost ~]# rpm -e --nodeps tzdata-java-2018c-1.el7.noarch [root@localhost ~]# rpm -e --nodeps python-javapackages-3.4.1-11.el7.noarch [root@localhost ~]# rpm -e --nodeps java-1.7.0-openjdk-1.7.0.171-2.6.13.2.el7.x86_64 [root@localhost ~]# rpm -e --nodeps java-1.8.0-openjdk-1.8.0.161-2.b14.el7.x86_64 [root@localhost ~]# rpm -e --nodeps java-1.7.0-openjdk-headless-1.7.0.171-2.6.13.2.el7.x86_64 [root@localhost ~]# rpm -e --nodeps javapackages-tools-3.4.1-11.el7.noarch [root@localhost ~]# rpm -qa | grep java [root@localhost ~]# cp /mnt/share/share/jdk-7u80-linux-x64.tar.gz /usr/local/ [root@localhost ~]# cd /usr/local [root@localhost local]# tar -zxvf jdk-7u80-linux-x64.tar.gz
[root@localhost local]# vim /etc/profile export JAVA_HOME=/usr/local/jdk1.7.0_80 export JRE_HOME=${JAVA_HOME}/jre export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib:$CLASSPATH export JAVA_PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin export PATH=$PATH:${JAVA_PATH} [root@localhost local]# source /etc/profile [root@localhost local]# ls apr apr-1.7.0 apr-1.7.0.tar.gz bin etc games include jdk1.7.0_80 jdk-7u80-linux-x64.tar.gz lib lib64 libexec sbin share src
[root@localhost local]# javac -version javac 1.7.0_80 输入命令:sudo vim /etc/profile
输入命令后打开环境变量文件进行配置,按 i 建开始编辑,
SSH加固