其实自己用惯的是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的更多相关文章

  1. 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 ...

  2. centos7 Failed to start firewalld.service: Unit is masked.

    centos7 启动防火墙失败:Failed to start firewalld.service: Unit is masked.   ---- 刚yum安装了iptables 解决: 执行”sys ...

  3. docker报错:Failed to restart docker.service: Unit not found.

    前言:我之前安装好docker了,但是关机重启后,发现docker就没了 报错:Failed to restart docker.service: Unit not found.   解决方法: 1. ...

  4. [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 ...

  5. Failed to stop iptables.service: Unit iptables.service not loaded.解决方法

    CentOS7中执行 service iptables start/stop 会报错Failed to start iptables.service: Unit iptables.service fa ...

  6. mysqld服务启动失败, Failed to restart mysqld.service: Unit not found.

    -bash-4.2# service mysqld restart Redirecting to /bin/systemctl restart mysqld.serviceFailed to rest ...

  7. 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 ...

  8. Failed to start metasploit.service: Unit metasploit.service not found的解释

    不多说,直接上干货! root@kali:~# service metasploit start Failed to start metasploit.service: Unit metasploit ...

  9. CentOS 7出现Failed to start firewalld.service: Unit is masked的解决办法和firewalld 防火墙开关

    说明:刚刚使用systemctl start firewalld命令开启防火墙的时候,却开不成功,出现Failed to start firewalld.service: Unit is masked ...

随机推荐

  1. Spring Cloud 系列之 Sleuth 链路追踪(二)

    本篇文章为系列文章,未读第一集的同学请猛戳这里:Spring Cloud 系列之 Sleuth 链路追踪(一) 本篇文章讲解 Sleuth 基于 Zipkin 存储链路追踪数据至 MySQL,Elas ...

  2. h5前端animate等js特效问题汇总

    1.jq中的animate不要重复大量使用,会导致内存溢出或泄漏,很直观的现象就是手机发热太严重: 2.input 的button类型的去掉默认样式并换颜色: -webkit-appearance:n ...

  3. 2019-2020-1 20199310《Linux内核原理与分析》第三周作业

    1.问题描述 计算机的3大法宝是存储程序计算机,函数调用堆栈和中断机制,存储程序计算机已经在上一个博客中进行具体描述,本文将在剩下两方面出发对操作系统是如何工作的进行学习和探讨. 2.解决过程 2.1 ...

  4. [Qt] 文本文件读写, 摘自官方文档

    Reading Files Directly The following example reads a text file line by line: QFile file("in.txt ...

  5. lodctr /R 失败的情况

    I've resolved with the following steps: PS C:\Windows\system32> cmd Microsoft Windows [Version 6. ...

  6. DDOS攻击攻击种类和原理

    DoS攻击.DDoS攻击和DRDoS攻击相信大家已经早有耳闻了吧!DoS是Denial of Service的简写,就是拒绝服务,而DDoS就是Distributed Denial of Servic ...

  7. java中Locks的使用

    文章目录 Lock和Synchronized Block的区别 Lock interface ReentrantLock ReentrantReadWriteLock StampedLock Cond ...

  8. java 之 jsp详解

    jsp所需环境 eclipse JSP/Servlet 环境 jsp处理 以下步骤表明了 Web 服务器是如何使用JSP来创建网页的: 就像其他普通的网页一样,您的浏览器发送一个 HTTP 请求给服务 ...

  9. 7.JUC线程高级-生产消费问题&虚假唤醒

    描述 生产消费问题在java多线程的学习中是经常遇到的问题 ,多个线程共享通一个资源的时候会出现各种多线程中经常出现的各种问题. 实例说明 三个类:售货员Clerk,工厂Factory,消费者Cons ...

  10. 云时代 • 新契机:2017届中国SaaS产业大会圆满落幕

    2017年5-6日,由拓普会展携手中国云体系产业创新战略联盟主办,江苏省企业信息化协会,浙江省企业信息化促进会,广东省首席信息官协会,CIO时代学院,IDC点评网协办以及上海市网购商会,中国信息化推进 ...