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 ...
随机推荐
- 杂园日记-H5-IOS-Android混合开发
1.js 调用 原生API iOS: window.webkit.messageHandlers.yourFunName.postMessage({"1":"3" ...
- 用scanf、printf输入输出string型字符串
c语言里是没有string型的,string在c++里面.有的时候在c++里要用scanf.printf输入输出string型字符串,这是可以实现的,不过要做一点处理. 具体操作看代码: #inclu ...
- thinkphp--多个id查询
$feedback_list = $feedback -> where( array("member_id"=>array("in", " ...
- 引入OpenCV导致私有内存巨大
引入OpenCV导致私有内存巨大 opencvC++VS2015 说明 在调试程序的时候 发现自己的程序在VS的调试窗口占用很高, 花时间关注了一下这个问题, 手动写了小的程序复现这个问题,最终确定了 ...
- c语言实现乘法口诀表
利用c语言实现乘法口诀表的两种输出: #include <stdio.h> int main(int argc, char *argv[]) { ; ;a<;a++){//输出1-9 ...
- 【JAVA基础】05 Java语言基础:数组
1. 数组概述和定义格式说明 为什么要有数组(容器) 为了存储同种数据类型的多个值 数组概念 数组是存储同一种数据类型多个元素的集合.也可以看成是一个容器. 数组既可以存储基本数据类型,也可以存储引用 ...
- 【集群实战】共享存储实时备份(解决nfs共享存储的单点问题)
1. nfs存储的单点问题 如果nfs服务器宕机了,则所有的nfs客户机都会受到影响.一旦宕机,会丢失部分用户的数据.为了解决单点问题,需要实现共享存储的实时备份,即:将nfs服务端共享目录下的数据实 ...
- Java程序员必备基础结构图
前言 最近看了深入理解Java虚拟机第三版,整理了一些基础结构图,算是比较全的了,做一下笔记,大家一起学习. 1.Java虚拟机运行时数据区图 JVM内存结构是Java程序员必须掌握的基础. 程序计数 ...
- spring IoC容器类接口关系梳理
整理了下spring中容器类的接口,用UML画了张图(并不十分严格按照UML标准,省略了些方法).
- 关于通过Date.getTime()得到1970年01月1日0点零分问题验证
public static String getTimestamp_1970() throws Exception { java.text.SimpleDateFormat formater = ...