Mac OSX 上安装 Tomcat 7 及管理界面

2024-01-08 21:38
文章标签 安装 界面 mac tomcat 管理 osx

本文主要是介绍Mac OSX 上安装 Tomcat 7 及管理界面,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

Installing Tomcat 7 on MacOSX

I’ve made the switch over to Apple on my development machines and as I’m starting my new company soon I’ve got myself a new MacBook Pro machine of which I will be transporting to and from the office so I’ve been installing my entire development on it and thought I’d blog about how to set-up Tomcat 7 on MacOSX to use as a development environment… It’s rather straight forward but thought I’d post it up anyway to help others!

Tomcat 7 is the first release of Tomcat to support the Servlet 3.0, EL 2.2 and JSP 2.2 specifications.

Tomcat 7 requires Java 1.6 to be installed on your Apple Mac based computer, if your running Leopard (10.5) or Snow Leopard (10.6) you are good to go already as these versions of OSX comes pre-installed with Java, however users of OSX Lion (10.7) and more than likely Mountain Lion (10.8) will need to enable Java of which I’ll now explain how to do so, if your not using Lion or Mountain Lion you can skips to the main install notes now!

Enabling Java on OSX Lion and OSX Mountain Lion

You can enable and install Java on Lion and Mountain Lion using the following guide: http://helpx.adobe.com/x-productkb/global/install-java-jre-mac-os.html

You can also check (to be on the safe side) your version of Java that you have installed on your machine by running the following command from the terminal:-

java -version

Installing Tomcat 7 on your Mac

1) First step is to download Tomcat from the Apache Tomcat website or which can be found here: http://tomcat.apache.org/download-70.cgi, Scroll down to the ‘Binary distrubutions’ section and download the ‘.tar.gz’ file. At the time of writing the version I downloaded and installed was 7.0.29

2) Opening or un-archiving the download will now create a new folder – more than likely this will be in your downloads folder unless you choose a different folder to download the file to.

3) Our next step is to ‘move’ the extracted folder to a system location of which we will run Tomcat from, we do this like so (obviously change your version number/download directory to suite your requirements):-

sudo mkdir /usr/local
sudo mv ~/Downloads/apache-tomcat-7.0.29  /usr/local

To make it easy to switch and upgrade Tomcat versions in future we’ll use a symbolic link to alias the tomcat folder, we do this like so:-

sudo ln -s /usr/local/apache-tomcat-7.0.29  /Library/Tomcat

We now need to change the ownership of the /Library/Tomcat folder:-

sudo chown -R <your OSX username>  /Library/Tomcat

We now need to set all the scripts under ‘/Library/Tomcat/bin’ to executable, we do this like so:-

sudo chmod +x /Library/Tomcat/apache-tomcat-7.0.29/bin/*.sh

You’ve done  it! – You can start Tomcat manually by running:-

/Library/Tomcat/bin/startup.sh

You can stop it by running:-

/Library/Tomcat/bin/shutdown.sh

Tomcat is now installed and working, you should be able to access it on your machine using this URL: http://localhost:8080/

A handy little GUI tool to start and stop Tomcat

In a development environment, instead of having to open up the console each time, I have found a handy little tool that allows you to easily Stop, Start and open up the Tomcat enviroment… Its called ‘Tomcat Controller’ and can be downloaded from here: http://www.activata.co.uk/tomcatcontroller/

It provides a nice interface as shown below:-

  

You will however need to open up the ‘Preferences’ and change the Tomcat location to match your new set-up.

这篇关于Mac OSX 上安装 Tomcat 7 及管理界面的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/584906

相关文章

Linux系统中卸载与安装JDK的详细教程

《Linux系统中卸载与安装JDK的详细教程》本文详细介绍了如何在Linux系统中通过Xshell和Xftp工具连接与传输文件,然后进行JDK的安装与卸载,安装步骤包括连接Linux、传输JDK安装包... 目录1、卸载1.1 linux删除自带的JDK1.2 Linux上卸载自己安装的JDK2、安装2.1

Linux卸载自带jdk并安装新jdk版本的图文教程

《Linux卸载自带jdk并安装新jdk版本的图文教程》在Linux系统中,有时需要卸载预装的OpenJDK并安装特定版本的JDK,例如JDK1.8,所以本文给大家详细介绍了Linux卸载自带jdk并... 目录Ⅰ、卸载自带jdkⅡ、安装新版jdkⅠ、卸载自带jdk1、输入命令查看旧jdkrpm -qa

Tomcat版本与Java版本的关系及说明

《Tomcat版本与Java版本的关系及说明》:本文主要介绍Tomcat版本与Java版本的关系及说明,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录Tomcat版本与Java版本的关系Tomcat历史版本对应的Java版本Tomcat支持哪些版本的pythonJ

tomcat多实例部署的项目实践

《tomcat多实例部署的项目实践》Tomcat多实例是指在一台设备上运行多个Tomcat服务,这些Tomcat相互独立,本文主要介绍了tomcat多实例部署的项目实践,具有一定的参考价值,感兴趣的可... 目录1.创建项目目录,测试文China编程件2js.创建实例的安装目录3.准备实例的配置文件4.编辑实例的

MySQL Workbench 安装教程(保姆级)

《MySQLWorkbench安装教程(保姆级)》MySQLWorkbench是一款强大的数据库设计和管理工具,本文主要介绍了MySQLWorkbench安装教程,文中通过图文介绍的非常详细,对大... 目录前言:详细步骤:一、检查安装的数据库版本二、在官网下载对应的mysql Workbench版本,要是

如何将Tomcat容器替换为Jetty容器

《如何将Tomcat容器替换为Jetty容器》:本文主要介绍如何将Tomcat容器替换为Jetty容器问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录Tomcat容器替换为Jetty容器修改Maven依赖配置文件调整(可选)重新构建和运行总结Tomcat容器替

Linux安装MySQL的教程

《Linux安装MySQL的教程》:本文主要介绍Linux安装MySQL的教程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录linux安装mysql1.Mysql官网2.我的存放路径3.解压mysql文件到当前目录4.重命名一下5.创建mysql用户组和用户并修

pip无法安装osgeo失败的问题解决

《pip无法安装osgeo失败的问题解决》本文主要介绍了pip无法安装osgeo失败的问题解决,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一... 进入官方提供的扩展包下载网站寻找版本适配的whl文件注意:要选择cp(python版本)和你py

Android App安装列表获取方法(实践方案)

《AndroidApp安装列表获取方法(实践方案)》文章介绍了Android11及以上版本获取应用列表的方案调整,包括权限配置、白名单配置和action配置三种方式,并提供了相应的Java和Kotl... 目录前言实现方案         方案概述一、 androidManifest 三种配置方式

nvm如何切换与管理node版本

《nvm如何切换与管理node版本》:本文主要介绍nvm如何切换与管理node版本问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录nvm切换与管理node版本nvm安装nvm常用命令总结nvm切换与管理node版本nvm适用于多项目同时开发,然后项目适配no