service mongod start start: Unknown job: mongod问题
终于解决了这个异常蛋疼的问题,当安装完毕mongodb的时候,执行:
root@ubuntu:/usr/local# service mongod start
出现:
start: Unknown job: mongod
问题,折腾了半天,找到了答案.
参考:《ubuntu 15.10 mongodb.service 起不起来解决方案》 貌似网站被和谐了?没有办法提及链接。
这篇教程的建议是删后重装,但是时间花的很多,所以我没有去试。
First we are going to change MongoDB’s default data store files from /var/lib/mongodb to/data/db.
首先要做的事情,就是在配置文件中换默认的数据库,命令如下:
1.创建一个新的db
sudo mkdir -p /data/db
2.修改配置文件
sudo vim /etc/mongod.conf
3.将内容改为
# Note: if you run mongodb as a non-root user (recommended) you may
# need to create and set permissions for this directory manually,
# e.g., if the parent directory isn't mutable by the mongodb user.
#dbpath=/var/lib/mongodb
dbpath=/data/db
4.将原有数据库删除(保险起见我换了个名字)
mv /var/lib/mongodb /var/lib/mongodb1
5.给权限,原因:mongodb关于启动权限的问题
sudo chown -R mongodb:mongodb /data/db
6.启动
root@ubuntu:/usr/local# sudo service mongod start
mongod start/running, process 29572
解决问题。
2016/12/15
service mongod start start: Unknown job: mongod问题的更多相关文章
- mongod.service: control process exited, code=exited status=1
Cent OS 7上需要把mongoDB添加到systemd,否则会出现上面的错误 将mongoDB添加到systemd # vim /usr/lib/systemd/system/mongod.se ...
- Failed to start mongod.service: Unit not found
其实自己用惯的是MYSQL,然后项目最后一步完善数据读写的部分,本来打算用mysql的,然而在centOS系统上发现安装总是出问题,后来查找一下资料,发现centOS系统上一般用的是Mariadb,这 ...
- MongoDB源码分析——mongod数据查询操作
源码版本为MongoDB 2.6分支 Edit mongod数据查询操作 在mongod的初始化过程中说过,服务端接收到客户端消息后调用MyMessageHandler::process函数处理消息. ...
- 解决启动mongod 时,出现addr already in use错误
启动mongod root@wangyuyu-Vostro-1440:/usr/bin# ./mongod 错误提示: Sat Aug 17 09:02:02 [initandlisten] ER ...
- MongoDB的安装,mongod和mongo的区别
一. mongoDB安装路径 安装路径(最新4.0.11):https://www.mongodb.com/download-center/community?jmp=nav 建议另外找路径下载,外网 ...
- mongod 命令常用参数 mongod常用命令参数大全
成功启动MongoDB后,再打开一个命令行窗口输入mongo,就可以进行数据库的一些操作.输入help可以看到基本操作命令,只是MongoDB没有创建数据库的命令,但有类似的命令 mongod.exe ...
- mongodb Install the MongoDB service
在用到mongodb时,首先要运行mongod.exe以启动mongo,这样就会出现命令框( command prompt),为了避免出现这种情况.要以服务的形式来启动mongo,这样就不会出现命令框 ...
- hadoop启动时,报ssh: Could not resolve hostname xxx: Name or service not known
本文转载自:http://blog.csdn.net/wodewutai17quiet/article/details/76795951 问题:hadoop启动时,报ssh: Could not re ...
- Python3 常用爬虫库的安装
Python3 常用爬虫库的安装 1 简介 Windows下安装Python3常用的爬虫库:requests.selenium.beautifulsoup4.pyquery.pymysql.pymon ...
随机推荐
- js 实现文字列表滚动效果
今天要实现抽奖名单在首页滚动展示的效果,就用js写了一个,代码如下: html代码: <style type="text/css"> *{margin:;padding ...
- Sql server之路 (二)登录本地服务器
安装环境 Microsoft SQL Server Management Studio Express http://www.microsoft.com/zh-cn/download/details ...
- eclipse下提交job时报错mapred.JobClient: No job jar file set. User classes may not be found.
错误信息: 11/10/14 13:52:07 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. A ...
- Accumulators
copy的官方programming guide的代码,只有一个要说一下,Accumulators的更新是在action做的,transformation操作中对于Accumulators的增加不会即 ...
- XmlBeanFactory的Bean注册
Spring将bean从配置文件到加载到内存中的全过程: BeanFactory bf = new XmlBeanFactory(new ClassPathResource("beanFac ...
- display显示隐藏
display <!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <t ...
- POJ1204 Word Puzzles(AC自动机)
给一个L*C字符矩阵和W个字符串,问那些字符串出现在矩阵的位置,横竖斜八个向. 就是个多模式匹配的问题,直接AC自动机搞了,枚举字符矩阵八个方向的所有字符串构成主串,然后在W个模式串构造的AC自动机上 ...
- 找模式串[XDU1032]
Problem 1032 - 找模式串 Time Limit: 1000MS Memory Limit: 65536KB Difficulty: Total Submit: 644 Acce ...
- 【总结】String in Java
摘自:爪哇人的博客:http://hxraid.iteye.com/blog/522167/ J2SE - 语言基础与API JavaJVM虚拟机多线程数据结构 作者:每次上网冲杯Java时,都能看 ...
- 生成CSV文件后再将CSV文件导入到mysql
1.生成CSV jar包:http://pan.baidu.com/s/1xIL26 String csvFilePath = "d:\\test.csv"; CsvWriter ...