Build jeesz distributed architecture 1 -- install JDK 7 under centos (Environment preparation)

Source: Internet
Author: User

Declaration: Because the runtime environment is based on the Linux system, some preliminary environment preparations are required before the framework is implemented.
Many instances are installed on jdk7 in centos. As the post-blog serves as the native tutorial of the Framework, detailed installation records are provided here.

First, download the jdk7 decompression file under centos and install the tar package. (currently, the cookie authentication mechanism is added for downloading the file on the Oracle official website. Therefore, you can directly download the file package, there will be an error that cannot be found, the oldest method, local download, use ftp to upload the server), I have downloaded it, And I have uploaded it to the specified directory through SSH, the installation process is explained here.

I. Preparations?
Uninstall openjdk
1. Find the openjdk to uninstall
[[Email protected]? /]? Rpm-Qa | grep openjdk | grep-V grep?
Java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64?
Java-1.6.0-openjdk-devel-1.6.0.34-1.13.6.1.el7_0.x86_64?
Java-1.7.0-openjdk-headless-1.7.0.75-2.5.4.2.el7_0.x86_64?
Java-1.6.0-openjdk-1.6.0.34-1.13.6.1.el7_0.x86_64

Java-1.7.0-openjdk-devel-1.7.0.75-2.5.4.2.el7_0.x86_64

2. Uninstall

[[Email protected]? /]? Rpm-e -- nodepsjava-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64?
[[Email protected]? /]? Rpm-e-nodeps java-1.6.0-openjdk-devel-1.6.0.34-1.13.6.1.el7_0.x86_64?
[[Email protected]? /]? Rpm-e-nodeps java-1.7.0-openjdk-headless-1.7.0.75-2.5.4.2.el7_0.x86_64?
[[Email protected]? /]? Rpm-e-nodeps java-1.6.0-openjdk-1.6.0.34-1.13.6.1.el7_0.x86_64?
[[Email protected]/]? Rpm-e-nodepsjava-1.7.0-openjdk-devel-1.7.0.75-2.5.4.2.el7_0.x86_64?
Note: The permission is insufficient. Use the su root permission.

Ii. install and configure jdk7

1. decompress and install the JDK file.

[[Email protected]/]? Tar-zxvf jdk-7u75-linux-x64.tar.gz?
./Jdk1.7.0 _ 45/JRE/lib/management/snmp. ACL. Template
./Jdk1.7.0 _ 45/JRE/lib/logging. Properties
...
...
...
./Jdk1.7.0 _ 45/DB/license
./Jdk1.7.0 _ 45/DB/notice
./Jdk1.7.0 _ 45/DB/3 rdparty
./Jdk1.7.0 _ 45/DB/README-JDK.html
[[Email protected] tools] #? Ls
Jdk1.7.0 _ 45 ?? Jdk1.7.0_45.tar.gz
[Ro [email protected] tools] #? Mkdir/usr/Java
[[Email protected] tools] #? MV jdk1.7.0 _ 45 // home/Java/jdk1.7
[[Email protected] tools] #? Rm-RF. jdk1.7.0 _ 45

2. Configure jdk7
Edit the/etc/profile file
[[Email protected] jdk1.7] #? VI/etc/profile
Add at the end of the/etc/profile file
Export java_home =/usr/Java/1.7.0 _ 45
Exportclasspath =.: $ java_home/JRE/lib/RT. jar: $ java_home/lib/dt. jar: $ java_home/lib/tools. Jar
Export Path = $ path: $ java_home/bin
Use the source/etc/profile command to reload the/etc/profile file so that the modified content takes effect in the current shell window.

Iii. Test
[[Email protected] ~] #? Java-version
Java? Version "1.7.0 _ 45"
Java (TM) se Runtime Environment (build 1.7.0 _ 45-b18)
Java hotspot (TM) 64-bit server VM (build 24.45-b08, mixed mode)

Indicates that the installation is successful ~~~

Build jeesz distributed architecture 1 -- install JDK 7 under centos (Environment preparation)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.