查看所有启动项
systemctl list-unit-files|grep enabled
#设置开机启动
systemctl enable $serviceName
systemctl anable mongod.service
#禁止开机启动
systemctl disable mongod.service
查看所有启动项
systemctl list-unit-files|grep enabled
#设置开机启动
systemctl enable $serviceName
systemctl anable mongod.service
#禁止开机启动
systemctl disable mongod.service