linux系统设置tomcat自启动
来源:才华咖 本文已影响1.96W人
来源:才华咖 本文已影响1.96W人
需要将tomcat加入自启动队列中,则需要进行如下的操作:
以root用户登录系统:
cd /etc/rc.d/init.d/
vi tomcat
文件内容参考如下:
#!/bin/sh
#
# tomcat: Start/Stop/Restart tomcat
#
# chkconfig: 2345 80 20
# description: Tomcat is a Java Servlet Container
#
#
# match these vALues to your environment:
export CATALINA_BASE=/usr/local/tomcat
export CATALINA_HOME=/usr/local/tomcat
export CATALINA_TMPDIR=/usr/local/tomcat/temp
export JRE_HOME=/usr/java/jdk15
# Source function library.
. /etc/rc.d/init.d/functions
TOMCAT=/usr/local/tomcat
start() {
echo -n ___FCKpd___0"Starting Tomcat: "
$TOMCAT/bin/ start
}
stop() {
echo -n ___FCKpd___0"Stopping Tomcat: "
$TOMCAT/bin/ stop
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
;;
status)
;;
restart)
stop
start
;;
*)
echo ___FCKpd___0"Usage: $0 {startstoprestart}"
;;
esac
exit $RETVAL
把 tomcat 修改为可运行的.文件,命令参考如下:
chmod a+x tomcat
使用chkconfig命令把 tomcat 命令加入到系统启动队列中:
chkconfig --add tomcat
查看apachectl的状态:
chkconfig --list tomcat
九年级《unit 6 I like music that I can dance to. Period2》评课稿
Linux系统调用设备的ioctl函数
英语美文阅读:Kerry: Anti-IS Coalition Could Contribute to B
英语《Module 6 Unit 1 You can play football well》的教案设计
如何解决ghost安装系统本地硬盘显示invalid switch fmount问题
Module 3 Unit 2 I love my pocket calculator说课稿
Unit 5 It must belong to Caral section A英语评课稿
英国留学传媒硕士Media/Journalism/Communication解析
Liu Xiang in a TV Commercial Film英语美文
八年级英语下册Unit 6 An old man tried to move a Mountain period one说课稿
英语作文 Complaint about the Noise Pollution
Linux系统xlsatom命令如何使用
Module5Unit1CanIhaveanicecream教学设计及反思素材
Linux Mint Cinnamon下使用vino-server配置桌面共享的方法
The Impact of Information Explosion高中英语作文
高中英语作文:My approach to difficulties in learning
Win10系统IE11兼容性的设置方法
七下Module 10 Unit 2 This morning we took a walk评课稿
At Climate Summit, Hope for Emissions Deal美文欣赏
Oracle、Linux和CentOS安装配置步骤
How Do My Parents Feel About My Education英语作文
英语随堂练:Unit5 Do you want to watch a game
英文作文:My Military Training Instructor 我的教官
新目标八年级英语上册Unit 5 Can you come to my part
Scientists Build Robots to Live With Humans英语美文
英语教材分析:composition,analysis (unit 2)
The mountains the most beautiful female teachers英语作文
低碳生活英语写作范文:An activity about low carbon living
Linux系统启动的大致过程
Unit5《Doyouwanttowatchagame》知识点复习
英语阅读:Dollar Hit by Trump Tax Plan Doubts
Unit 1 London is the capital of England说课稿
A Boom in Adult Education英语作文
解读html中background-image的属性设置
自动化专业系统介绍
英语阅读推荐:How to protect cultural identity
《You Cant Judge a William by Its Cover》英语美文欣赏
人教PEP版小学五年级英语下册Unit3Myschoolcalender.ALet’stalk
英语阅读:African Union Leaders Talk Mali, Chinese Investmen
linux系统技术支持个人求职简历范文