Article Structure
1. Preparation ①, Java JDK distinguishes between 32-bit and 64-bit systems. Before installing, check the version number of the Centos system through the command, specifically check the command: #uname -a Explanation: If there is x86_64, it is 64-bit, if not, it is 32-bit. If it is followed by X686 or X86_64, the kernel is 64-bit, and if it is i686 or i386, the kernel is 32-bit. As shown in the figure: ②, Download JDK, here the editor provides you with the following address: JKD download address, click to go directly ③. The software and system required for the operation are as follows: virtual machine (Vmware), Centos system installed in the virtual machine, Xshell, Xftp, jdk-8u65-linux-i586.gz 2. Install JDK ① After the above preparations, we now have an environment where we can install JDK. ②, then use the command in Xshell to jump to the folder created under local: javaweb ③, execute the command cd usr/local/ mkdir jdk cd jdk/ ④, then upload the jdk installation package to the javaweb directory through the FileZilla FTP Client software ⑤, Unzip the uploaded jdk installation package. If you want to delete the installation package, you can execute the 5.2 command as follows, 5.1 tar -zxv -f jdk-8u65-linux-i586.gz 5.2 rm -rf jdk-8u65-linux-i586.gz 5.3 Results as shown in the figure: ⑥. Through the above steps, our JDK has been fully installed. The next step is more important: configure environment variables 3. Configure JDK environment variables ①, vim /etc/profile 1.2 After opening, press the keyboard (i) to enter the editing mode, and copy the following content to the bottom. Note (JAVA_HOME must be the directory where your JDK is installed. If it is not, please check it, otherwise the configuration will fail!) JAVA_HOME=/usr/local/jdk/jdk1.8.0_192 PATH=$JAVA_HOME/bin:$PATH CLASSPATH=$JAVA_HOME/jre/lib/ext:$JAVA_HOME/lib/tools.jar export PATH JAVA_HOME CLASSPATH Note: According to the above configuration information, we can complete the configuration of environment variables. It should be noted that when configuring PATH, AVA_HOME/bin must be placed first. Otherwise, when using the java command, the system will find the previous JAVA and will not look for it further. In this way, the directory where the java executable file runs is not actually in $JAVA_HOME/bin, but in other directories, which will cause big problems. 1.3 After writing, we press the keyboard (ESC) button to exit, then press (:wq) to save and close Vim. ②. After the configuration is completed, the most important step is to make the file take effect immediately: command such as: source /etc/profile 4. Verify that JDK is installed successfully ①. After completing all the above steps, we need to check whether the installation is successful. Enter the following command, as shown in the figure: 1.1 java -version 1.2 echo $JAVA_HOME 1.3, as shown in the figure: 5. Uninstall JDK ①, First execute the command to check the version of jdk on the server: The command is as follows: rpm -qa|grep jdk ②, then execute the command: yum -y remove java java-1.6.0-openjdk-1.6.0.0-1.50.1.11.5.el6_3.x86_64 Simply delete each version found above. End of article The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Mysql join query syntax and examples
>>: Detailed explanation of the difference between routing hooks in Vue2.x and Vue3.x
01. Command Overview The seq command is used to g...
Table of contents 1. Introduction 1. Basic layout...
1. Download the required kernel version 2. Upload...
Preface MySQL is the most popular relational data...
One sentence to introduce HOC What is a higher-or...
MySQL 8.0.13 has a data folder by default. This f...
Preface The docker image cannot be deleted. Check...
This article uses examples to illustrate the prin...
1. Set up a shared folder on the virtual machine:...
DOCTYPE DECLARATION At the top of every page you w...
Recently, I need to package the project for membe...
Table of contents 1. Shared CommonModule 2. Share...
1. Development environment vue+vant 2. Computer s...
Table of contents cache Cache location classifica...
This article shares the specific code for JavaScr...