diff --git a/README.md b/README.md index 38fd6c7..3b8b5e7 100644 --- a/README.md +++ b/README.md @@ -266,6 +266,8 @@ $ sudo chmod 755 /etc/rc.local $ update-rc.d rc.local defaults $ sudo systemctl start orbit $ sudo systemctl start rc.local +$ sudo systemctl enable mongod.service #ubuntu18.04以上適用(可在系統boot時,自動開啟mongo) +$ sudo mv /etc/init.d/mongod /etc/systemd/system/ && sudo systemctl enable mongod.service #如果sudo systemctl enable mongod.service失敗時 $ sudo crontab -e #加入以下內容 # @reboot /etc/init.d/orbit start # @reboot service mongod restart