(E) configuration Java development environment on Ubuntu Server cloud Ali

A precondition

1. Download jdk linux version
(1)首先需要注册Oracle账号
(2)登录
(3)查找jdk-8u161-linux-x64.tar.gz并进行下载
2. jdk uploaded to the Ubuntu server above by xftp
(1)使用xshell在服务器中usr/lib下建立一个jvm文件夹。
(2)通过xftp将上述压缩包上传到此文件夹下

Second, placement

1. First detection installation package jdk
 rpm -qa | grep java 
2. Uninstall version comes on the linux jdk
apt-get install xxxx 安装
apt-get remove xxxx 卸载但不删除配置
apt-get purge xxxx 卸载并且删除相关配置

Reference:
Linux command (5) Ubuntu apt-get command to install uninstall


3. decompress the downloaded jdk

First into usr / lib folder, and then type the following command

tar zxvf jdk-8u161-linux-x64.tar.gz -C /usr/lib/jvm
4. Configure Environment Variables
(1)找到找到 etc/profile使用vim进行编辑,使用以下命令
vim /etc/profile

Add on top

export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_161  
export JRE_HOME=${JAVA_HOME}/jre  
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib  
export  PATH=${JAVA_HOME}/bin:$PATH

Then save and exit

5. Use the following commands to validate the configuration
source /etc/profile

Third, verify that you have successfully installed

键入java、javac、java -version进行验证如果都可以就代表jdk已经配置成功

Here Insert Picture Description

Fourth, related reading

1. Purchase and Ali cloud server configuration

2.Xshell related operations

3.Xftp related operations

4.MySQL environment configuration

5.Java environment variable configuration

6.Tomcat environment configuration

7. packaged Java web project will be published in the IDEA

Published 32 original articles · won praise 32 · views 40000 +

Guess you like

Origin blog.csdn.net/Evan_love/article/details/90063810