linux怎么重新启动jetty

linux怎么重新启动jetty,第1张

在/etc/init.d/下创建jetty文件内容

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

vim /etc/init.d/jetty

#内容如下:

#!/bin/bash

# chkconfig: 35 95 1

# description: script to start/stop jetty case $1 in start)

sh /opt/startjetty.sh stop)

sh /opt/stopjetty.sh *)

echo "Usage: $0 (start|stop)" esac

#更改权限

chmod 775 jetty

# 加入自动启动

chkconfig –add jetty

#查看自动启动设置

chkconfig –list jetty

jetty 0:off 1:off 2:off 3:on 4:off 5:on 6:off

以后可以用以下命令启动和停止脚本

1

2

service jetty start #启动

service jettystop #停止

在/etc/init.d/下创建jetty文件内容:

vim /etc/init.d/jetty

#内容如下:

#!/bin/bash 

# chkconfig: 35 95 1 

# description: script to start/stop jetty case $1 in start) 

sh /opt/startjetty.sh  stop) 

sh /opt/stopjetty.sh  *) 

echo "Usage: $0 (start|stop)"  esac 

#更改权限 

chmod 775 jetty 

# 加入自动启动

chkconfig –add jetty

#查看自动启动设置 

chkconfig –list jetty

jetty 0:off 1:off 2:off 3:on 4:off 5:on 6:off

以后可以用以下命令启动和停止脚本

service jetty start  #启动 

service jettystop  #停止


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/6225144.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-03-18
下一篇 2023-03-18

发表评论

登录后才能评论

评论列表(0条)

保存