To change that, we go to /opt/tomcat/conf, edit server.xml and change the line
connector port="8080" ...to
connector port="80"...Ready ? Only if you want to run Tomcat as root. But we don't want this, from a security point of view. But, on Linux, only the root can use the "lower" ports.
So we have to dig deeper.
First install gcc if it's not already installed :
yum install gccand Autoconf :
yum install autoconfNow go to /opt/tomcat/bin (you will change this to your path to the Tomcat install dir) and do the following (taken from the Tomcat manual):
tar xvfz jsvc.tar.gzNow you can start Tomcat as a daemon using jsvc. It's an extremely ugly command line. But you can download my tomcat start-up file, un-zip-it, change it to your needs and situation, put it in the /etc/init.d, set the appropriate execute permissions and then run :
cd jsvc-src
autoconf
./configure --with-java=/usr/java/jdk1.5.0_11 you will adapt this to your Java install path
make
cp jsvc ..
cd ..
chkconfig --add tomcatAnd that's it.
service tomcat start (or stop)
No comments:
Post a Comment