成人无码视频,亚洲精品久久久久av无码,午夜精品久久久久久毛片,亚洲 中文字幕 日韩 无码

資訊專欄INFORMATION COLUMN

讓karaf隨ubuntu開機(jī)啟動(dòng)

andong777 / 1683人閱讀

摘要:最近幫助一個(gè)客戶部署了一個(gè)環(huán)境??蛻籼岢?,能不能讓開機(jī)啟動(dòng)。不需要讓運(yùn)維人員知道如何操作。需求合理,沒有拒絕的理由。原以為設(shè)置個(gè)開機(jī)啟動(dòng),和玩似的,結(jié)果被機(jī)器玩了。所以,第一眼在下看到官方的開機(jī)啟動(dòng)方案時(shí),眼前一亮。

最近幫助一個(gè)客戶部署了一個(gè)Apache Servicemix環(huán)境。
客戶提出,能不能讓Servicemix開機(jī)啟動(dòng)。這樣,如果機(jī)器出現(xiàn)了什么問題,重啟一下就好了。不需要讓運(yùn)維人員知道如何操作Servicemix。
當(dāng)然可以。需求合理,沒有拒絕的理由。

但是實(shí)際操作的時(shí)候,試過(guò)在init.d目錄下加腳本,在rc.local中加命令行。在網(wǎng)上也找了好幾個(gè)方法,均告失敗,也沒看到任何錯(cuò)誤。原以為設(shè)置個(gè)開機(jī)啟動(dòng),和玩似的,結(jié)果被機(jī)器玩了。

不過(guò),功夫不負(fù)有心人,終于還是找到了辦法。

因?yàn)閟ervicemix其實(shí)就是一個(gè)開源大禮包,把幾個(gè)apache的開源軟件組裝在一起拼湊而成。運(yùn)行時(shí)環(huán)境是Karaf。所以,第一眼在karaf下看到官方的開機(jī)啟動(dòng)方案時(shí),眼前一亮。覺得這個(gè)方法應(yīng)該可行。結(jié)果一試,果然可以。

操作步驟也非常簡(jiǎn)單,摘抄如下(不過(guò),還是去官網(wǎng)看一下更靠譜,網(wǎng)址:https://karaf.apache.org/manu...):

Installation
Apache Karaf Service Wrapper is an optional feature. You have to install the "Service Wrapper" installer first.

In the console:

karaf@root()> feature:install service-wrapper
Now, you have the wrapper:install command, to "register" Apache Karaf as service/daemon on your system:

karaf@root()> wrapper:install --help
DESCRIPTION
        wrapper:install

        Install the container as a system service in the OS.

SYNTAX
        wrapper:install [options]

OPTIONS
        -d, --display
                The display name of the service.
                (defaults to karaf)
        --help
                Display this help message
        -s, --start-type
                Mode in which the service is installed. AUTO_START or DEMAND_START (Default: AUTO_START)
                (defaults to AUTO_START)
        -n, --name
                The service name that will be used when installing the service. (Default: karaf)
                (defaults to karaf)
        -D, --description
                The description of the service.
                (defaults to )
The wrapper:install command detects the running Operating Service and provide the service/daemon ready to be integrated in your system.

For instance, on a Ubuntu/Debian Linux system:

karaf@root()> wrapper:install
Creating file: /opt/apache-karaf-4.0.0/bin/karaf-wrapper
Creating file: /opt/apache-karaf-4.0.0/bin/karaf-service
Creating file: /opt/apache-karaf-4.0.0/etc/karaf-wrapper.conf
Creating missing directory: /opt/apache-karaf-4.0.0/lib/wrapper
Creating file: /opt/apache-karaf-4.0.0/lib/wrapper/libwrapper.so
Creating file: /opt/apache-karaf-4.0.0/lib/wrapper/karaf-wrapper.jar
Creating file: /opt/apache-karaf-4.0.0/lib/wrapper/karaf-wrapper-main.jar

Setup complete.  You may wish to tweak the JVM properties in the wrapper configuration file:
        /opt/apache-karaf-4.0.0/etc/karaf-wrapper.conf
before installing and starting the service.


Ubuntu/Debian Linux system detected:
  To install the service:
    $ ln -s /opt/apache-karaf-4.0.0/bin/karaf-service /etc/init.d/

  To start the service when the machine is rebooted:
    $ update-rc.d karaf-service defaults

  To disable starting the service when the machine is rebooted:
    $ update-rc.d -f karaf-service remove

  To start the service:
    $ /etc/init.d/karaf-service start

  To stop the service:
    $ /etc/init.d/karaf-service stop

  To uninstall the service :
    $ rm /etc/init.d/karaf-service

文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。

轉(zhuǎn)載請(qǐng)注明本文地址:http://m.hztianpu.com/yun/68292.html

相關(guān)文章

  • Karaf(OSGi)+CXF荊棘之路

    摘要:筆者很菜,文章僅供自己復(fù)習(xí)使用,不專業(yè)之處請(qǐng)見諒?,F(xiàn)在公司讓用的框架,未來(lái)也許某天也會(huì)成為主流的吧,本文主要講解如何簡(jiǎn)單使用進(jìn)行開發(fā)。這里談的是不是,兩個(gè)技術(shù)名詞長(zhǎng)得很像卻是兩碼事看錯(cuò)文章的朋友請(qǐng)打住。在標(biāo)簽下指定屬性所對(duì)應(yīng)的類。 吐槽:不斷的JAVA新技術(shù)學(xué)習(xí)中,幸得筆者同事xunhua是大神,真的是大神級(jí)那種,一路抱大腿走過(guò)荊棘之路,真的可以用荊棘來(lái)形容Karaf(OSGi)+ C...

    hankkin 評(píng)論0 收藏0
  • Nexus3私有倉(cāng)庫(kù)搭建 docker+maven+npm

    摘要:安裝號(hào)稱是世界上最流行的私服管理軟件可以搭建幾乎目前所有常見的倉(cāng)庫(kù)如等更是增加了對(duì)倉(cāng)庫(kù)的支持應(yīng)該是搭建私服的唯一選擇有兩個(gè)版本和其中版本是免費(fèi)專業(yè)版需要收費(fèi)對(duì)于日常的倉(cāng)庫(kù)管理已經(jīng)足夠用支持二進(jìn)制文件安裝和安裝這里選擇安裝簡(jiǎn)單方便運(yùn)行以下命令 安裝 Nexus號(hào)稱是世界上最流行的私服管理軟件(The worlds most popular repository),可以搭建幾乎目前所有常見...

    bang590 評(píng)論0 收藏0
  • 私有云部署-UCloudStack私有云部署之虛擬機(jī)

    摘要:虛擬網(wǎng)卡與虛擬機(jī)的生命周期一致,無(wú)法進(jìn)行分離,虛擬機(jī)被銷毀時(shí),虛擬網(wǎng)卡即被銷毀。每塊虛擬網(wǎng)卡支持綁定一個(gè)安全組,提供網(wǎng)卡級(jí)別安全控制。平臺(tái)默認(rèn)提供塊虛擬網(wǎng)卡,若業(yè)務(wù)有塊以上網(wǎng)卡需求可通過(guò)綁定彈性網(wǎng)卡,為虛擬機(jī)提供多網(wǎng)絡(luò)服務(wù)。虛擬機(jī)是 UCloudStack 云平臺(tái)的核心服務(wù),提供可隨時(shí)擴(kuò)展的計(jì)算能力服務(wù),包括 CPU 、內(nèi)存、操作系統(tǒng)等最基礎(chǔ)的計(jì)算組件,并與網(wǎng)絡(luò)、磁盤等服務(wù)結(jié)合提供完整的計(jì)算...

    ernest.wang 評(píng)論0 收藏0

發(fā)表評(píng)論

0條評(píng)論

andong777

|高級(jí)講師

TA的文章

閱讀更多
最新活動(dòng)
閱讀需要支付1元查看
<