"Apache Tomcat" teaches you step-by-step configure apache-tomcat-8.0.12-windows-x64 on Windows 8.1 systems

Source: Internet
Author: User
Tags apache tomcat lenovo


1, website download Apache Tomcat


http://tomcat.apache.org

This is apache-tomcat-8.0.12-windows-x64.zip.


2, unzip the downloaded zip file to D disk


Extract the file directory with apache-tomcat-8.0.12 as folder name after decompression


3, switch to the bin directory, start Tomcat


The following error may occur:


D:\apache-tomcat-8.0.12\bin>startup.bat
Neither the Java_home nor the JRE_HOME environment variable is defined
At least one of these environment variable are needed to run this program


From the prompt, it is not set java_home and jre_home to define at least one, but the current system is undefined. Java_home is the path to the JDK, set in the "This computer" system variable. Of course, you can also use console command settings directly: Set Java_home=c:\program files\java\jdk1.7.0_65 set Jre_home=c:\program files\java\jre7
However, it is important to note that the set in the "This computer" attribute is permanently active, and that the set command used in the console only sets for the currently running
window is valid, it is best to use the property settings method directly. See: http://blog.csdn.net/wolfofsiberian/article/details/39783649
To view the results of a setting using the SET command:

D:\apache-tomcat-8.0.12\bin>set
Allusersprofile=c:\programdata
Appdata=c:\users\v1000\appdata\roaming
Classpath=c:\program Files\java\jdk1.7.0_65\lib\tools.jar;
Commonprogramfiles=c:\program Files\Common Files
CommonProgramFiles (x86) =c:\program files (x86) \common files
Commonprogramw6432=c:\program Files\Common Files
Computername=lenovo-pc
Comspec=c:\windows\system32\cmd.exe
Configsetroot=c:\windows\configsetroot
Fp_no_host_check=no
Homedrive=c:
homepath=\users\v1000
Java_home=c:\program files\java\jdk1.7.0_65
Jre_home=c:\program Files\java\jre7
Localappdata=c:\users\v1000\appdata\local
Logonserver=\\lenovo-pc
Number_of_processors=4
Os=windows_nt
Path=d:\oraclexe\app\oracle\product\11.2.0\server\bin;; C:\Program Files (x86) \in
Tel\icls client\; C:\Program Files\intel\icls client\; C:\windows\system32; C:\wind
oWS C:\windows\System32\Wbem; C:\windows\System32\WindowsPowerShell\v1.0\; C:\Prog
Ram Files (x86) \ati Technologies\ati. ace\core-static; C:\Program Files\intel\inte
L (R) Management Engine components\dal; C:\Program Files\intel\intel (R) Management
Engine Components\ipt; C:\Program Files (x86) \intel\intel (R) Management Engine C
Omponents\dal; C:\Program Files (x86) \intel\intel (R) Management Engine components
\ipt; C:\Program Files (x86) \lenovo\lenovo home\; C:\Program Files\java\jdk1.7.0_6
5\bin;d:\mysql-5.6.21-winx64\bin;
pathext=.com;. EXE;. BAT;. CMD;. VBS;. VBE;. JS;. JSE;. WSF;. WSH;. MSC
Processor_architecture=amd64
Processor_identifier=intel64 Family 6 Model stepping 1, Genuineintel
Processor_level=6
processor_revision=4501
Programdata=c:\programdata
Programfiles=c:\program Files
ProgramFiles (x86) =c:\program Files (x86)
Programw6432=c:\program Files
prompt= $P $g
Psmodulepath=c:\windows\system32\windowspowershell\v1.0\modules\
Public=c:\users\public
Sessionname=console
Systemdrive=c:
Systemroot=c:\windows
Temp=c:\users\v1000\appdata\local\temp
Tmp=c:\users\v1000\appdata\local\temp
Userdomain=lenovo-pc
Userdomain_roamingprofile=lenovo-pc
username=v1000
userprofile=c:\users\v1000
Windir=c:\windows


After configuring system variables, restart Tomcat


D:\apache-tomcat-8.0.12\bin>startup.bat
Using catalina_base: "D:\apache-tomcat-8.0.12"
Using catalina_home: "D:\apache-tomcat-8.0.12"
Using catalina_tmpdir: "D:\apache-tomcat-8.0.12\temp"
Using jre_home: "C:\Program files\java\jre7"
Using CLASSPATH: "D:\apache-tomcat-8.0.12\bin\bootstrap.jar;d:\apache-tomcat-8.0.12\bin\tomcat-juli.jar"


The result still appears to be an exception:

Java.lang.Exception:Socket bind failed:[730013]????????????????? X??????????????

The reason for this is that Apache Tomcat's default 8080 port is occupied by other applications, so here are two solutions:

First, modify the default port 8080, see: http://blog.csdn.net/wolfofsiberian/article/details/39800837

Second, close the application that is using port 8080, see: http://blog.csdn.net/wolfofsiberian/article/details/39800849

After you have processed this method, you can then start Tomcat again and you will succeed.


4, in the browser input http://localhost:8080


Found to be able to access the success of the page is displayed is Tomcat page, where Tomcat can basically start the normal. Additional detailed configuration

And then configure it according to your personal needs.
 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.