I. Overview
Recently to install MongoDB on the new CentOS system, a certain degree of results directly from the MONGO official website directly obtained 3.2 version of the download link, the results found in the download of poor speed. Forced helpless, can only find the domestic mirror download. Switch to the domestic installation source, the use of Yum installation found that the installation of the MongoDB version incredibly is 2.8. After a study, post the following operating methods to provide for the future operation.
Second, the operation process
1, first update the package bar, more harmless.
sudo yum -y update
2. Create a Mongodb-org.repo file in/ETC/YUM.REPOS.D
sudo touch /etc/yum.repos.d/mongodb-org.repo
3. Edit Mongodb-org.repo File
sudo vi /etc/yum.repos.d/mongodb-org.repo
4, enter the following content to save exit
[Mongodb-org]
Name=mongodb Repository
baseurl=http://mirrors.aliyun.com/mongodb/yum/redhat/7server/mongodb-org/3.2/x86_64 /
gpgcheck=0
enabled=1
5. Installation MongoDB
sudo yum install -y mongodb-org
6, Start MongoDB
sudo service mongod start
7. Set Boot up
sudo chkconfig mongod on
8, open MongoDB
sudo /bin/mongo
9. Configure Remote Access
Edit/etc/mongod.conf
Annotation bindip:127.0.0.1
Rebootsudo service mongod restart
Third, PostScript
As long as the speed is not very slow situation can download the official source code after compiling the installation, or refer to the official version of the installation of different versions of the tutorial.