当前位置:网站首页>Download and install mongodb
Download and install mongodb
2022-04-23 16:04:00 【aserendipper】
One 、 download MongoDB
1、 open MongoDB Download the homepage from the official website https://www.mongodb.com/try/download, find community Community Edition , Then select the corresponding version to download .
Version edition , Choose to have current Literally , This is the latest stable version
OS It's the system , Choose here RHEL 7.0 , Corresponding Centos Namely 7.x
Package Is the format of the package , Choose here TGZ, It's a compression pack

Two 、 install MongoDB
1、 Upload the compressed package to /usr/local Directory and extract
tar -zxvf mongodb-linux-x86_64-rhel70-4.2.8.tgz
2、 Rename the folder to mongodb
mv mongodb-linux-x86_64-rhel70-4.2.8/ mongodb/
3、 Get into mongodb Under the folder , Create a folder for storing data and logs
mkdir data # For storage mongodb Database data
mkdir logs # For storage mongodb Log generated by running
4、 create profile
vim mongodb.conf
# Log file location
logpath=/usr/local/mongodb/logs/mongodb.log
# Write log as append
logappend=true
# Whether to run as daemons
fork=true
# port 27017
port=27017
# Database file location
dbpath=/software/mongodb/data
# Which one is allowed ip The connection of ,0.0.0.0 Represents any ip All can be connected
bind_ip=0.0.0.0
# Whether it operates in the way of safety certification , The default is the non secure way of not authenticating , You don't need to start the installation at the beginning , After setting the password, restart
#auth=true
The directory structure at this time is :

5、 start-up mongodb
bin/mongod --config mongodb.conf
After successful startup :

6、 Connect mongodb And test the
Get into bin Under the table of contents , perform
./mongo
show dbs
You can see that there are three default databases

3、 ... and 、 Reference material
1、https://blog.csdn.net/americaMan/article/details/105755863
版权声明
本文为[aserendipper]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231557111244.html
边栏推荐
- s16. One click installation of containerd script based on image warehouse
- What is the experience of using prophet, an open source research tool?
- 一文掌握vscode远程gdb调试
- What is cloud migration? The four modes of cloud migration are?
- Master vscode remote GDB debugging
- PS为图片添加纹理
- MetaLife与ESTV建立战略合作伙伴关系并任命其首席执行官Eric Yoon为顾问
- MySQL - MySQL查询语句的执行过程
- Config组件学习笔记
- 299. 猜数字游戏
猜你喜欢
MetaLife与ESTV建立战略合作伙伴关系并任命其首席执行官Eric Yoon为顾问
API IX JWT auth plug-in has an error. Risk announcement of information disclosure in response (cve-2022-29266)
[key points of final review of modern electronic assembly]
Vision of building interstellar computing network
运维流程有多重要,听说一年能省下200万?
C language --- string + memory function
Day (9) of picking up matlab
matplotlib教程05---操作图像
Ice -- source code analysis
Day (5) of picking up matlab
随机推荐
Day (9) of picking up matlab
Countdown 1 day ~ 2022 online conference of cloud disaster tolerance products is about to begin
linux上启动oracle服务
Install redis and deploy redis high availability cluster
leetcode-396 旋转函数
实现缺省页面
leetcode-374 猜数字大小
Start Oracle service on Linux
Win11/10家庭版禁用Edge的inprivate浏览功能
[self entertainment] construction notes week 2
PS为图片添加纹理
Named in pytoch_ parameters、named_ children、named_ Modules function
Matplotlib tutorial 05 --- operating images
【开源工具分享】单片机调试助手(示波/改值/日志) - LinkScope
One brush 312 - simple repetition set - Sword finger offer 03 Duplicate number in array (E)
Review 2021: how to help customers clear the obstacles in the last mile of going to the cloud?
Application case of GPS Beidou high precision satellite time synchronization system
捡起MATLAB的第(8)天
多线程原理和常用方法以及Thread和Runnable的区别
The length of the last word of the string