sudo vim /etc/rc.local

Refer to: http://www.bkjia.com/xtzh/887517.html


设置某个 service 项目开机自动启动, 例如已经可以使用 sudo service slapd start 启动的 OpenLDAP 可以用如下命令开机自动启动:

sudo chkconfig slapd on

# 屏幕输出
➜ lane@vbox ~/open-ldap-script git:(master) sudo chkconfig slapd on
Note: Forwarding request to 'systemctl enable slapd.service'.
Created symlink from /etc/systemd/system/multi-user.target.wants/slapd.service to /usr/lib/systemd/system/slapd.service.
Comments
Write a Comment