Configure Tomcat for iOS-Mac [configure Tomcat for Mac] and ios-mactomcat

Source: Internet
Author: User

Configure Tomcat for iOS-Mac [configure Tomcat for Mac] and ios-mactomcat
Tomcat configuration

1. Official website download Tomcat configuration package: http://tomcat.apache.org/download-70.cgi

2. after downloading the package, rename the unzipped Folder: ApacheTomcat (this name can be used at Will) and put it in a file directory. I put it in: /Users/computer user name/Library;

3. Open the terminal and enter the bin folder directory in the ApacheTomcat file;

4. start Tomcat and enter :. /startup. sh. If the following message is displayed:-bash :. /startup. sh: Permission denied, the startup fails. Enter chmod u + x * on the terminal *. sh authorization;

5. After authorization, enter./startup. sh on the terminal again. As shown in, the startup is successful;

6. Check whether the instance is successfully started. Open http: // localhost: 8080 in the browser [localhost can be replaced with your IP address]. If the page is displayed, the instance is started normally;

7. Close Tomcat or enter./shutdown. sh in the bin directory.

Folder directory

1) bin: stores tomcat commands

2) conf: stores tomcat configuration information. The server. xml file in it is the core configuration file.

3) lib: jar packages and Technical Support Packages (such as servlet and jsp) that support tomcat software running)

4) logs: the log information during running.

5) temp: temporary directory

6) webapps: shared resource files and web application directories

7) work: The tomcat running directory. The temporary files generated during jsp running are stored here.

Modify port number

The default port of the server is 8080. You can also change it to a custom port. To avoid conflicts with the system Port, you must set it to 1024 or above. For example, set it to 8888.

Open the server. xml file in the conf directory of ApacheTomcat in notepad, and change the port value of the following statement to 8080 as the custom port Number: (for example, 8020)

<Connector port = "8020" protocol = "HTTP/1.1"

ConnectionTimeout = "20000"

RedirectPort = "8443" type = "regxph" text = "yourobjectname"/>

After the server is restarted, the input localhost: 8080 is invalid. You need to enter localhost: 8020 to open the server interface.

Password settings

Add the following code to the tomcat-users.xml file in the conf directory </tomcat-users>:

<Role rolename = "manager-gui"/>

<User username = "tomcat" password = "tomcat" roles = "manager-gui"/>

Because the labels of xml must be closed, restart tomcat. re-open http: // localhost: 8080 to the Tomcat main interface. Click the account and password of the Manager App and enter tomcat to log on.

 

Reference: http://blog.csdn.net/feng2qing/article/details/60968548

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.