tomcat - install tomcat7 service in ubuntu for all users -
i used sudo apt-get install tomcat7 install tomcat7 on ubuntu 13.04 server, tomcat installed on machine there few problems :
- openjdk installed on machine , don't want (i using oracke jdk7)
- after tomcat installation couldn't find webapp folder in should deploy war fies,
so removed tomcat , downloaded binary package apache website . please guide me on following matters :
- i need install tomcat service users (tomcat should started automatically on system reboot)
- all users should able browse deployed application internet browsers none of them should able delete/modify/create file in webapp directory without root password
thank all.
edit :
i followed instruction here http://www.howtogeek.com/howto/linux/installing-tomcat-6-on-ubuntu/ install tomcat manually service
after getting permission errors when trying start tomcat used accepted answer here a lots of (permission denied) in catalina.out , fixed that. no reason tomcat fails start , show me these lines
raysis@raysis-server:~$ sudo /etc/init.d/tomcat start [sudo] password raysis: using catalina_base: /usr/local/tomcat using catalina_home: /usr/local/tomcat using catalina_tmpdir: /usr/local/tomcat/temp using jre_home: /usr/lib/jvm/jdk1.7.0 using classpath: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar raysis@raysis-server:~$
if want start tomcat automatically can add start script call /etc/rc.local
if want switch used java version can set jre_home variable inside own start script or before call original start script.
i prefer write own start scripts. brings alternative pass other needed environment variables process (memory, debug, ...) can split separate instances 1 installation.
splitting separate instance installation way own webapp directory if use instance standard ubuntu installation
hope helps
here sample start script ...
#!/bin/bash # overwrite standard ports. must modify server.xml in conf use variables http_port=8002 shutdown_port=8006 ajp_port=8010 export java_opts="-xmx1024m -dmystuff.http.port=$http_port -dmystuff.shutdown.port=$shutdown_port -dmystuff.ajp.port=$ajp_port -export catalina_base=/opt/mystuff/tomcat7_inst # debugging export jpda_transport=dt_socket export jpda_address=9000 # java vm export jre_home=/opt/jre1.6.0_37 # call start script installation sh /opt/mystuff/tomcat7/bin/catalina.sh jpda start
Comments
Post a Comment