Created
October 18, 2014 07:11
-
-
Save ifels/25819cce7c15709177e1 to your computer and use it in GitHub Desktop.
centos6.5_mongodb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
第一步,在/etc/yum.repos.d/目录下创建一个源配置文件mongodb.repo: | |
cd /etc/yum.repos.d/ | |
vim mongodb.repo | |
填写如下内容: | |
[mongodb] | |
name=MongoDB Repository | |
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/ | |
gpgcheck=0 | |
enabled=1 | |
保存,则会产生一个/etc/yum.repos.d/mongodb.repo文件。 | |
下面直接执行如下指令即可自动安装好mongodb: | |
sudo yum install -y mongodb-org | |
命令: | |
sudo service mongod start | |
sudo service mongod stop | |
sudo service mongod restart | |
配置: | |
/etc/mongod.conf | |
默认端口:27017 | |
开机启动: | |
sudo chkconfig mongod on | |
参考: | |
http://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat-centos-or-fedora-linux/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment