日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux怎样服务,如何在linux添加服务

發布時間:2023/12/19 linux 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux怎样服务,如何在linux添加服务 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

最近要寫一個oracle啟動服務,遇到一個問題,特記錄如下:編寫好腳本后,測試可以正常啟動與關閉,加入服務的時候出現如下提示:

chkconfig --add oracle

service oracle does not support chkconfig

google發現如下鏈接:

Make sure the rc script has a chkconfig-conforming header.

Citing the manual page:

RUNLEVEL FILES

Each service which should be manageable by chkconfig needs two or more

commented lines added to its init.d script. The first line tells

chkconfig what runlevels the service should be started in by default,

as well as the start and stop priority levels. If the service should

not, by default, be started in any runlevels, a - should be used in place

of the runlevels list. The second line contains a description for the

service, and may be extended across multiple lines with backslash

continuation.

For example, random.init has these three lines:

# chkconfig: 2345 20 80

# description: Saves and restores system entropy pool for

# higher quality random number generation.

This says that the random script should be started in levels 2, 3, 4, and 5,

that its start priority should be 20, and that its stop priority

should be 80. You should be able to figure out what the description says;

the causes the line to be continued. The extra space in front of

the line is ignored.

仔細檢查我寫的oracle腳本,發現description 我少寫一個冒號,加入后,在執行

chkconfig --add oracle

一切正常。

總結

以上是生活随笔為你收集整理的linux怎样服务,如何在linux添加服务的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。