</pre></h4><h4 style="margin:0px auto; padding:0px; color:rgb(51,51,51); font-family:"Microsoft Yahei",Verdana,Geneva,sans-serif; font-size:14px; line-height:21.6px">设置方法</h4><p style="margin-top:0px; margin-bottom:0px; padding-top:8px; padding-bottom:8px; padding-left:30px; line-height:26.6px; text-align:justify; color:rgb(85,85,85); font-family:"Microsoft Yahei",Verdana,Geneva,sans-serif; font-size:14px"><span style="line-height:26.6px">1、修改/etc/rc.d/rc.local,使用vi /etc/rc.d/rc.local 命令</span></p><p style="margin-top:0px; margin-bottom:0px; padding-top:8px; padding-bottom:8px; padding-left:30px; line-height:26.6px; text-align:justify; color:rgb(85,85,85); font-family:"Microsoft Yahei",Verdana,Geneva,sans-serif; font-size:14px">2、在/etc/rc.d/rc.local文件最后添加下面两行脚本<pre name="code" class="plain">export JAVA_HOME=/usr/local/jdk1.7.0_03
/usr/local/apache-tomcat-7.0.32/bin/startup.sh start
</pre></h4><h4 style="margin:0px auto; padding:0px; color:rgb(51,51,51); font-family:"Microsoft Yahei",Verdana,Geneva,sans-serif; font-size:14px; line-height:21.6px">设置方法</h4><p style="margin-top:0px; margin-bottom:0px; padding-top:8px; padding-bottom:8px; padding-left:30px; line-height:26.6px; text-align:justify; color:rgb(85,85,85); font-family:"Microsoft Yahei",Verdana,Geneva,sans-serif; font-size:14px"><span style="line-height:26.6px">1、修改/etc/rc.d/rc.local,使用vi /etc/rc.d/rc.local 命令</span></p><p style="margin-top:0px; margin-bottom:0px; padding-top:8px; padding-bottom:8px; padding-left:30px; line-height:26.6px; text-align:justify; color:rgb(85,85,85); font-family:"Microsoft Yahei",Verdana,Geneva,sans-serif; font-size:14px">2、在/etc/rc.d/rc.local文件最后添加下面两行脚本<pre name="code" class="plain">export JAVA_HOME=/usr/local/jdk1.7.0_03
/usr/local/apache-tomcat-7.0.32/bin/startup.sh start
其中:
/usr/local/jdk1.7.0_03 为本机jdk安装目录
/usr/local/apache-tomcat-7.0.32/bin/startup.sh 为本机tomcat安装的目录
3、修改rc.local文件为可执行,如:chmod +x rc.local