問題描述
- Ubuntu 16.04 下安裝 Nginx 服務器,在添加 nginx 服務時出現如下信息
# chkconfig --add nginx
chkconfig: command not found
問題原因
- Ubuntu 中
chkconfig
已經被sysv-rc-conf
所替代,chkconfig
命令如下:
# chkconfig --add nginx
# chkconfig nginx on
問題解決
# apt-get update
# apt-get install sysv-rc-conf
# sysv-rc-conf nginx on