|
After installing CentOS 6.5 tar.gz installation of jdk and tomcat in its next
First, install jdk: I installed Windows on a virtual machine that is on top of the installation of the CentOS
1, first download is a compressed tar.gz package jdk
2. Create a directory (mkdir / usr / jdk is installed in the personal usr / jdk this path) in the path you want to install
3, jdk windows machine directly onto the archive you just created usr / under jdk directory (directly onto the virtual directory)
4, if the tar.gz archive onto usr / jdk error, it may be that you do not have to give permission rwx like to this directory, you can use chmod777 jdk to give this directory permissions
5, extract the tar.gz archive: tar-zxvf jdk.1.7.0.tar.gz after (compressed file name), extract rename: mv original file a new file name (jdk1.7)
6, after such decompression original archive is not deleted, you can use the rm -r 'archive name' deleted
7, configure the environment: use vim / etc / profile to open the file, add the bottom three variables namely :( here to / usr / JDK installation path instructions)
JAVA_HOME = / usr / JDK / jdk1.7
CLASSPATH =;. $ JAVA_HOME / lib / tools.jar
PATH = $ JAVA_HOME / bin: $ PATH
8, these three variables as environment variables: export JAVA_HOME CLASSPATH PATH
9, save / etc / profile exit (use ESC to exit vim edit mode to normal mode, press shift +: enter the command mode Press wq to exit vim editor after saving the file to force the contents of the role of this command is the memory buffer!. data is written to start vim forced the specified file, and then exit the vim editor.)
10, to make this document effective immediately: source / etc / profile (source command can be used to re-execute just modified initialization file, bring it into force immediately, without having to log out and back)
11, 10 if you do not perform this step can reboot (init 6) Restart
12, has been installed here jdk, jdk verify successful installation:
[Root @ linuxidc tomcat] # java -version
java version "1.7.0_55"
Java (TM) SE RuntimeEnvironment (build 1.7.0_55-b13)
Java HotSpot (TM) 64-Bit Server VM (build 24.55-b03, mixed mode)
java -version If the output you install jdk version, then jdk has been successfully installed!
Second, install tomcat (the premise is properly installed jdk)
1, will be installed tomcat copied to / usr / tomcat directory
2, unzip the package .tar.gz: tar -zxvf filename.tar.gz
3, the decompressed file renaming:
mv oldfilename (apache-tomcat-8.0.3) newfilename (apacht-tomcat8)
4, start extracting tomcat / usr / tomcat / apache-tomcat8 / bin / startup.sh If no error, and displays the start is completed or the following information:
[Root @ linuxidc tomcat] # apache-tomcat8 / bin / startup.sh
UsingCATALINA_BASE: / usr / tomcat / apache-tomcat8
UsingCATALINA_HOME: / usr / tomcat / apache-tomcat8
UsingCATALINA_TMPDIR: / usr / tomcat / apache-tomcat8 / temp
UsingJRE_HOME: /usr/JDK/jdk1.7
UsingCLASSPATH: /usr/tomcat/apache-tomcat8/bin/bootstrap.jar:/usr/tomcat/apache-tomcat8/bin/tomcat-juli.jar
Tomcat started. In this case illustrate the correct start tomcat
5, point your browser to: http: // localhost: 8080 to see should be able to see tomcat
6, ok this tomcat installation
Third, the summary:
1, above the installed jdk is .tar.gz archive, which is not in fact jdk installed, just unzip with environmental variables, in fact, is not installed, as long as the environment variable paired, will not be any problems!
2, tomcat is simple, as long as the decompression start on ok! |
|
|
|