其实自己用惯的是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. 当git上只做文件大小写重命名的修改时,如何躲坑

    一. 提交时 假设修改ABC.java为Abc.java. 1.1 如果使用git命令进行仅涉及大小写的重命名 1.1.1 设置git库为大小写敏感(不建议) $ git config core.ig ...

  2. PHP Ajax 跨域问题解决方案

    本文通过设置Access-Control-Allow-Origin来实现跨域. 例如:客户端的域名是client.0751.tv,而请求的域名是server.0751.tv. 如果直接使用ajax访问 ...

  3. git取消跟踪(unversion)

    有时候我们会git add了一些不想跟踪的文件,通过下面的命令可以在没提交前从index里删掉跟踪记录(保留本地文件) git rm –cached 文件名

  4. Fedora 21下lingo14配置

    Install lingo14 during Fedora 21 The first step:Download lingo14Download address:http://www.lindo.co ...

  5. java中有界队列的饱和策略(reject policy)

    文章目录 AbortPolicy DiscardPolicy DiscardOldestPolicy CallerRunsPolicy 使用Semaphore java中有界队列的饱和策略(rejec ...

  6. 7.哪些工具可以帮助查找bug或进行静态分析

    哪些工具可以帮助查找bug或进行静态分析? PyChecker is a static analysis tool that detects the bugs in Python source cod ...

  7. SpringBoot内置生命周期事件详解 SpringBoot源码(十)

    SpringBoot中文注释项目Github地址: https://github.com/yuanmabiji/spring-boot-2.1.0.RELEASE 本篇接 SpringBoot事件监听 ...

  8. 安装并使用pyecharts库

    在cmd命令行中输入安装命令, pyecharts库的安装命令如下: pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pyecharts ...

  9. 配置IIS5.5/6.0 支持 Silverlight

    在安装完Silverlight1.1 Alpha后,要使自己的IIS服务器支持Silverlight的浏览还需要配置一下IIS网站的 Http头->MIME映射添加内容如下:扩展名        ...

  10. JQuery学习(一)

    本文是学习廖老师的Javascript全栈教程后的一些笔记. 使用jQuery: 方法一:下载jQuery库,并在html页面中引入,方式如下: 1 <html> 2 <head&g ...