Install, configure, start, deploy Web detailed processes on a Mac on a tomcat server

Source: Internet
Author: User

Prior to the installation of Mamp on the Mac to build the PHP environment server, but for Java, there is no such powerful software like Mamp to build and manage the Java environment Server, so now also through the command line to the Tomcat server installation and startup, Briefly summarize the steps for the Tomcat server installation on your Mac.

The first step is to install the JDK environment for your Mac.

Direct Baidu "JDK for Mac", find one version to install on it, after installation, open the terminal, enter "Java" or "Javac", if the use of Java command instructions, then your MAC's JDK environment is configured, This is a lot easier than a Windows system.

The second step is to download Tomcat.

Can be directly to Apatch's official website (http://tomcat.apache.org/download-60.cgi) to download, or directly Baidu "Tomcat for Mac", search for one version to download, I downloaded the version 6.0. In general, the Tomcat file is not the Windows or Mac system, and my Mac is 64-bit, so I lazy direct Baidu, and then got a known as the Windows version of the Tomcat file, the use of this file.

The third step, the location of the Tomcat file.

Download good tomcat files, usually compressed files, unzip them, for convenience, directly after the extracted folder named "tomcat6.0", and then copy this folder to the library on the Mac, this involves a permissions problem, it must be placed in the repository. (If you have a Mac that doesn't have a library in the Finder's sidebar, you can use the Chflags nohidden ~/library command in the terminal to display the repository until you can see the small House icon in the Finder's sidebar, and in the Small House icon directory, the "library" or " Library "folder)

Fourth step, start the Tomcat server on the terminal.

This step also requires further operation, open the terminal, as follows:

1. Go to the Bin directory under the tomcat6.0 directory

Cd/users/your Mac name/library/tomcat6.0/bin

2. Give administrator (read-write) permissions to all. sh files in the tomcat6.0 directory. (If you want to directly command "./startup.sh" to open the server, then a prompt will appear, indicating that you do not have permission)

sudo chmod 755/users/your mac/library/apache-tomcat-6.0.37/bin/*.sh or sudo chmod 755 *.sh

In general, given this gives the administrator permissions, will prompt you to enter the password in the terminal, you directly enter your computer's lock screen password can be input process, the terminal will not display the password you entered (also do not use * to hide your password), you entered the complete, directly enter.

3. Start the Tomcat server.

sudo sh startup.sh

After entering and returning, the terminal shows you where your current tomcat environment variable is stored, and your browser will automatically open the "localhost:8080" url, displaying a Tomcat homepage indicating that your Tomcat server is configured and started.

Fifth step, configure the Java Web server.

If you have a Java Web source in hand, then put this folder (assuming the folder name Javajar) in the tomcat6.0 directory under the WebApps directory, under the terminal execution

sudo sh shutdown.sh shut down the server and then enter

sudo sh startup.sh Opens the server, indicating that the server is restarted (this web is automatically imported).

(When the server is turned on, there will be a Java bootstrap running icon on the dock, and the bootstrap run icon disappears when the server is closed)

Open the browser, enter "Localhost:8080/javajar" in the browser, and if you see the expected Web page, indicate that your Web deployment was successful.

At this point, our installation, configuration, start-up, deployment of these features have been completed.

In this process, if you encounter other problems, we can discuss together, or Google Baidu, online a lot of tutorials, we hope to help.

Install, configure, start, deploy Web detailed processes on a Mac on a tomcat server

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.