我应该用哪种方式在我的 Ubuntu 上安装 Apache Tomcat 7:
apt-get install tomcat7
我不希望服务器在每次启动时启动。大多数时候我将在我的 Eclipse 中使用它来运行简单的 Web 应用程序。那么,我是否需要以任何其他方式安装它来避免 tomcat 自动启动?
我在从终端启动 tomcat 时遇到问题。sudo apt-get install tomcat7
几天前,我使用 - 安装了 tomcat 。现在,当我使用以下命令启动它时,出现以下错误:
~/tomcat7/bin$ sudo ./startup.sh
Using CATALINA_BASE: /usr/share/tomcat7
Using CATALINA_HOME: /usr/share/tomcat7
Using CATALINA_TMPDIR: /usr/share/tomcat7/temp
Using JRE_HOME: /usr
Using CLASSPATH: /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar
touch: cannot touch `/usr/share/tomcat7/logs/catalina.out': No such file or directory
./catalina.sh: 389: ./catalina.sh: cannot create /usr/share/tomcat7/logs/catalina.out: Directory nonexistent
Run Code Online (Sandbox Code Playgroud)
我不明白出了什么问题。我能够访问 -http://localhost:8080
当我安装它时。但是,我运行命令在启动时禁用启动:
sudo update-rc.d tomcat remove
Run Code Online (Sandbox Code Playgroud)
现在它根本没有开始。:(
好的,现在我已经花了足够的时间在我的 Ubuntu 12.04 操作系统上正确配置 Tomcat,而且我已经受够了,因为现在已经是凌晨 2:00。
首先,我按照这个问题中的描述安装了 tomcat7 -我应该如何安装 Apache Tomcat 7 以与 Eclipse 一起使用?.
然后我想我会按照链接问题的答案中的描述安装一个私有的 tomcat 实例。所以,我tomcat7
使用这个问题中描述的过程卸载了 - https://askubuntu.com/q/313070/159439
现在,我使用以下方法安装了一个私有实例:
sudo apt-get install tomcat7-user
sudo tomcat7-instance-create ~/my-tomcat-instance
Run Code Online (Sandbox Code Playgroud)
现在,当我去启动 tomcat 时,它没有启动。由于它没有作为服务安装,所以我当然不能将它作为服务启动。但是,我什至无法使用该startup.sh
文件启动它。我收到以下错误:
/usr/share/tomcat7$ bin/startup.sh
Using CATALINA_BASE: /usr/share/tomcat7
Using CATALINA_HOME: /usr/share/tomcat7
Using CATALINA_TMPDIR: /usr/share/tomcat7/temp
Using JRE_HOME: /usr
Using CLASSPATH: /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar
touch: cannot touch `/usr/share/tomcat7/logs/catalina.out': No such file or directory
bin/catalina.sh: 389: bin/catalina.sh: cannot create /usr/share/tomcat7/logs/catalina.out: Directory nonexistent
Run Code Online (Sandbox Code Playgroud)
现在这里有什么问题。我知道早期的 tomcat 没有启动,因为它是作为服务安装的。所以,我必须使用 -service tomcat7 start
来启动它。但是现在,它没有安装为服务。那么,我该如何开始呢?
我面临着在 …