In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Linux system how to install mongodb, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
MongoDB is a distributed file storage system written by C++, which aims to provide scalable, high-performance data storage for WEB.
Download mongoDB database
Mongodb-linux-x86_64-3.0.15.tgz
Store it in the linux folder
Ftp software is dragged directly up.
Extract the folder (after unzipping, there will be one more file without a suffix, that is, an uncompressed file package)
Tar-zxvf mongodb-linux-x86_64-3.0.15.tgz
Copy to / usr/local/mongoDB
Mv mongodb-linux-x86_64-3.0.15 / usr/local/mongoDB
Create a profile
Path: / root/mongodb/mongodb-linux-x86_64-3.0.15
Create three more folders in the mongodb folder:
Mkdir data / / is used to store database data
Mkdir logs / / is used to store log files
Mkdir etc / / is used to store configuration files
Go to the logs folder to create the mongo.log file:
Touch mongo.log
Then create the mongo.conf file in the etc folder:
Touch mongo.conf
Open the mongo.conf to edit the content through the vi command:
Vi mongo.conf
After entering the above command, enter the edit mode and press I to enter it. The input content is:
/ / the path of your own installation
Dbpath=/usr/local/mongoDB/mongodb-linux-x86_64-3.0.15/data
/ / the path of your own installation
Logpath=/usr/local/mongoDB/mongodb-linux-x86_64-3.0.15/logs/mongo.log logappend=true
Journal=true
Quiet=true
Port=27017 / / Port number
Configure environment variables
Vi / etc/profile
Export MONGODB_HOME=/usr/local/mongoDB/mongodb-linux-x86_64-3.0.15
Export PATH=MONGODB_HOME/bin
Source / etc/profile
As shown in the figure:
Start mongoDB
Bin directory:
/ usr/local/mongoDB/mongodb-linux-x86_64-3.0.15/bin
Method 1:. / mongod-f / usr/local/mongoDB/mongodb-linux-x86_64-3.0.15/etc/mongo.conf-fork
Method 2: mongod-f / usr/local/mongoDB/mongodb-linux-x86_64-3.0.15/etc/mongo.conf-fork
As shown in the figure:
Visit mongoDB
/ usr/local/mongoDB/mongodb-linux-x86_64-3.0.15/bin/mongo
As shown in the figure:
What are the versions of Linux? the versions of Linux are Deepin, UbuntuKylin, Manjaro, LinuxMint, Ubuntu and so on. Among them, Deepin is one of the best-developed Linux distributions in China; UbuntuKylin is a derivative release based on Ubuntu; Manjaro is a Linux release based on Arch; LinuxMint's default Cinnamon desktop is similar to Windows XP's easy-to-use; Ubuntu is the Linux operating system based on desktop applications.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.