在 Mac OS X Lion 上安装 Tomcat 7.0.22

发布于 2024-12-09 22:20:34 字数 812 浏览 2 评论 0原文

我有 Mac OS X 10.7。我正在按照 http://wolfpaulus.com/journal/mac/tomcat7 安装 Tomcat。以下是我的终端上的命令,但在指南中给出的最后一行之后没有任何反应。为什么会这样呢?

Last login: Fri Oct 14 00:22:53 on ttys000
➜  ~ git:(master) ✗ sudo mkdir /usr/local
Password:
mkdir: /usr/local: File exists
➜  ~ git:(master) ✗ sudo mv ~/Downloads/apache-tomcat-7.0.22 /usr/local
mv: rename /Users/Vinisa/Downloads/apache-tomcat-7.0.22 to /usr/local/apache-tomcat-7.0.22: Directory not empty
➜  ~ git:(master) ✗ sudo ln -s /usr/local/apache-tomcat-7.0.22 /Library/Tomcat
ln: /Library/Tomcat/apache-tomcat-7.0.22: File exists
➜  ~ git:(master) ✗ sudo chown -R Vinisa /Library/Tomcat
➜  ~ git:(master) ✗ sudo chmod +x /Library/Tomcat/bin/*.sh
➜  ~ git:(master) ✗ 

谢谢!

I have Mac OS X 10.7. I am following http://wolfpaulus.com/journal/mac/tomcat7 to install Tomcat. Following are the commands on my terminal, but nothing happens after the last line as its given in the guide. Why so?

Last login: Fri Oct 14 00:22:53 on ttys000
➜  ~ git:(master) ✗ sudo mkdir /usr/local
Password:
mkdir: /usr/local: File exists
➜  ~ git:(master) ✗ sudo mv ~/Downloads/apache-tomcat-7.0.22 /usr/local
mv: rename /Users/Vinisa/Downloads/apache-tomcat-7.0.22 to /usr/local/apache-tomcat-7.0.22: Directory not empty
➜  ~ git:(master) ✗ sudo ln -s /usr/local/apache-tomcat-7.0.22 /Library/Tomcat
ln: /Library/Tomcat/apache-tomcat-7.0.22: File exists
➜  ~ git:(master) ✗ sudo chown -R Vinisa /Library/Tomcat
➜  ~ git:(master) ✗ sudo chmod +x /Library/Tomcat/bin/*.sh
➜  ~ git:(master) ✗ 

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

不一样的天空 2024-12-16 22:20:34

您必须启动服务器:

/Library/Tomcat/bin/startup.sh

并将浏览器指向 以

http://localhost:8080

查看它是否正常工作。

You have to start the server:

/Library/Tomcat/bin/startup.sh

And point the browser to

http://localhost:8080

To see if it is working.

浪推晚风 2024-12-16 22:20:34

我告诉你我在网络上漫游过。在此之后,这将是小菜一碟。一一按照即可

1)在google中输入tomcat
2)点击网站tomcat.apache.org

3)进入下载-> tomcat 7 然后向下滚动到 core

4)点击tar.gz(第二个选项)
5)打开终端并将目录更改为 apache-tomcat-7.0.40 所在的文件夹
(使用 cd 文件夹名称)
6) type

sudo chmod +x *.sh 

(用于赋予文件可执行权限)

7)键入

sh startup.sh

它将工作并只显示一些行,例如:

使用CATALINA_BASE:/Users/Sriharshaa/Downloads/apache-tomcat-7.0.40
使用CATALINA_HOME:/Users/Sriharshaa/Downloads/apache-tomcat-7.0.40
使用CATALINA_TMPDIR:/Users/Sriharshaa/Downloads/apache-tomcat-7.0.40/temp
使用 JRE_HOME:/Library/Java/JavaVirtualMachines/jdk1.7.0_13.jdk/Contents/Home
使用 CLASSPATH:/Users/Sriharshaa/Downloads/apache-tomcat-7.0.40/bin/bootstrap.jar:/Users/Sriharshaa/Downloads/apache-tomcat-7.0.40/bin/tomcat-juli.jar

8)进入浏览器类型

http://localhost:8080/ 

,如果您看到tomcat网站,则说明tomcat已成功安装在您的计算机上!

I am telling you I roamed all over the web & it would be a piece of cake after this. Just follow one by one

1)Type tomcat in google
2) Click on the website tomcat.apache.org

3) go to downloads -> tomcat 7 then scroll down to core

4) click on tar.gz (2nd option there)
5) open terminal and change directory to the folder where the apache-tomcat-7.0.40 is present
(use cd foldername)
6) type

sudo chmod +x *.sh 

(it is used to give exectuable privelages to the files)

7) type

sh startup.sh

it will work and just display some lines like :

Using CATALINA_BASE: /Users/Sriharshaa/Downloads/apache-tomcat-7.0.40
Using CATALINA_HOME: /Users/Sriharshaa/Downloads/apache-tomcat-7.0.40
Using CATALINA_TMPDIR: /Users/Sriharshaa/Downloads/apache-tomcat-7.0.40/temp
Using JRE_HOME: /Library/Java/JavaVirtualMachines/jdk1.7.0_13.jdk/Contents/Home
Using CLASSPATH: /Users/Sriharshaa/Downloads/apache-tomcat-7.0.40/bin/bootstrap.jar:/Users/Sriharshaa/Downloads/apache-tomcat-7.0.40/bin/tomcat-juli.jar

8) go to browser type

http://localhost:8080/ 

and if you get tomcat website then , tomcat is installed on your computer successfully !

幽梦紫曦~ 2024-12-16 22:20:34

很可能是一条错误的路。正确的路径可能如下,

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

Probably it's a wrong path. The correct path might be as follows,

sudo chmod +x /Library/Tomcat/bin/apache-tomcat-7.0.22/*.sh
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文