Learning Java in the initial stage, is a full of helplessness and hehe time, install a Tomcat I installed a night, has not succeeded, so I gave me the "Catch the Cat Tears History", write a biography, lest the subsequent people repeat.
First, before installing Tomcat, put the Java environment First, download and install the Java Development Kit, and configure the environment (computer-Properties-Advanced system Settings-click Environment variables)
Add System variable Java_home (C:\Program files\java\jdk1.8.0_20 here refers to the JDK's installation path),
CLASSPATH (C:\Program files\java\jre1.8.0_20\Lib here is the installation path of the JRE),
Path is already there (C:\Program files\java\jdk1.8.0_20\bin)
Here to explain, there are many ways to configure the environment on the Internet, should be able to, I wrote above is my debug installation successful.
Test Java installation succeeded, enter java-version under CMD Note that there is a space behind Java , and if so, the installation succeeds
Next, install Tomcat http://tomcat.apache.org/into the official website to download
Select a version to be under
Windows system, select the last one to install
If the installation succeeds, there will be a Tomcat icon in the lower right corner.
Finally, open the http://localhost:8080/ for detection, see if the installation is successful, if not, check the log file Catalina.log file if it appears serious: Failed to Initialize end point associated with Protocolhandler ["http-bio-8080"] this problem, which indicates a port problem, Open the Server.xml text in the Conf file, note that here to open with Notepad, otherwise, directly open, can not be modified, open later, because the default port is 8080 when installed, but if the port is occupied, you have to change all 8080 to 8090 or other port number , remember to save. Note that the URL you enter after the test is followed by the same port number you set.
If you still can't open it, be careful to check to see if the Tomcat Service item is open and set it to start automatically
If it doesn't open, open Task Manager, close all the processes on Tomcat, and then test again.
In short, I was trying out all the above methods before installing the successful, hoping to be able to need friends to help.
The hard journey of installing Tomcat