Chinaunix首页 | 论坛 | 博客
  • 博客访问: 220594
  • 博文数量: 67
  • 博客积分: 2510
  • 博客等级: 少校
  • 技术积分: 890
  • 用 户 组: 普通用户
  • 注册时间: 2008-01-17 09:42
文章分类

全部博文(67)

文章存档

2010年(5)

2009年(7)

2008年(55)

我的朋友

分类: LINUX

2008-05-04 10:43:47

Install Tomcat 5.5 in Debian and Ubuntu

, ,

1. Necessary packages
apt-get install tomcat5.5 tomcat5.5-admin tomcat5.5-webapps


2. Directories
/usr/share/tomcat5.5/
/usr/share/tomcat5.5-webapps/
/etc/tomcat5.5
/var/lib/tomcat5.5
/var/log/tomcat5.5


3. Remember to export JAVA_HOME, for example (put in .bashrc)
export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.11/

Launch tomcat5.5 using
sudo /etc/init.d/tomcat5.5 start
sudo /etc/init.d/tomcat5.5 restart


4. Problem: Can't start tomcat5.5 in ubuntu
Here is the solution:
$ cd /usr/share/tomcat5.5/logs 
$ sudo mv catalina.out catalina.out.old
$ sudo touch catalina.out
$ sudo chown tomcat55:nogroup catalina.out


5. Configuration for using Tomcat Manager () and Tomcat Administration ().
Edit /usr/share/tomcat5.5/conf/tomcat-users.xml and include the following:




6. Problem of using Tomcat Administration in Debian
Solution:Add the following to the ‘/etc/tomcat5.5/policy.d/50user.policy’
// to activate the admin-interface
//
// pkg-java-maintainers/2006-November/009749.html
grant codeBase “file:/usr/share/struts1.2/struts.jar” {
permission java.security.AllPermission;
};


7. Configure webapps
Recently when Debian upgrades tomcat5.5, all webapps configurations are deleted, only admin and manager apps remain in localhost configuration. This is a really annoying behavior for Debian package update. However, Debian update did notice that I changed tomcat-users.xml, 40webapps.policy and 50users.policy, so I had a chance to keep my old configuration.

For restoring all my webapps,
ln -s /usr/share/tomcat5.5-webapps/anywebapp.xml 
/usr/share/tomcat5.5/conf/Catalina/localhost/anywebapp.xml
阅读(687) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~