Set up JEESZ distributed architecture and install jdk7 under 1--CentOs (environment preparation)
Disclaimer: because the running environment is based on the Linux system, you need to do some preliminary environment preparation before doing this framework.
Many instances of jdk7 are installed under CentOs. Since the later stage of the blog serves as the native tutorial of the framework, detailed installation records are made here.
First of all, download the jdk7 unzipped file under CentOs, and install the tar package (currently Oracle official, for file download, add Cookie verification mechanism, so directly download the file package, there will be errors that can not be found, the most old-fashioned way, local download, use FTP upload server), I have downloaded, through ssh has been uploaded to the specified directory, here directly explain the installation process.
I. preparatory work
Uninstall OpenJDK
1. Find OpenJDK that needs to be uninstalled
[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
two。 Unload in turn
[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: insufficient permissions, please use su root permission
2. Install and configure JDK7
1. Extract the installation 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/3RDPARTY
. / 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
two。 Configure JDK7
Edit / 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 changes take effect in the current shell window
III. Testing
[root@cloud ~] # java-version
Java version "1.7.045"
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 has been successful.
For more details, please click on the source address to get:
Http:// × × / technology
Interested friends can go to the ball to share the learning skills: 2042849237
Please continue to pay attention to building a distributed architecture and installing Tomcat7 under 2--CentOs (environment preparation)