Programming     Travel Logs     Life Is Good     Surfing Online     About Me
Labor means people working for you. It’s the oldest and most fought-over form of leverage. Labor leverage will impress your parents, but don’t waste your life chasing it.
-Naval Ravikant
2018-06-16 22:57:48

Copy this link when reproducing:
http://www.casperlee.com/en/y/blog/186

It is very straightforward, so there is no extra explanations needed, I'll just list all the steps in this article, in stead of explaining too much. Just like before, let's take it easy and enjoy a few beautiful photos first.

/Images/20171025/01.jpg

/Images/20171025/02.jpg

/Images/20171025/03.jpg

/Images/20171025/04.jpg

/Images/20171025/05.jpg

/Images/20171025/06.jpg

/Images/20171025/07.jpg

1. Install the JDK (Java Development Kit) in the server.

    Check the link for the detailed steps to install JDK. (Please noted that the version must be the same to the one that we've developed the application with)

2. Install Tomcat web server.

    Check the link for the detailed steps to install Tomcat.

3. Copy the files for the website to the server.

    a. Locate the installation folder of Tomcat in the server, there is a directory named "webapp".
    b. Copy the "WebContent" folder in the development machine to the "webapp" folder in the server.
    c. Rename the "WebContent" folder to what ever you like, for instance, "today".

4. Make Tomcat running at the port 80

    a. Since I have another service application (IIS) already running at the port 80, I have to stop it first. Open “Internet Information Services (IIS) Manager”.

/Images/20171025/101.jpg

    b. Right click on the "home", and select "Stop" from the popped menu to stop IIS.

    c. Open the file "[Tomcat Installation Folder]\conf\server.xml", and change the port from 8080 to 80:

            <Connector port="80" protocol="HTTP/1.1"
               URIEncoding="UTF-8"
               connectionTimeout="20000"
               redirectPort="8443"
               useBodyEncodingForURI="true" />

    d. Restart Tomcat.

5. Done!