Contents
  1. 1. Ubuntu运行级别
  2. 2. 以nexus为例,配置nexus开启自动启动
  3. 3. sysv-rc-conf管理启动项

Ubuntu运行级别

1
2
3
4
5
6
7
8
9
10
11
12
13
0 停机

1 单用户,Does not configure network interfaces, start daemons, or allow non-root logins

2 多用户,无网络连接 Does not configure network interfaces or start daemons

3 多用户,启动网络连接 Starts the system normally.

4 用户自定义

5 多用户带图形界面

6 重启

以nexus为例,配置nexus开启自动启动

1
2
cp /opt/nexus/nexus-2.0.3/bin/nexus /etc/init.d/
update-rc.d nexus defaults 99 ##数字越大启动越靠后面,因为需要网络支持,所以启动靠后

sysv-rc-conf管理启动项

1
2
sudo apt-get install sysv-rc-conf
sudo sysv-rc-conf
Contents
  1. 1. Ubuntu运行级别
  2. 2. 以nexus为例,配置nexus开启自动启动
  3. 3. sysv-rc-conf管理启动项