Article Title: Configure JDK and tomcat in linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Install JDK first:
# Chmod + x jdk-1_5_0_02-linux-i586.rpm.bin
#./Jdk-1_5_0_02-linux-i586.rpm.bin
JAVA_HOME =/usr/java/jdk-1_5_0_02
CLASSPATH =.: $ JAVA_HOME/lib. tools. jar
PATH = $ JAVA_HOME/bin: $ PATH
Export JAVA_HOME CLASSPATH PATH
To learn java, a server is required. Therefore, tomcat, which is popular, is used. According to the introduction to installing tomcat on the internet, I have installed tomcat on my own. Now, I have recorded the installation process for your reference.
1. Download the tomcat software package from the official website.
Http://tomcat.apache.org/
Click a version of download on the left. I chose tomcat6.x. You can choose to install it based on your actual situation. Click the hyper-connection and select the tar.gz (pgp, md5) Compressed package under Binary Distributions, download
2. Download the package to your local computer and decompress it.
# Tar zxvf apach-tomcat-6.0.16.tar.gz
# Music apach-tomcat-6.0.16/usr/local
3. Configure the tomcat environment (ensure that jdk is installed)
# Vi/etc/profile
Export JAVA_HOME =/usr/local/jdk1.6.0 _ 04
Export TOMCAT_HOME =/usr/local/apach-tomcat-6.0.16
Save and exit
# Source/etc/profile // make the current configuration take effect immediately
4. Start the tomcat server
$/Usr/local/apach-tomcat-6.0.16/bin/startup. sh
The following content appears on my computer:
Using CATALINA_BASE:/usr/local/apache-tomcat-6.0.16
Using CATALINA_HOME:/usr/local/apache-tomcat-6.0.16
Using CATALINA_TMPDIR:/usr/local/apache-tomcat-6.0.16/temp
Using JRE_HOME:/usr/local/jdk1.6.0 _ 04
5. Enter http: // localhost: 8080/in the browser to view the tomcat log.
Tomcat installation ends here.