当前位置:网站首页>Environment setup mongodb
Environment setup mongodb
2022-07-26 17:23:00 【wangmcn】
Environment building -MongoDB
Catalog
- 1、 brief introduction
- 2、 install
- 3、 Start and stop
This article focuses on CentOS Installation in environment MongoDB.
1、 brief introduction
MongoDB Is a database based on distributed file storage . from C++ Language writing . For the purpose of Web Applications provide scalable, high-performance data storage solutions .
MongoDB Is a product between relational and non-relational databases , Non-relational databases are the most versatile , Most like a relational database . The data structure it supports is very loose , Is similar to json Of bson Format , Therefore, more complex data types can be stored . The biggest feature is that it supports a very powerful query language , Its syntax is somewhat similar to that of an object-oriented query language , You can almost implement most of the functionality of a relational database single table query , It also supports indexing data .
Official website address :
https://www.mongodb.com/
2、 install
1、 Install dependency packages
sudo yum install libcurl openssl2、 download
Official website download address ( Community Edition ):
https://www.mongodb.com/try/download/community
Select the appropriate version 、 platform 、 package , Download or copy the download link to download .
for example : download mongodb-linux-x86_64-rhel70-5.0.5.tgz
And upload the downloaded file to the server
Or enter the command directly , Download on the server
wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel70-5.0.5.tgz3、 decompression
tar -zxvf mongodb-linux-x86_64-rhel70-5.0.5.tgzDecompress and generate mongodb-linux-x86_64-rhel70-5.0.5 Catalog
4、 Move the unzipped package to the specified directory (/usr/local/), And named it mongodb5
mv mongodb-linux-x86_64-rhel70-5.0.5 /usr/local/mongodb55、 Set the environment variable
(1) Modify the configuration file
vim /etc/profile(2) Fill in the last line (mongodb The file path shall be subject to the actual )
export PATH=$PATH:/usr/local/mongodb5/bin(3) Make configuration effective
source /etc/profile3、 Start and stop
1、 Create a data storage directory (/var/lib/mongodb), And authorize
sudo mkdir -p /var/lib/mongodb
sudo chown 755 /var/lib/mongodb2、 Create a directory of log files (/var/log/mongodb), And authorize
sudo mkdir -p /var/log/mongodb
sudo chown 755 /var/log/mongodb3、 Start the service
mongod --dbpath /var/lib/mongodb --logpath/var/log/mongodb/mongod.log --fork4、 Out of Service
Mode one :
mongod --dbpath /var/lib/mongodb --logpath/var/log/mongodb/mongod.log --shutdownMode two :
Input mongo, Get into mongo Under orders
Enter the following commands in sequence
use admin
db.shutdownServer()
exit边栏推荐
- PyQt5快速开发与实战 3.4 信号与槽关联
- 【飞控开发基础教程3】疯壳·开源编队无人机-串口(基础收发)
- 注意 公安部发出旅游客运交通安全预警
- How to connect tdengine with idea database tool?
- Execution process of select statement in MySQL
- The latest interface of Taobao / tmall keyword search
- Concepts and differences of DQL, DML, DDL and DCL
- Anaconda download and Spyder error reporting solution
- How does win11 reinstall the system?
- [basic course of flight control development 1] crazy shell · open source formation UAV GPIO (LED flight information light and signal light control)
猜你喜欢

带你一分钟了解对称加密和非对称加密

Crazy God redis notes 02
![[flight control development basic tutorial 3] crazy shell · open source formation UAV - serial port (basic transceiver)](/img/25/160b827d74f7902ec0d6be4683b1e5.png)
[flight control development basic tutorial 3] crazy shell · open source formation UAV - serial port (basic transceiver)

PyQt5快速开发与实战 3.2 布局管理入门 and 3.3 Qt Designer实战应用

After Oracle creates a table partition, the partition is not given during the query, but the value specified for the partition field will be automatically queried according to the partition?

FIR filter design

Win11系统如何一键进行重装?

Are CRM and ERP the same thing? What's the difference?

Speaker recruitment | AI time recruit icml/ijcai 2022 as a Chinese speaker!!!

Review the past and know the new MySQL isolation level
随机推荐
Detailed explanation of openwrt's feeds.conf.default
UPC 2022 summer personal training game 07 (part)
E-week finance | postal Huiwanjia bank opened; Wechat public call to stop four types of financial marketing publicity
“青出于蓝胜于蓝”,为何藏宝计划(TPC)是持币生息最后的一朵白莲花
[visdrone data set] yolov7 training visdrone data set and results
[daily3] vgg16 learning
About the adjustment of the game background, reading this article is enough
Chapter 1 Overview - Section 1 - 1.3 composition of the Internet
浅谈云原生边缘计算框架演进
The principle of reliable transmission in TCP protocol
Analysis of the advantages of eolink and JMeter interface testing
中金证券vip账户找谁开安全啊?
What does it mean to lock financial products regularly? Can financial products be redeemed during the lock-in period?
Week 4 Recurrent Neural Networks
使用 replace-regexp 在行首添加序号
Stop using xshell and try this more modern terminal connection tool
使用 Dired 快速移动文件
办公软件常用快捷键大全
Stop supporting Huawei! Signing 640billion 5g orders in Germany and 270billion 5g orders in the Middle East is pure nonsense!
Establishment of Eureka registration center Eureka server