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

歡迎訪問 生活随笔!

生活随笔

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

linux

linux设置nexus开机自启动_CentOS7配置nexus开机自启动

發布時間:2023/12/10 linux 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux设置nexus开机自启动_CentOS7配置nexus开机自启动 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

CentOS7配置nexus開機自啟動

新建nexus啟動腳本

進入/etc/init.d目錄,新建腳本文件nexus

// 進入/etc/init.d

[root@linux_maven etc]# cd /etc/init.d/

// 新建腳本文件nexus

[root@linux_maven init.d]# vim nexus

腳本內容:

#!/bin/bash

#chkconfig:2345 20 90

#description:nexus

#processname:nexus

export JAVA_HOME=/root/apps/jdk1.8/

case $1 in

start) su root /usr/local/nexus3.21/bin/nexus start;;

stop) su root /usr/local/nexus3.21/bin/nexus stop;;

status) su root /usr/local/nexus3.21/bin/nexus status;;

restart) su root /usr/local/nexus3.21/bin/nexus restart;;

dump) su root /usr/local/nexus3.21/bin/nexus dump;;

console) su root /usr/local/nexus3.21/bin/nexus console;;

*) echo "Usage: nexus {start|stop|run|run-redirect|status|restart|force-reload}"

esac

設置腳本權限

[root@linux_maven init.d]# chmod +x /etc/init.d/nexus

使用service命令使用nexus

[root@linux_maven init.d]# service nexus status

WARNING: ************************************************************

WARNING: Detected execution as "root" user. This is NOT recommended!

WARNING: ************************************************************

nexus is running.

添加到開機啟動

[root@linux_maven init.d]# chkconfig nexus on

查看nexus開機啟動

[root@linux_maven ~]# chkconfig --list nexus

Note: This output shows SysV services only and does not include native

systemd services. SysV configuration data might be overridden by native

systemd configuration.

If you want to list systemd services use 'systemctl list-unit-files'.

To see services enabled on particular target use

'systemctl list-dependencies [target]'.

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

設置防火墻

// 進入防火墻設置文件目錄

[root@linux_maven init.d]# cd /etc/firewalld/zones/

// 使用vim, 修改防火墻配置文件

[root@linux_maven zones]# vim public.xml

添加以下放開端口內容, 其它不變

參考來源

總結

以上是生活随笔為你收集整理的linux设置nexus开机自启动_CentOS7配置nexus开机自启动的全部內容,希望文章能夠幫你解決所遇到的問題。

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