Escolar Documentos
Profissional Documentos
Cultura Documentos
Installing Java 7.x and Tomcat 7.x on Debian Squeeze | Wolf Paulus
About Journal Software Systems Talks Videos Contact
>
About Me
My name is Wolf Paulus, a photographer, hiker, hacker, technologist based in Ramona, California. I'm currently working on Android projects, occasionally speak at developer conferences, and work on open source projects (Swixml, HessDroid, ). You can contact me by email at wolf@wolfpaulus.com Read More
Upcoming
Mobile Voice Conference 2014 at the Hyatt Fisherman's Wharf, San Francisco, CA On March 3-5, 2014, I will be speaking at the Mobile Voice Conference 2014 on "Emotional Prosody"
Journal Archive
Android (19) Embedded (24) Hardware (19) Tomcat 7 is the first Apache Tomcat release to support the Servlet 3.0, JSP 2.2, and EL 2.2 specifications. Please note that Tomcat 7 requires Java 1.6 or better so we start with installing a recent version of Oracles JRE. Java (10) Life (20) Mac OS X (13) Software (22)
Embedded
I n s t a l l i n gJ a v a7 1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 $s ur o o t #e c h o" d e bh t t p : / / p p a . l a u n c h p a d . n e t / w e b u p d 8 t e a m / j a v a / u b u n t up r e c i s em a i n ">/ e t c / a p t / s o u r c e s . l i s t . d / w e b u p d 8 t e a m j a v a . l i s t #e c h o" d e b s r ch t t p : / / p p a . l a u n c h p a d . n e t / w e b u p d 8 t e a m / j a v a / u b u n t up r e c i s em a i n "> >/ e t c / a p t / s o u r c e s . l i s t . d / w e b u p d 8 t e a m j a v a . l i s t #a p t k e ya d vk e y s e r v e rk e y s e r v e r . u b u n t u . c o mr e c v k e y sE E A 1 4 8 8 6 #a p t g e tu p d a t e Arduino on Quark SoC X1000 #a p t g e ti n s t a l lo r a c l e j a v a 7 i n s t a l l e r #j a v av e r s i o n / Intel Galileo Galileo is a j a v av e r s i o n" 1 . 7 . 0 _ 1 7 " microcontroller board based J a v a ( T M )S ER u n t i m eE n v i r o n m e n t( b u i l d1 . 7 . 0 _ 1 7 b 0 2 ) on the Intel Quark SoC J a v aH o t S p o t ( T M )6 4 B i tS e r v e rV M( b u i l d2 3 . 7 b 0 1 ,m i x e dm o d e ) #e x i t X1000 Application Processor, $
http://wolfpaulus.com/jounal/software/tomcat_squeeze/
1/5
1/20/2014
Installing Java 7.x and Tomcat 7.x on Debian Squeeze | Wolf Paulus
a 32-bit Intel Pentium-class system on a chip (datasheet?). Its the first board based on Intel architecture designed to be hardware and software pincompatible
With Java now installed we move on, installing Tomcat. However, it may be beneficial to have an dedicated user for Tomcat, in case you BTW, Java got installed into this location: /usr/lib/jvm/java-7-oracle
Installing Tomcat7
D o w n l o a d i n ga n du n a r c h i v i n gt h ea r c h i v e 1 2 3 $c d/ t m p $w g e th t t p : / / m i r r o r . c o g e n t c o . c o m / p u b / a p a c h e / t o m c a t / t o m c a t 7 / v 7 . 0 . 3 7 / b i n / a p a c h e t o m c a t 7 . 0 . 3 7 . $t a rx v z f. / a p a c h e t o m c a t 7 . 0 . 3 7 . t a r . g z
M o v i n gt h ed i s t r i b u t i o ni n t o/ u s r / s h a r e / t o m c a t 7 1 2 $s u d om k d i r/ u s r / s h a r e / t o m c a t 7 $s u d om v/ t m p / a p a c h e t o m c a t 7 . 0 . 3 7/ u s r / s h a r e / t o m c a t 7
To make it easy to replace this release with future releases, we are going to create a symbolic link that we are going to use when referring to Tomcat (after removing the old link, you might have from installing a previous version):
L i n k i n gt o m c a tt ot o m c a t 7 . x . x 1 2 $s u d or mf/ u s r / s h a r e / t o m c a t $s u d ol ns/ u s r / s h a r e / t o m c a t 7 / a p a c h e t o m c a t 7 . 0 . 3 7/ u s r / s h a r e / t o m c a t
Since we created a tomcat user, he should also own all these files in
C h a n g i n go w n e r s h i pa n dm a k es c r i p t se x e c u t a b l e 1 2 $s u d oc h o w nRt o m c a t : t o m c a t/ u s r / s h a r e / t o m c a t 7 $s u d oc h m o d+ x/ u s r / s h a r e / t o m c a t / b i n / * . s h
If Tomcats default HTTP port (8080) is already in use, you need to edit the server.xml configuration file, e.g. edit /usr/share/tomcat/conf/server.xml and replace 8080 with 8000
Starting Tomcat
T o m c a tS t a r t u p 1 2 3 4 5 6 7 $s u d o/ b i n / s u-t o m c a tc/ u s r / s h a r e / t o m c a t / b i n / s t a r t u p . s h U s i n gC A T A L I N A _ B A S E : / u s r / s h a r e / t o m c a t U s i n gC A T A L I N A _ H O M E : / u s r / s h a r e / t o m c a t U s i n gC A T A L I N A _ T M P D I R :/ u s r / s h a r e / t o m c a t / t e m p U s i n gJ R E _ H O M E : / u s r U s i n gC L A S S P A T H : / u s r / s h a r e / t o m c a t / b i n / b o o t s t r a p . j a r : / u s r / s h a r e / t o m c a t / b i n / t o m c a t j u l i . j a r
http://wolfpaulus.com/jounal/software/tomcat_squeeze/
2/5
1/20/2014
Installing Java 7.x and Tomcat 7.x on Debian Squeeze | Wolf Paulus
Stopping Tomcat
T o m c a tS h u t d o w n 1 2 3 4 5 6 7 $ s u d o/ b i n / s u-t o m c a tc/ u s r / s h a r e / t o m c a t / b i n / s h u t d o w n . s h U s i n gC A T A L I N A _ B A S E : / u s r / s h a r e / t o m c a t U s i n gC A T A L I N A _ H O M E : / u s r / s h a r e / t o m c a t U s i n gC A T A L I N A _ T M P D I R :/ u s r / s h a r e / t o m c a t / t e m p U s i n gJ R E _ H O M E : / u s r U s i n gC L A S S P A T H : / u s r / s h a r e / t o m c a t / b i n / b o o t s t r a p . j a r : / u s r / s h a r e / t o m c a t / b i n / t o m c a t j u l i . j a r
W e b m i nT o m c a tS t a r t u p / S h u t d o w n 1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 1 5 # ! / b i n / s h # # #B E G I NI N I TI N F O #P r o v i d e s :T o m c a t #R e q u i r e d S t a r t :$ n e t w o r k #R e q u i r e d S t o p :$ n e t w o r k #D e f a u l t S t a r t :235 #D e s c r i p t i o n :J a v aS e r v l e ta n dJ S PE n g i n e # # #E N DI N I TI N F O c a s e" $ 1 "i n ' s t a r t ' ) / b i n / s u-t o m c a tc/ u s r / s h a r e / t o m c a t / b i n / s t a r t u p . s h ; ; ' s t o p ' ) / b i n / s u-t o m c a tc/ u s r / s h a r e / t o m c a t / b i n / s h u t d o w n . s h
http://wolfpaulus.com/jounal/software/tomcat_squeeze/
3/5
1/20/2014
1 6 1 7 1 8 1 9 2 0 2 1 . * ) ; ; e c h o" U s a g e :$ 0{s t a r t|s t o p} " ; ; e s a c e x i t0
Installing Java 7.x and Tomcat 7.x on Debian Squeeze | Wolf Paulus
3 Comments
peter on March 27, 2013 at 10:51 am
Great Manual worked like a charm Thanks! Can you add how to register tomcat as a service so that after a reboot tomcat automatically starts? thanks
Submit a Comment
Your email address will not be published. Required fields are marked *
Name *
Email *
Website
http://wolfpaulus.com/jounal/software/tomcat_squeeze/
4/5
1/20/2014
Installing Java 7.x and Tomcat 7.x on Debian Squeeze | Wolf Paulus
Comment
You may use these HTML tags and attributes: < ah r e f = " "t i t l e = " " >< a b b rt i t l e = " " >< a c r o n y mt i t l e = " " >< b > < b l o c k q u o t ec i t e = " " >< c i t e >< c o d e >< d e ld a t e t i m e = " " >< e m >< i >< qc i t e = " " >< s t r i k e >< s t r o n g > Submit Comment
i p q
http://wolfpaulus.com/jounal/software/tomcat_squeeze/
5/5