最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

linux中設(shè)置nexus開(kāi)機(jī)自啟動(dòng)的方法

 更新時(shí)間:2024年02月27日 10:13:08   作者:嗑嗑嗑瓜子的貓  
這篇文章主要介紹了linux中設(shè)置nexus開(kāi)機(jī)自啟動(dòng)的方法,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧

一、把nexus配置成服務(wù)

1、新建服務(wù)腳本

vim /etc/init.d/nexus

添加以下腳本內(nèi)容

#!/bin/bash
#chkconfig:2345 20 90
#description:nexus
#processname:nexus
 
export JAVA_HOME=/usr/local/jdk1.8.0_60
 
case $1 in
        start) su root /usr/local/nexus-3.12.1-01/bin/nexus start;;
        stop) su root /usr/local/nexus-3.12.1-01/bin/nexus stop;;
        status) su root /usr/local/nexus-3.12.1-01/bin/nexus status;;
        restart) su root /usr/local/nexus-3.12.1-01/bin/nexus restart;;
        dump) su root /usr/local/nexus-3.12.1-01/bin/nexus dump;;
        console) su root /usr/local/nexus-3.12.1-01/bin/nexus console;;
        *) echo "Usage: nexus {start|stop|run|run-redirect|status|restart|force-reload}"
esac

配置完后,保存退出

2、給新建的腳本設(shè)置執(zhí)行權(quán)限

chmod 744 /etc/init.d/nexus

3、執(zhí)行以下命令進(jìn)行啟動(dòng)、停止 和 重啟nexus服務(wù)

#啟動(dòng)
service nexus start
 
#停止
service nexus stop
 
#重啟
service nexus restart
 
#查看nexus的狀態(tài)
service nexus status

二、配置nexus服務(wù)開(kāi)機(jī)自啟動(dòng)

#向chkconfig添加 nexus 服務(wù)的管理
chkconfig --add nexus
 
#設(shè)置nexus服務(wù)自啟動(dòng)
chkconfig nexus on
 
#關(guān)閉nexus服務(wù)自啟動(dòng)
chkconfig nexus off
 
#刪除nexus服務(wù)在chkconfig上的管理
chkconfig –del nexus

這樣就成功配置了nexus在linux下開(kāi)機(jī)自啟動(dòng)

到此這篇關(guān)于linux中設(shè)置nexus開(kāi)機(jī)自啟動(dòng)的方法的文章就介紹到這了,更多相關(guān)linux nexus開(kāi)機(jī)自啟動(dòng)內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評(píng)論

蓬安县| 泽库县| 万宁市| 睢宁县| 那坡县| 遵义县| 麦盖提县| 兴义市| 嘉义县| 墨竹工卡县| 玉林市| 广宁县| 海兴县| 城口县| 香河县| 虞城县| 花莲县| 贡嘎县| 凤台县| 双江| 蚌埠市| 红河县| 通许县| 太白县| 左贡县| 鹿泉市| 金溪县| 沾益县| 洛浦县| 乌拉特中旗| 敖汉旗| 黄冈市| 英德市| 德阳市| 甘洛县| 丹棱县| 鄂伦春自治旗| 志丹县| 安化县| 浠水县| 佛教|