2

**我安装了 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

在浏览器我给 url

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

谢谢

4

1 回答 1

2

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

于 2013-06-09T03:07:27.177 回答