Failed to start mongod.service: Unit not found
其实自己用惯的是MYSQL,然后项目最后一步完善数据读写的部分,本来打算用mysql的,然而在centOS系统上发现安装总是出问题,后来查找一下资料,发现centOS系统上一般用的是Mariadb,这是一个MYSQL的分支,说是因为甲骨文收购了MYSQL后,为了避免闭源的风险,社区开始使用并维护这个MariaDB。
然后我安装Maria,一直卡在那里。。。
可是话说为什么我一个前端,要搞这些东西呢。。。
然后我还是退出来使用mongodb算了。。。
然后启动mongodb的时候报这个错误:Failed to start mongod.service: Unit not found
此刻的心情。。。。
再是一番查阅,看了好多帖子终于找到解决方法:
1创建配置文件:
sudo nano /etc/systemd/system/mongodb.service
2.在里面追加文本:
[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
3.按ctrl+X退出
4.启动服务
sudo systemctl start mongodb
sudo systemctl status mongodb
5.让它永久启动
sudo systemctl enable mongodb
莫名心累。。。
附一篇在centOS安装MYSQL的帖子:
centos7 mysql数据库安装和配置
Failed to start mongod.service: Unit not found的更多相关文章
- Failed to stop iptables.service: Unit iptables.service not loaded.
redhat 7 [root@lk0 ~]# service iptables stop Redirecting to /bin/systemctl stop iptables.service Fai ...
- centos7 Failed to start firewalld.service: Unit is masked.
centos7 启动防火墙失败:Failed to start firewalld.service: Unit is masked. ---- 刚yum安装了iptables 解决: 执行”sys ...
- docker报错:Failed to restart docker.service: Unit not found.
前言:我之前安装好docker了,但是关机重启后,发现docker就没了 报错:Failed to restart docker.service: Unit not found. 解决方法: 1. ...
- [ISSUE] [Centos] Centos Start Nginx Show: Failed to start nginx.service:unit not found
CMD Line:systemctl start nginx.serviceFailed to start nginx.service: Unit not found. Solution: 1.vim ...
- Failed to stop iptables.service: Unit iptables.service not loaded.解决方法
CentOS7中执行 service iptables start/stop 会报错Failed to start iptables.service: Unit iptables.service fa ...
- mysqld服务启动失败, Failed to restart mysqld.service: Unit not found.
-bash-4.2# service mysqld restart Redirecting to /bin/systemctl restart mysqld.serviceFailed to rest ...
- CentOS 7 防火墙 出现Failed to start iptables.service: Unit iptables.service failed to load
错误信息如下: [root]# service iptables start Redirecting to /bin/systemctl start iptables.service Failed t ...
- Failed to start metasploit.service: Unit metasploit.service not found的解释
不多说,直接上干货! root@kali:~# service metasploit start Failed to start metasploit.service: Unit metasploit ...
- CentOS 7出现Failed to start firewalld.service: Unit is masked的解决办法和firewalld 防火墙开关
说明:刚刚使用systemctl start firewalld命令开启防火墙的时候,却开不成功,出现Failed to start firewalld.service: Unit is masked ...
随机推荐
- thinkphp5--多文件入口设置
来源:http://www.cnblogs.com/walblog/p/8035426.html 今天在用tp5做项目的时候发现,前台是可以绑定默认到index模块的,但是后台不好弄,于是查了一下手册 ...
- js 运动函数篇 (一) (匀速运动、缓冲运动、多物体运动、多物体不同值运动、多物体多值运动)层层深入
前言: 本人纯小白一个,有很多地方理解的没有各位大牛那么透彻,如有错误,请各位大牛指出斧正!小弟感激不尽. 本篇文章为您分析一下原生JS写 匀速运动.缓冲运动.多物体运 ...
- 正则表达式(grep,awk,sed)和通配符
1. 正则表达式 1. 什么是正则表达式? 正则表达式就是为了处理大量的字符串而定义的一套规则和方法. 通过定义的这些特殊符号的辅助,系统管理员就可以快速过滤,替换或输出需要的字符串. Linux正则 ...
- Tomcat中的类是怎么被一步步加载的?
了解Tomcat的类加载机制,原来一切是这么的简单. 一.类加载 在JVM中并不是一次性把所有的文件都加载到,而是一步一步的,按照需要来加载. 比如JVM启动时,会通过不同的类加载器加载不同的类.当用 ...
- java中文乱码解决之道(七)—–JSP页面编码过程
我们知道JSP页面是需要转换为servlet的,在转换过程中肯定是要进行编码的.在JSP转换为servlet过程中下面一段代码起到至关重要的作用. <%@ page language=" ...
- App《最美诗词》开发 -- Java后端(整合框架)
本人一直是致力于Android开发,由于我们三位Android开发者 @老蔡 @不肯过江东 打算一起开发Android App<最美诗词>,需要服务器端的接口支持,所以便兼职做起了后端的代 ...
- centos 7.0运行docker出现内核报错解决方法
目前我这里docker是运行在centos 7.0系统里,使用1.5版本docker,最近一台服务器总是不定期死机,通过查看日志发现属于内核bug导致,报错信息如下 1 2 3 4 5 6 7 8 9 ...
- Vim Install-Could not get lock......
在Ubuntu下安装Vim编辑器时,出现错误: 可能原因: 上次安装或更新没有正常完成,导致资源被锁. 解决方案: 删除异常资源,重新下载: 注意 删除异常资源时,一定要切换到root用户,否则操作无 ...
- C++--浅谈开发系统的经验
最近写了不少类了,从垃圾代码爬坑,虽然还是很垃圾,但是照葫芦画瓢,有几分神韵.在这里总结一下,写类的经验教训. 第一步 分析: 当拿到一个要求时,要先去考虑怎样一个类到底该实现什么样的功能,有什么样的 ...
- 刷短视频看新闻看小说也能赚钱的几款APP
一.抖音极速版 发啦! 刷短视频也能赚钱 第1步:下载[抖音极速版] 第2步:填我邀请码[831008243] 第3步:立刻提现最高[38元]红包 二.今日头条极速版 1元现金速撸 下载[今日头条极速 ...