Install Tomcat 6 on CentOS or RHEL --转载
Change to the /etc/init.d directory and create a script called 'tomcat' as shown below. <div class="dp-highlighter"> <div class="bar"> <div class="tools"> <a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos">view plain<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos">copy to clipboard<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos">print<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos">?
The above script is simple and contains all of the basic elements you will need to get going. As you can see,we are simply calling the startup.sh and shutdown.sh You can adjust your script according to your needs and,in subsequent posts,we'll look at additional examples. CATALINA_HOME is the Tomcat home directory (/usr/share/apache-tomcat-6.0.32) Now,set the permissions for your script to make it executable: <div class="dp-highlighter"> <div class="bar"> <div class="tools"> <a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos">view plain<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos">copy to clipboard<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos">print<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos">?
We now use the chkconfig utility to have Tomcat start at boot time. In <div class="dp-highlighter"> <div class="bar"> <div class="tools"> <a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos">view plain<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos">copy to clipboard<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos">print<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos">?
Verify it: <div class="dp-highlighter"> <div class="bar"> <div class="tools"> <a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos">view plain<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos">copy to clipboard<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos">print<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos">?
Now,let's test our script. Start Tomcat: <div class="dp-highlighter"> <div class="bar"> <div class="tools"> <a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos">view plain<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos">copy to clipboard<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos">print<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos">?
(编辑:威海站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |