JEESZ distributed architecture 1 -- install JDK 7 in CentOs (Environment preparation), 1 -- centosjdk7

Source: Internet
Author: User

JEESZ distributed architecture 1 -- install JDK 7 in CentOs (Environment preparation), 1 -- centosjdk7

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
[Root @ cloud/] 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

[Root @ cloud/] rpm-e -- nodepsjava-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64
[Root @ cloud/] rpm-e-nodeps java-1.6.0-openjdk-devel-1.6.0.34-1.13.6.1.el7_0.x86_64
[Root @ cloud/] rpm-e-nodeps java-1.7.0-openjdk-headless-1.7.0.75-2.5.4.2.el7_0.x86_64
[Root @ cloud/] rpm-e-nodeps java-1.6.0-openjdk-1.6.0.34-1.13.6.1.el7_0.x86_64
[Root @ cloud/] 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.

[Root @ cloud/] 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
[Root @ cloud tools] # ls
Jdk1.7.0 _ 45 jdk1.7.0_45.tar.gz
[Root @ cloud tools] # mkdir/usr/java
[Root @ cloud tools] # mv jdk1.7.0 _ 45 // home/java/jdk1.7
[Root @ cloud tools] # rm-rf. jdk1.7.0 _ 45

2. Configure JDK7
Edit the/etc/profile file
[Root @ cloud 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
[Root @ cloud ~] # 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 ~~~

 

Willing to learn more about the technical knowledge share can refer to the Source: http://minglisoft.cn/technology

If you are interested, you can go to the ball ~ Sharing learning technologies: 2042849237

Please keep an eye on building a distributed architecture 2 -- installing Tomcat 7 under CentOs (Environment preparation)

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.