[root@localhost bin]# pwd
/usr/local/nexus-2.14.0-01/bin
[root@localhost bin]# cp nexus /etc/rc.d/init.d/
[root@localhost bin]# cd /etc/rc.d/init.d/
[root@localhost init.d]# ls
functions jexec netconsole network nexus README
[root@localhost init.d]# chkconfig --add nexus
[root@localhost init.d]# chkconfig --list | grep nexus
注意:该输出结果只显示 SysV 服务,并不包含原生 systemd 服务。SysV 配置数据可能被原生 systemd 配置覆盖。
如果您想列出 systemd 服务,请执行 'systemctl list-unit-files'。
欲查看对特定 target 启用的服务请执行
'systemctl list-dependencies [target]'。
nexus 0:关 1:关 2:开 3:开 4:开 5:开 6:关
[root@localhost init.d]# chkconfig nexus on
[root@localhost init.d]# chkconfig --list | grep nexus
注意:该输出结果只显示 SysV 服务,并不包含原生 systemd 服务。SysV 配置数据可能被原生 systemd 配置覆盖。
如果您想列出 systemd 服务,请执行 'systemctl list-unit-files'。
欲查看对特定 target 启用的服务请执行
'systemctl list-dependencies [target]'。
nexus 0:关 1:关 2:开 3:开 4:开 5:开 6:关
[root@localhost init.d]#