Mac 上Tomcat装载
I recently installed Tomcat 7 and got it working with Eclipse Helios on Mac OSX Lion.
Install Homebrew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
Install Tomcat:
sudo brew install tomcat
Test the Tomcat install by starting the server:
sudo catalina start
Set it so that you can start it without using sudo:
sudo chgrp -R your_user_name
sudo chmod -R g+rw /usr/local/Cellar/tomcat/
Stop the Tomcat server (if you have not already):
sudo catalina stop
Test the change to the file permissions for Tomcat by starting the server as yourself without sudo:
catalina startca
Stop the Tomcat server (we want Eclipse to do the starting and stopping):
catalina stop
In Eclipse, open the 'Servers' view and add a new Tomcat server. Key point is to make sure to change the name of the server so that it does not contain any spaces! If you don't have a 'Servers' view, you need to go download 'Eclipse IDE for Java EE Developers'.
All done! You should now be able to start and stop Tomcat from Eclipse. :)
首先保证brew命令能够正常使用;
1. 搜索tomcat是否存在:
brew search tomcat
2. 安装tomcat:
brew install tomcat
3. 检查是否安装成功:
catalina -h
4. 运行tomcat:
catalina run
Tomcat的默认端口是8080,如果运行成功可通过http://localhost:8080访问
webapp的根目录(CATALINA_HOME)为:/usr/local/Cellar/tomcat/7.0.33/libexec/webapps/ROOT/
附:
Mac OSX软件包管理工具brew怎么安装?应该有很多朋友有用到这个brew工具,那么这个工具如何安装及下载的呢?
brew 又叫Homebrew,是Mac OSX上的软件包管理工具,能在Mac中方便的安装软件或者卸载软件, 只需要一个命令, 非常方便,brew类似ubuntu系统下的apt-get的功能。
brew安装方法
brew 的官方网站对brew的用法进行了详细的描述安装方法:
在Mac中打开Termal: 输入命令:
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
brew list 列出已安装的软件
brew update 更新brew
brew home 用浏览器打开brew的官方网站
brew info 显示软件信息
brew deps 显示包依赖
brew search /wge*/
/wge*/是个正则表达式, 需要包含在/中
brew install wget
使用brew卸载软件,卸载更方便了
brew uninstall wget
brew install git
Mac 上Tomcat装载的更多相关文章
- 在Mac上关于tomcat服务器的安装、配置、启动、部署web详细流程
之前在Mac上通过安装mamp来搭建PHP环境服务器,但是对于java来说,目前还是没有找到类似mamp这样强大的软件来构建及管理java环境服务器,所以目前也是通过命令行来进行tomcat服务器的安 ...
- 在MAC上搭建tomcat,再使用servlet时遇到的问题。
说起来真是惭愧.在mac上配置tomcat环境时.tomcat6能正确运行.但是7,8都运行不了.具体表现是tomcat6访问127.0.0.1:8080可以显示那个界面,然而tomcat7和8都显示 ...
- 怎么在Mac上安装Tomcat 7[转载]
本文来自http://wolfpaulus.com/journal/mac/tomcat7,谢谢Wolf Paulus 的分享 Tomcat 7 是Apache发布的第一款可以支持Servlet 3. ...
- mac版tomcat修改端口无法访问,80端口无法访问
在mac上安装好了tomcat,修改了端口为80,没想到关闭tomcat时提示出错,而且无法访问,原来我犯了两个错误. 1.我用的是mac上的文本编辑.app打开然后修改的,重新修改为8080也不行, ...
- Mac上使用jenkins+git持续集成浅析
本文旨在让同学们明白如何让jenkis在mac笔记本上运行,并实际与一个最简单的git地址交互并执行简单的jenkins任务,如果学习本文,需要先按照https://www.cnblogs.com/x ...
- 我在 Mac 上都用什么
我在 Mac 上都用什么 Homebrew Homebrew 是统一管理 macOS 中应用的最佳方法之一,而且大量优秀的应用都可以在 Homebrew 中找到. 就不做过多介绍了, 有兴趣可以看相关 ...
- mac上配置java开发环境
项目在mac上跑起来的步骤: 1. 访问,https://brew.sh/ 装上这个然后 brew install git brew install maven, settings.xml需要放 ...
- mac下Tomcat的安装
转自:http://blog.csdn.net/liuyuyefz/article/details/8072485 对于Apache Tomcat 估计很多童鞋都会,那么今天就简单说下在mac上进行t ...
- Mac上MySQL忘记root密码且没有权限的处理办法&workbench的一些tips (转)
忘记Root密码肿么办 Mac上安装MySQL就不多说了,去mysql的官网上下载最新的mysql包以及workbench,先安装哪个影响都不大.如果你是第一次安装,在mysql安装完成之后,会弹出来 ...
随机推荐
- Oracle10g物理DG详细配置方法及步骤
--测试环境: OS:Redhat linux(64) Primary: IP:192.168.94.198 SID:dgdb1 Hostname:dg1 DB_U ...
- Spring Security 入门(1-8)缓存EhCache
- 查看eclipse ADT SDK JDK版本号
一.查看eclipsea版本号: 启动eclipse,Help > About Eclipse SDK,在eclipse SDK对话框下面就有Eclipse SDK Version:4.2.0这 ...
- powerdesigner将name的名字赋给comment
1 PowerDesigner中批量根据对象的name生成comment的脚本 执行方法:Open PDM -- Tools -- Execute Commands -- Run Script Vb ...
- hdu 1880 魔咒字典
https://vjudge.net/problem/HDU-1880 题意:略 思路: 一开始就是想到了正确的思路,但是代码写炸了,死活过不了.这题嘛,就是建议一个魔咒与咒语的双向映射.首先用字符串 ...
- Hibernate(十):n-n关联关系
背景: 在实际开发中我们会遇到表的多对多关联,比如:一篇博客文章,它可以同时属于JAVA分类.Hibernate分类. 因此,我们在hibernate的学习文章系列中,需要学会如何使用hibernat ...
- 简单聊聊java中的final关键字
简单聊聊java中的final关键字 日常代码中,final关键字也算常用的.其主要应用在三个方面: 1)修饰类(暂时见过,但是还没用过); 2)修饰方法(见过,没写过); 3)修饰数据. 那么,我们 ...
- 【js 笔记】读阮一峰老师 es6 入门笔记 —— 第一章
鉴于最近用 vuejs 框架开发项目,其中有很多涉及到 es6 语法不太理解所以便认真地读了一下这本书. 地址:http://es6.ruanyifeng.com/#README 第一章:let ...
- [LeetCode] Number Of Corner Rectangles 边角矩形的数量
Given a grid where each entry is only 0 or 1, find the number of corner rectangles. A corner rectang ...
- ML笔记:Deep Learning
非DL:要找好的特征 DL:无需找好的特征,但新问题:要设计好的网络架构