aquaballoon

Tomcat 6

Jul 16th, 2011
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.90 KB | None | 0 0
  1. Installing Sun-Java6 in Ubuntu 10.04
  2.  
  3. $ nano /etc/apt/sources.list
  4. deb http://archive.canonical.com/ubuntu lucid partner
  5. deb-src http://archive.canonical.com/ubuntu lucid partner
  6.  
  7. $ dpkg --get-selections | grep sun-java
  8. $ sudo apt-get install sun-java6-jdk
  9.  
  10.  
  11. Installing Tomcat6
  12.  
  13. $ sudo apt-get install tomcat6
  14.  
  15.  
  16. Configuration
  17.  
  18. 1. Changing JVM used
  19. $ sudo nano /etc/default/tomcat6
  20.  
  21. JAVA_HOME=/usr/lib/jvm/java-6-sun
  22.  
  23.  
  24. 2. Declaring users and roles
  25. $ sudo nano /etc/tomcat6/tomcat-users.xml
  26.  
  27. <role rolename="admin"/>
  28. <user username="tomcat" password="s3cret" roles="admin"/>
  29.  
  30.  
  31. 3. Changing default ports
  32. $ sudo nano /etc/tomcat6/server.xml
  33.  
  34. <Connector port="8080" protocol="HTTP/1.1"
  35.                connectionTimeout="20000"
  36.                redirectPort="8443" />
  37. ...
  38. <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
  39.  
  40.  
  41. Using Tomcat standard webapps
  42.  
  43. 1. Tomcat documentation (http://yourserver:8080/docs)
  44. $ sudo apt-get install tomcat6-docs
  45.  
  46. 2. Tomcat administration webapps (http://yourserver:8080/manager/html, http://yourserver:8080/host-manager/html)
  47. $ sudo apt-get install tomcat6-admin
  48.  
  49. /* Access to the manager application is protected by default: you need to define a user with the role "manager" in /etc/tomcat6/tomcat-users.xml before you can access it. */
  50.  
  51. /* Access to the host-manager application is also protected by default: you need to define a user with the role "admin" in /etc/tomcat6/tomcat-users.xml before you can access it. */
  52.  
  53. $ sudo chgrp -R tomcat6 /etc/tomcat6
  54. $ sudo chmod -R g+w /etc/tomcat6
  55.  
  56. 3. Tomcat examples webapps (http://yourserver:8080/examples)
  57. $ sudo apt-get install tomcat6-examples
  58.  
  59. 4. Program Huree Academy (http://yourserver:8080/HUREEICT)
  60. $ sudo gedit /etc/tomcat6/server.xml
  61.  
  62.  
  63. <Context path="/HUREEICT" docBase="/home/hureeadmin/academy/HUREEICT" />
  64. </Host>
  65.  
  66.  
  67. nano /etc/mysql/my.cnf
  68. # bind-address           = 127.0.0.1
Advertisement
Add Comment
Please, Sign In to add comment