Cent OS 7上需要把mongoDB添加到systemd,否则会出现上面的错误

将mongoDB添加到systemd

# vim /usr/lib/systemd/system/mongod.service

[Unit]
Description=mongodb database

[Service]
User=mongod
Group=mongod
Environment="OPTIONS=--quiet -f /etc/mongod.conf"
ExecStart=/usr/bin/mongod $OPTIONS run
PIDFile=/var/run/mongodb/mongod.pid

[Install]
WantedBy=multi-user.target

建立链接
ln -s /usr/lib/systemd/system/mongod.service /etc/systemd/system/multi-user.target.wants/

重新加载systemctl
systemctl daemon-reload

mongod.service: control process exited, code=exited status=1的更多相关文章

  1. CenOS7.1 vncserver@:1.service: control process exited, code=exited status=2

    参考:http://www.cnblogs.com/gaohong/p/4829206.html 报错细节: vncserver@:1.service: control process exited, ...

  2. centOS 7一个解决“network.service: control process exited, code=exited status=1”方法

    今天早上2017-08-04,我打开虚拟机,使用远程工具xshell对虚拟机进行连接,我发现连接不上去,然后我ifconfig,发现找不到ens33了,就剩一个本地回环,看来是我的网络出现了问题,然后 ...

  3. nginx.service: control process exited, code=exited status=1

    安装linux的宝塔面板,结果面板显示nginx和php已经运行了,但是机器系统上并没有运行.记录一次nginx报错,操作步骤看下代码: [root@localhost nginx]# systemc ...

  4. vsftpd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT和vsftpd:500 OOPS: vsftpd: refusing to run with writable root inside chroot ()错误的解决方法

    今天在配置VSFTPD过程中遇到两个错误 1是启动失败,通过 SERVICE VSFTPD STATUS 查看到报错 May 02 16:06:58 debian systemd[1]: Starti ...

  5. centos 7 network.service control process exited

    一.service network restart 出错 问题描述: vmware 12 下centos 7 网络模式,NAT 昨晚作者打算更新自己虚拟机python,发现没网络ping www.ba ...

  6. main process exited, code=exited, status=203/EXEC

    问题描述: Oct :: c_3. systemd[]: Started etcd. Oct :: c_3. systemd[]: Starting etcd... Oct :: c_3. syste ...

  7. (samba启动失败)smb.service: main process exited, code=exited, status=1/FAILURE

    按照指示,前往:journalctl -xe 没什么发现,搜的时候有人说也可以查看 journalctl -r 打出来之后我也看不出什么门道来 又看到有人说 smb 方面可以看看 testparm 我 ...

  8. Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details

    thinkphp 在Apache上配置启用伪静态,重启Apache1 restart 竟然失败了,报错 Job for httpd.service failed because the control ...

  9. Linux 重启网卡失败 Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.

    linux下重启网卡使用命令 : service network restart 时报错: [root@slave01 hadoop]# service network restart Startin ...

随机推荐

  1. solidworks的工程图模板文件和图纸格式文件

    工程图模板文件:drwdot,这个文件是在新建工程图的时候,可以选择的,如下. 图纸格式文件:slddrt,这个文件是进入工程图环境,编辑[图纸属性]的时候,可以选择的.如下. 怎么定制上述两种文件? ...

  2. C#中用DateTime的ParseExact方法解析日期时间(excel中使用系统默认的日期格式)

    最近做的项目中服务器是英文的系统,系统需要通过excel的单元格导入日期,excel中的日期格式是系统默认的日期格式,如下图所示 以上日期格式,会跟着操作系统设置的日期格式相同例如我的中文系统的日期格 ...

  3. Mock及Mockito使用

    mockito http://www.vogella.com/tutorials/Mockito/article.html 原文地址: http://www.open-open.com/lib/vie ...

  4. C 语言 符合运算符

    复合赋值 5个算术运算符 + - * / % 可以和赋值运算符 = 结合起来形成符合运算符 += -= *= /= %= total += 5 total = total + 5 note:两个运算符 ...

  5. Verilog笔记——Verilog数字系统设计(第二版)夏宇闻

    本片记录Verilog学习笔记,主要是和以往用的C语言的不同之处,以例子.代码的形式记录.学习以<Verilog数字系统设计>(第二版)为参考资料,援助作者夏宇闻. 1. C语言和Veri ...

  6. HTML5 加密和摘要算法(base64,md5, sha1,rsa)

    < 一 > BASE64 1,Base64 是网络上最常见的用于传输 8Bit 字节码的编码方式之一,Base64就是一种基于64个可打印字符来表示二进制数据的方法 2,首先需要一个库 b ...

  7. Javascript 使用 async 声明符和 await 操作符进行异步操作

    async function 声明用于定义一个返回 AsyncFunction 对象的异步函数 await  操作符用于等待一个Promise 对象.它只能在异步函数 async function 中 ...

  8. python基础1.0

    1. python简介:解释性语言 安装python,注意路径加入path python的解释器,cpython,Python的解释器很多,但使用最广泛的还是CPython.如果要和Java或.Net ...

  9. AS3获得当前文件的文件名

    //当前文件的完整路径var fileUrl:String = this.loaderInfo.url;//查找路径的最后一个"/"var flag:int = fileUrl.l ...

  10. HQL中左连接,右连接、内连接

    左连接:left join 如A left join B 即取出A表的所有数据,由on条件关联的B表数据,有则显示,没有则为空: 右连接:right join 如 A right join B 即取出 ...