Installing Apache Tomcat 5.5 on Debian 4 (Etch) Linux
If you need to install and start Apache Tomcat quickly, probably this article can help you.
1) Sun JDK 5 need to be installed. It can be installed from Debian repository with unstable software
Add to /etc/apt/sources.list following lines (if not present yet):
# for sun-java packages in unstable deb http://ftp.debian.org/debian/ unstable non-free deb-src http://ftp.debian.org/debian/ unstable non-free
Update apt cache:
koba@alpha:~$ sudo apt-get update
Install jdk:
koba@alpha:~$ sudo apt-get install sun-java5-jdk
Make sure that java is installed:
koba@alpha:~$ java -version java version "1.5.0_10" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03) Java HotSpot(TM) Client VM (build 1.5.0_10-b03, mixed mode, sharing)
2) Installing Apache Tomcat:
Install Tomcat:
koba@alpha:~$ sudo apt-get install tomcat5.5 koba@alpha:~$ sudo apt-get install tomcat5.5-admin koba@alpha:~$ sudo apt-get install tomcat5.5-webapps
To verify that Tomcat is running just navigate to http://localhost:8180/ in your browser (make sure you have replaced ‘localhost’ with your server ip or name)
3) Controlling server:
You can start/stop or restart Tomcat using following command:
koba@alpha:/$ sudo /etc/init.d/tomcat5.5 [start | stop | restart]
4) Configuring ‘admin’ and ‘manager’ applications:
You need to configure some user to have admin and manager roles. For example you can do it with ‘tomcat’ user. Stop server and edit /var/lib/tomcat5.5/conf/tomcat-users.xml file to look like:
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="admin"/>
<role rolename="manager"/>
<role rolename="tomcat"/>
<user username="tomcat"
password="tomcatpassword"
roles="tomcat,admin,manager"/>
</tomcat-users>
Start tomcat
Now you can use manager application at http://localhost:8180/manager/html.
Your user will be ‘tomcat’ and password will be ‘tomcatpassword’
»
- 2718 просмотров
- Russian
If you use Etch then why do
If you use Etch then why do you install Sun Java from unstable? There is no reason to do that. Sun Java 5 is in the Etch non-free repository. Just make sure there is something like this in your /etc/apt/sources.list:
Tomcat 5.5 is also in the Etch repository, so you do not need to use any unstable repository.
Здорово,
Здорово, спасибо.Помогло.Только дабавил бы еще:
Отправить комментарий