Since the MAC system was reinstalled a few days ago, we are ready to set up some necessary experimental environments. Here is a brief summary of precautions for deploying Tomcat on Mac OS X:
Download the corresponding version of Tomcat, for example, zipping in http://tomcat.apache.org/download-70.cgi. Download and decompress the package in the directory you want to deploy. Here we need to solve two problems: one is the script permission. Locate the Tomcat directory in the terminal and enter
Sudo chmod 755./bin/*. Sh
The other is the Java environment variable, which is a little complicated. For more information, see the introduction:
Http://han.guokai.blog.163.com/blog/static/136718271201301183938165/ http://www.micmiu.com/lang/java/set-javahome-on-mac-os-x/
In general, the simplest way is to write in the environment variable Configuration:
Export java_home = '/usr/libexec/java_home'
Note that the above is not a single quotation mark, but the key next to 1 on the keyboard. For how to modify environment variables, refer to here: http://elf8848.iteye.com/blog/1582137 or refer to my previous blog, more simple.
After all settings, enter the bin directory in the terminal and enter bash startup. sh, you can see the Java icon, and then you can see the Tomcat Management page in http: // localhost: 8080. I have not figured out yet. How can I see the Tomcat console output? Let's take a look at the problem.
Update: Just checked how to output the console information, in fact, very simple, see here: http://dearseven.blog.163.com/blog/static/1005379222013774319389/ so open startup. Sh, change the last line:
# EXEC "$ prgdir"/"$ executable" start "[email protected]" EXEC "$ prgdir"/"$ executable" run "[email protected]"
it's easy.