这篇文章将为大家详细讲解有关Fedora中如何安装MongoDB服务器,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。
$ sudo cat > /etc/yum.repos.d/mongodb.repo >>EOF[mongodb-upstream]name=MongoDB Upstream Repositorybaseurl=https://repo.mongodb.org/yum/redhat/8Server/mongodb-org/4.2/x86_64/gpgcheck=1enabled=1gpgkey=https://www.mongodb.org/static/pgp/server-4.2.ascEOF
$ sudo dnf install mongodb-org......Installed: mongodb-org-4.2.3-1.el8.x86_64 mongodb-org-mongos-4.2.3-1.el8.x86_64 mongodb-org-server-4.2.3-1.el8.x86_64 mongodb-org-shell-4.2.3-1.el8.x86_64 mongodb-org-tools-4.2.3-1.el8.x86_64 Complete!
$ sudo systemctl status mongod● mongod.service - MongoDB Database Server Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled; vendor preset: disabled) Active: active (running) since Sat 2020-02-08 12:33:45 EST; 2s ago Docs: https://docs.mongodb.org/manual Process: 15768 ExecStartPre=/usr/bin/mkdir -p /var/run/mongodb (code=exited, status=0/SUCCESS) Process: 15769 ExecStartPre=/usr/bin/chown mongod:mongod /var/run/mongodb (code=exited, status=0/SUCCESS) Process: 15770 ExecStartPre=/usr/bin/chmod 0755 /var/run/mongodb (code=exited, status=0/SUCCESS) Process: 15771 ExecStart=/usr/bin/mongod $OPTIONS (code=exited, status=0/SUCCESS) Main PID: 15773 (mongod) Memory: 70.4M CPU: 611ms CGroup: /system.slice/mongod.service
$ mongoMongoDB shell version v4.2.3connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodbImplicit session: session { "id" : UUID("20b6e61f-c7cc-4e9b-a25e-5e306d60482f") }MongoDB server version: 4.2.3Welcome to the MongoDB shell.For interactive help, type "help".For more comprehensive documentation, see http://docs.mongodb.org/---
关于Fedora中如何安装MongoDB服务器就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。