Install Java and Tomcat in Ubuntu8.10. I. install java: $ sudoapt-getinstallsun-java6-jre II. install tomcat: $ sudoapt-getinstalltomcat6/etc/tomcat6-global configuration/usr/share/tomcat6/-program home directory/usr/share/tomcat6/conf/Catalin
Install Java and Tomcat in Ubuntu 8.10.
1. install java:
$ Sudo apt-get install sun-java6-jre
Ii. install tomcat:
$ Sudo apt-get install tomcat6
/Etc/tomcat6-global configuration
/Usr/share/tomcat6/-main program directory
/Usr/share/tomcat6/conf/Catalina/localhost/-local deployed Catalina Configuration
/Var/lib/tomcat6/-working main directory
/Var/lib/tomcat6/webapps-(the application files are actually stored here)
/Var/lib/tomcat6/work-dynamic working directory (dynamically compiled. jsp is stored here)
Add Management User
In/etc/tomcat6 is the global configuration of tomcat, here you need to modify the tomcat-users.xml
A. Add a role name.
B. Add a user
In this way, you can use admin to log on to the manager page after restarting tomcat.
Start/stop command
In many cases, you need to manually start/stop tomcat./usr/share/tomcat6 is the main program directory of tomcat.
/Usr/share/tomcat6/bin/startup. sh
/Usr/share/tomcat6/bin/shutdown. sh
These two scripts are used to start and stop the tomcat service.
For the next startup, you may need to manually create the conf and logs directories:
# Cd/usr/share/tomcat6
# Mkdir conf
# Mkdir logs
To start tomcat as a non-root user, you need to modify the logs directory permission:
# Chmod a + rw logs
Iii. Verify tomcat:
/Usr/share/tomcat6/bin/startup. sh
*** Start tomcat first
Http: // 127.0.0.1: 8080
* ** If tomcat works, there will be:
It works!