Installing Tomcat6 on Ubuntu 9.04
If you are running Ubuntu use the manual installation process shown here.
Make sure that Java is installed. Check with the dpkg command like this:
dpkg –get-selections | grep sun-java
This should give this output if java is installed on the system:
sun-java6-bin install
sun-java6-jdk install
sun-java6-jre install
If no results, install the latest version with this command:
sudo apt-get install sun-java6-jdk
Installation
Now we’ll download and extract Tomcat from the apache site
. Check latest version number and adjust accordingly.Replace “6.0.14″ below with the latest version number
wget http://apache.hoxt.com/tomcat/tomcat-6/v6.0.14/bin/apache-tomcat-6.0.14.tar.gz
tar xvzf apache-tomcat-6.0.14.tar.gz
Move the tomcat folder to a permanent location. Use for example /usr/local/tomcat.
sudo mv apache-tomcat-6.0.14 /usr/local/tomcat
Tomcat requires setting the JAVA_HOME variable. The best way to do
this is to set it in your .bashrc file. You could also edit your
startup.sh file.The better method is editing your .bashrc file and
adding the bolded line there. Logout of the shell for the change to take
effect. Also while you are at it, set the CATALINA_OPTS variable to
whatever is suitable. Incase you have a dedicated server use a large
memory allocation.
vi ~/.bashrc
If you have large amount of RAM you can set Tomcat to use minimum of
512mb and maximum of 1024mb (Like in the example below). Add the
following lines:
export JAVA_HOME=/usr/lib/jvm/java-6-sun
export CATALINA_OPTS=”-Xms512m -Xmx1024m”
You could also run the JVM in server mode with the -server flag in
CATALINA_OPTS. There is supposed to be a speed advantage in the server
mode although it is a little slow to start up. Use the following line to
run the JVM in server mode.
export CATALINA_OPTS=”-server -Xms512m -Xmx1024m”
Tomcat can be started by just executing the startup.sh script in the tomcat/bin folder.
Automatic Starting
To make tomcat automatically start when we boot up the computer, Add a script to make it auto-start and shutdown.
sudo vi /etc/init.d/tomcat
Now paste in the following:
# Tomcat auto-start
#
# description: Auto-starts tomcat
# processname: tomcat
# pidfile: /var/run/tomcat.pid
export JAVA_HOME=/usr/lib/jvm/java-6-sun
case $1 in
start)
sh /usr/local/tomcat/bin/startup.sh
;;
stop)
sh /usr/local/tomcat/bin/shutdown.sh
;;
restart)
sh /usr/local/tomcat/bin/shutdown.sh
sh /usr/local/tomcat/bin/startup.sh
;;
esac
exit 0
Make the script executable by running the chmod command:
sudo chmod 755 /etc/init.d/tomcat
The last step is actually linking this script to the startup folders
with a symbolic link. Execute these two commands and we should be on our
way.
sudo ln -s /etc/init.d/tomcat /etc/rc1.d/K99tomcat
sudo ln -s /etc/init.d/tomcat /etc/rc2.d/S99tomcat
Tomcat should now be fully installed !
Setup the Manager Role
As a final step you need to login to the tomcat manager. To do that open up the tomcat/conf/tomcat-users.xml file.
sudo vi /usr/local/tomcat/conf/tomcat-users.xml
Now add the following lines at the end of the file just before the
closing ‘</tomcat-users>’. Replace with your username and password
at the appropriate places below.
<role rolename=”manager”/>
<user username=”your_user_name_here” password=”your_password_here” roles=”manager”/>
Now all you have to do is to restart tomcat once again.
sudo /etc/init.d/tomcat restart
Now go to the tomcat server – usually found at http://localhost:8080.
Click on the link to the manager. Give the username/password you set
before – and voila you can now deploy your WAR files !
*****************************************************************
*********** Follow Up 1 – RISKY step ***************************
*****************************************************************
For removing the default install of tomcat6 from ubuntu, first remove
the package tomcat6 and any related packages with tomcat6 in the name
via synaptic. After that type in terminal
sudo updatedb
locate tomcat6
When you get the list of all files with tomcat6 in the name, go to
each of them and delete all of them one by one. That way you are sure
there are no traces of the default tomcat6 install left on your system (
You may have to use root permissions to clear certain files – so be
careful about what you delete)
相关推荐
本资源描述了如何在jboss5.1环境中配置集群操作,并附有一个简单的例子,方便大家对集群操作有个初步的了解。
Jboss5.1 下将多个application配置成windows 服务,我耗时2天,总结出来的绝对可行的方法,无需安装第3方软件,如javaservice/wrapper.
JBOSS5.1安装配置说明,说明Windows下JBoss的配置方法
ejb课程测试代码,eclipse+jboss5.1 ant编译等代码 三个测试项目请下载
整理一下jboss drool5.1中文使用说明,doc格式
除了加入jboss-web.xml,删除xerces-2.6.2.jar和xml-apis.jar之外, <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web ...原因是旧版本的slf4j-api不包含以上方法,附件解压后覆盖jboss5.1GA/common/lib下的同名文件即可
JBoss代码遵循LGPL许可,可以在任何商业应用中免费使用。JBoss是一个管理EJB的容器和服务器,支持EJB 1.1、EJB 2.0和EJB3的规范。但JBoss核心服务不包括支持servlet/JSP的WEB容器,一般与Tomcat或Jetty绑定使用。
本文是作者精心写作的完整配置搭建Jboss-5.1集群的文档,只要按照步骤来做绝对不会出错,一些重要部分俺还加以标注和详细说明,呕心沥血的一大完整安装文档.
jboss-5.1.0.GA, 因为太大了,我分了两部分上传,这是第一部分,我把里面的service目录的内容放到第二部分了,下载的时候 记得我的上传目录找第二部分资源,然后解压到server目录 便可
详细的介绍了mysql与jboss的连接设置,mysql的版本为mysql 5.0,jboss的版本为jboss-5.1.0
jboss-5.1.0.GA.zip.7z1.part
NULL 博文链接:https://zhenjw.iteye.com/blog/1183943
eclipse下用xfire生成webservice,可以jboss5.1运行,,, eclipse下用xfire生成webservice,可以jboss5.1运行,
jboss的文件。。希望大家都能下载学习。。。
很详细的介绍Jboss5.1在上传war项目时出错解决方案以及一些技巧,不敢自大,内容实在!
JBoss AS 5.1+ JBoss EAP 5.x 适用于目标服务器: JBoss AS 7.1.1以上 JBoss EAP 6.x(支持6.1+) Wildfly 8.x 它能做什么 该应用程序自动执行将源服务器的配置迁移到目标服务器所需的操作。 这包括: 从源...
pager-taglib 是个很好的jsp分页标签,使用它结合jstl可以实现灵活的分页导航功能...2.只在jboss5.1内测试通过,注意检查jdbc驱动包等相关依赖,tomcat可能出现缺包等问题,相信入门级别的朋友们应该可以找到解决方案的
DisplayTag是个很好的jsp标签,目前最新版本为1.2,支持了自定义分页,解决了之前...3.只在jboss5.1内测试通过,注意检查jdbc驱动包等相关依赖,tomcat可能出现缺包等问题,相信入门级别的朋友们应该可以找到解决方案的
JBoss Mysql 数据源
ejb3.0写的登陆应用,可以部署到jboss5.1中