当前位置:网站首页>Environment setup mongodb
Environment setup mongodb
2022-06-26 16:54:00 【wangmcn】
Catalog
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 --fork
4、 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

边栏推荐
- Call the random function to generate 20 different integers and put them in the index group of institute a
- Teach you to learn dapr - 9 Observability
- No manual prior is required! HKU & Tongji & lunarai & Kuangshi proposed self supervised visual representation learning based on semantic grouping, which significantly improved the tasks of target dete
- Gui+sqlserver examination system
- Classical synchronization problem
- What is the preferential account opening policy of securities companies now? Is it safe to open an account online now?
- Scala Basics (II): variables and data types
- 经典同步问题
- Calculate the sum of the main diagonals of the array
- Find out the maximum value of each column element of NxN matrix and store it in the one-dimensional array indicated by formal parameter B in order
猜你喜欢
![[Li Kou brush question] monotone stack: 84 The largest rectangle in the histogram](/img/75/440e515c82b5613b117728ba760786.png)
[Li Kou brush question] monotone stack: 84 The largest rectangle in the histogram

Web3 decentralized storage ecological landscape

What does the inner structure of the neural network "alchemy furnace" look like? An interpretation of the thesis by the doctor of Oxford University

去中心化NFT交易协议将击败OpenSea

进军AR领域,这一次罗永浩能成吗?

Interpretation of new plug-ins | how to enhance authentication capability with forward auth

Make up the weakness - Open Source im project openim about initialization / login / friend interface document introduction
![[from database deletion to running] JDBC conclusion (finish the series in one day!! run as soon as you finish learning!)](/img/75/2fb1a4e6215e404df34849e9e4f21a.png)
[from database deletion to running] JDBC conclusion (finish the series in one day!! run as soon as you finish learning!)

5g is not flat and 6G is restarted. China leads wireless communication. What is the biggest advantage of 6G?

In a bad mood, I just write code like this
随机推荐
C language --- basic function realization of push box 01
Teach you to learn dapr - 8 binding
R329 (maix-ii-a (M2A) data summary
Teach you to learn dapr - 4 Service invocation
Call the random function to generate 20 different integers and put them in the index group of institute a
[force deduction question] two point search: 4 Find the median of two positive arrays
[从零开始学习FPGA编程-46]:视野篇 - 集成电路的发展与技术进步
108. 简易聊天室11:实现客户端群聊
Arduino uno + DS1302 simple time acquisition and serial port printing
Kubernetes essential tools: 2021
Learn about common functional interfaces
7 views on NFT market prospect
Cloud platform monitoring system based on stm32+ Huawei cloud IOT design
[from database deletion to running] JDBC conclusion (finish the series in one day!! run as soon as you finish learning!)
Teach you to learn dapr - 1 The era of net developers
数字藏品与NFT到底有何区别
Experience in hierarchical debugging of boards and cards
C语言所有知识点小结
基于Kubebuilder开发Operator(入门使用)
Decentralized NFT transaction protocol will defeat opensea