Installation of the JDK
1. First, to the Oracle website to download the corresponding JDK or JRE installation package, if it is a pure production environment can install the JRE without installing the JDK, install the JDK for easy debugging.
2. Download the RPM installation package using the Wget URL and install it using the RPM-IVH installation package path.
3. Enter/etc/, use the VI command to modify the Profile VI profiles, add the following code at the end of the file
#set java environmentjava_home=/usr/java/jdk1.8.0_65classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/ Tools.jarpath= $JAVA _home/bin: $PATHexport java_home CLASSPATH PATH
which
/usr/java/jdk1.8.0_65
For your JDK or JRE path.
4. After the modification, press ESC to exit Modify mode, enter: QW save exit
5. Enter the JAVAC command to test whether the configuration was successful. At this point, the JDK is ready to install
Installation of Tomcat
1. First download the installation package on the Tomcat website, also use the wget command to download, after downloading, use the TAR-ZXVF install package path decompression path command to extract the installation package.
2. Enter the/etc/rc.d/init.d/directory
3. Use ln-s your Tomcat directory/bin/startup.sh/etc/rc.d/init.d/tomcat command link startup.sh file
4. Modify the startup.sh file, vi startup.sh, add the following code under #!/bin/sh
# chkconfig:2345 # Description:tomcat STARTUP.S
5. Modify/etc/rc.d/init.d/tomcat permissions, chmod +x Tomcat
6. Add Startup item Chkconfig--add Tomcat
7. View Results Chkconfig--list
8. Return to the Tomcat/bin directory, modify the permissions for the startup.sh and shutdown.sh files, and modify them using the chmod +x startup.sh,chmod +x command.
This article is from the "Flying Fish Technology" blog, please be sure to keep this source http://flyingfish.blog.51cto.com/9580339/1735796
Install JDK, tomcat and boot up under Linux