当前位置:Gxlcms > 数据库问题 > 安装数据库

安装数据库

时间:2021-07-01 10:21:17 帮助过:3人阅读

安装数据库
  • mysql安装

Mariadb安装文档

  • MongoDB安装
  1. <code class="language-shell">vim /etc/yum.repos.d/mongodb.repo
  2. [MongoDB]
  3. name=MongoDB
  4. baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/x86_64/
  5. enabled=1
  6. gpgcheck=0
  7. yum install mongodb-org -y
  8. systemctl start mongod.service
  9. mongo --port 27017 #通过命令行登录mongo,建立用户。
  10. > use admin
  11. > db.createUser({user: ‘admin‘, pwd: ‘admin123‘,roles:[{role:‘root‘,db:‘admin‘}]})
  12. Successfully added user: {
  13. "user" : "admin",
  14. "roles" : [
  15. {
  16. "role" : "root",
  17. "db" : "admin"
  18. }
  19. ]
  20. }
  21. vim /etc/mongod.conf
  22. net:
  23. port: 27017
  24. bindIp: 0.0.0.0 # 修改,配置远程连接ip
  25. security: #添加
  26. authorization: enabled #添加权限认证配置
  27. systemctl restart mongod.service</code>

可视化管理工具下载地址

  • redis安装

安装文档

安装数据库

标签:enable   ODB   com   -o   lease   hub   role   mysq   bin   

人气教程排行