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 the version based on your actual situation. Click "hyper-connection" and select
Under binary distributionsTar.gz (Pgp, MD5) Compressed package for 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.