Failed to start mongodb.service: Unit mongodb.service not found.
hadoop@hadoop:~$ sudo service mongodb start
Failed to start mongodb.service: Unit mongodb.service not found.
解决办法:百度down来的————————
1创建配置文件:
sudo nano /etc/systemd/system/mongdb.service
[Unit]
Description=High-performance, schema-free document-oriented database
After=network.target
[Service]
User=mongodb
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf
[Install]
WantedBy=multi-user.target
2启动服务
sudo service mongodb start
本文详细介绍了当遇到MongoDB服务启动失败,提示服务未找到的问题时的解决方案。通过创建配置文件并调整启动命令,成功解决了问题,使MongoDB服务能够正常运行。
1329

被折叠的 条评论
为什么被折叠?



