Mac下Apache Tomcat安装配置技巧
时间:2022-02-06 09:36:41
我们在MAC系统中查看网页时,一般都要使用到tomcat,这是因为appache只支持静态网页,但像asp,php,cgi,jsp等动态就需要tomcat来处理。那么该怎么在自己的MAC中安装tomcat呢?现在小编就教大家安装的方法。
安装步骤:
1.下载Tomcat
mac下载zip和tar.gz都行,我下载的是tar.gz
2.压缩之后直接拷贝到资源库中,压缩后的文件夹名称为Tomcat8,具体位置如下:
3.打开终端,输入以下命令Library/Tomcat8/bin/startup.sh,浏览器中输入localhost:8080,就可以看到一下效果:
如果遇到提示No such file or directory错误提示,需要执行sudo chmod 755 Library/Tomcat/bin/*.sh,然后重新执行startup.sh,如果想停止Tomcat,直接执行shutdown.sh即可。在执行sudo时,必须使用带密码的用户。如果每次写路径比较麻烦,这个时候需要设置环境变量。
4.设置Tomcat的环境变量:
①输入touch .bash_profile ( pico .bash_profile 也行)
②打开bash_profile open -e .bash_profile(nano .bash_profile亦可)
③输入export PATH=$PATH:/Users/keso/Library/Tomcat8/bin
④更新配置的环境变量source .bash_profile
⑤验证是否成功,终端中输入$PATH
显示如下-bash: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/keso/Library/Tomcat8/bin: No such file or directory
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Mac自带的照片功能怎从iPhone手机导入导出图片?
![](https://img.aspxhome.com/file/2023/5/a214765_0s.jpg)
excel表格录入身份证号的教程
如何在 WPS Office 手机版里对文档进行语音批注
![](https://img.aspxhome.com/file/2023/8/a184678_0s.png)
WPS演示常用快捷键大全
如何去除单元格中的空格
![](https://img.aspxhome.com/file/2023/1/55161_0s.gif)
Win10专业版检测不到U盘怎么修复?
![](https://img.aspxhome.com/file/2023/2/50492_0s.png)
在wps表格中怎样将图片放大
wps多级编号怎么用?
![](https://img.aspxhome.com/file/2023/3/a168753_0s.jpg)
word文档怎么转换为ppt演示
![](https://img.aspxhome.com/file/2023/7/35107_0s.png)
Word中自动功能有什么用?
![](https://img.aspxhome.com/file/2023/6/a167456_0s.jpg)
用这7款3D渲染软件,帮你快速完成具有高级质感的动画设计
![](https://img.aspxhome.com/file/2023/8/a210208_0s.jpeg)
mac终端怎么恢复初始设置?图文教程不想看看吗?
![](https://img.aspxhome.com/file/2023/4/a209814_0s.jpeg)
WPS文字办公—取消文档自动编号的方法
Excel中表格进行公式实现数据检索的操作方法
如何隐藏wps表中的数据
![](https://img.aspxhome.com/file/2023/6/a170456_0s.jpg)
wps office怎么设置行距
![](https://img.aspxhome.com/file/2023/9/a168179_0s.jpg)
在word中如何设置项目符号和编号
excel 分离型圆环图表效果图制作实例教程
![](https://img.aspxhome.com/file/2023/8/a154518_0s.jpg)