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

相关文章

gitlab安装及邮箱配置和常用使用方式

《gitlab安装及邮箱配置和常用使用方式》:本文主要介绍gitlab安装及邮箱配置和常用使用方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录1.安装GitLab2.配置GitLab邮件服务3.GitLab的账号注册邮箱验证及其分组4.gitlab分支和标签的

MySQL MCP 服务器安装配置最佳实践

《MySQLMCP服务器安装配置最佳实践》本文介绍MySQLMCP服务器的安装配置方法,本文结合实例代码给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友参考下... 目录mysql MCP 服务器安装配置指南简介功能特点安装方法数据库配置使用MCP Inspector进行调试开发指

在Windows上使用qemu安装ubuntu24.04服务器的详细指南

《在Windows上使用qemu安装ubuntu24.04服务器的详细指南》本文介绍了在Windows上使用QEMU安装Ubuntu24.04的全流程:安装QEMU、准备ISO镜像、创建虚拟磁盘、配置... 目录1. 安装QEMU环境2. 准备Ubuntu 24.04镜像3. 启动QEMU安装Ubuntu4

Python UV安装、升级、卸载详细步骤记录

《PythonUV安装、升级、卸载详细步骤记录》:本文主要介绍PythonUV安装、升级、卸载的详细步骤,uv是Astral推出的下一代Python包与项目管理器,主打单一可执行文件、极致性能... 目录安装检查升级设置自动补全卸载UV 命令总结 官方文档详见:https://docs.astral.sh/

使用jenv工具管理多个JDK版本的方法步骤

《使用jenv工具管理多个JDK版本的方法步骤》jenv是一个开源的Java环境管理工具,旨在帮助开发者在同一台机器上轻松管理和切换多个Java版本,:本文主要介绍使用jenv工具管理多个JD... 目录一、jenv到底是干啥的?二、jenv的核心功能(一)管理多个Java版本(二)支持插件扩展(三)环境隔

Nexus安装和启动的实现教程

《Nexus安装和启动的实现教程》:本文主要介绍Nexus安装和启动的实现教程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录一、Nexus下载二、Nexus安装和启动三、关闭Nexus总结一、Nexus下载官方下载链接:DownloadWindows系统根

Java SWT库详解与安装指南(最新推荐)

《JavaSWT库详解与安装指南(最新推荐)》:本文主要介绍JavaSWT库详解与安装指南,在本章中,我们介绍了如何下载、安装SWTJAR包,并详述了在Eclipse以及命令行环境中配置Java... 目录1. Java SWT类库概述2. SWT与AWT和Swing的区别2.1 历史背景与设计理念2.1.

安装centos8设置基础软件仓库时出错的解决方案

《安装centos8设置基础软件仓库时出错的解决方案》:本文主要介绍安装centos8设置基础软件仓库时出错的解决方案,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐... 目录安装Centos8设置基础软件仓库时出错版本 8版本 8.2.200android4版本 javas

Python中bisect_left 函数实现高效插入与有序列表管理

《Python中bisect_left函数实现高效插入与有序列表管理》Python的bisect_left函数通过二分查找高效定位有序列表插入位置,与bisect_right的区别在于处理重复元素时... 目录一、bisect_left 基本介绍1.1 函数定义1.2 核心功能二、bisect_left 与

Spring中管理bean对象的方式(专业级说明)

《Spring中管理bean对象的方式(专业级说明)》在Spring框架中,Bean的管理是核心功能,主要通过IoC(控制反转)容器实现,下面给大家介绍Spring中管理bean对象的方式,感兴趣的朋... 目录1.Bean的声明与注册1.1 基于XML配置1.2 基于注解(主流方式)1.3 基于Java