Tomcat用户实例无法正常工作 - Ubuntu 12.04

时间:2013-04-19 08:44:57

标签: ubuntu tomcat7

**我安装了tomcat7-user但它无法运行。请在下面找到我的所作所为。 我做了系统范围的安装,首先不知道有很多用户特定的实例。

apt-get install tomcat7

它已成功安装,但由于我想要用户实例我将其删除**

apt-get remove tomcat7

然后安装了tomcat7用户实例

apt-get tomcat7-user

显示已安装。

我创建了一个实例

tomcat6-instance-create mydev-web

现在我可以看到mydev-web在我家中创建的文件夹

~/mydev-web$ ls
bin  conf  logs  temp  webapps  work

~/mydev-web/webapps$ ls
index.html

我启动tomcat。我可以看到无法将端口绑定为已使用的错误。所以我做了端口8082

<Connector port="8082" protocol="HTTP/1.1"
               connectionTimeout="20000"
               URIEncoding="UTF-8"
               redirectPort="8443" />

我启动tomcat

~/mydev-web/bin$ ./startup.sh 
Using CATALINA_BASE:   /home/adarsh/mydev-web
Using CATALINA_HOME:   /usr/share/tomcat7
Using CATALINA_TMPDIR: /home/adarsh/mydev-web/temp
Using JRE_HOME:        /usr/lib/jvm/java-1.6.0-openjdk
Using CLASSPATH:       /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar
Tomcat started

~/mydev-web/bin$ ps -a
  PID TTY          TIME CMD
 5075 pts/0    00:00:02 java
 5104 pts/0    00:00:00 ps

在浏览器中我给出了网址

http://localhost:8082/index.html.

我可以期待此页面显示吗?

当我尝试关机时,我会看到错误信息。

:~/mydev-web/bin$ ./shutdown.sh 
Using CATALINA_BASE:   /home/adarsh/mydev-web
Using CATALINA_HOME:   /usr/share/tomcat7
Using CATALINA_TMPDIR: /home/adarsh/mydev-web/temp
Using JRE_HOME:        /usr/lib/jvm/java-1.6.0-openjdk
Using CLASSPATH:       /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar
Apr 19, 2013 11:38:33 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/var/lib/tomcat7/common/classes], exists: [false], isDirectory: [false], canRead: [false]
Apr 19, 2013 11:38:33 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/var/lib/tomcat7/common], exists: [false], isDirectory: [false], canRead: [false]
Apr 19, 2013 11:38:33 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/var/lib/tomcat7/server/classes], exists: [false], isDirectory: [false], canRead: [false]
Apr 19, 2013 11:38:33 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/var/lib/tomcat7/server], exists: [false], isDirectory: [false], canRead: [false]
Apr 19, 2013 11:38:33 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/var/lib/tomcat7/shared/classes], exists: [false], isDirectory: [false], canRead: [false]
Apr 19, 2013 11:38:33 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/var/lib/tomcat7/shared], exists: [false], isDirectory: [false], canRead: [false]
Tomcat stopped

请指导我..我的最终目标是尝试一些jsp

谢谢

1 个答案:

答案 0 :(得分:2)

删除server.loadershared.loader中列出的目录。 deb包不会创建目录/var/lib/tomcat7/*