时间:2021-07-01 10:21:17 帮助过:8人阅读
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 |
echo ‘[mongodb-org-3.2]
name=MongoDB Repository
baseurl=https: //repo .mongodb.org /yum/redhat/ $releasever /mongodb-org/3 .2 /x86_64/
gpgcheck=1
enabled=1
gpgkey=https: //www .mongodb.org /static/pgp/server-3 .2.asc‘ > /etc/yum .repos.d /mongodb-org-3 .2.repo ;
#安装客户端
yum install mongodb -y
#服务器
yum install mongodb-server -y
#创建数据库目录
mkdir /data/db -p
#启动服务器方式1. 以web方式启动 执行下面这句后访问 http://网址:28017 注意 端口是27107 web是28107 +1000的方式是web port是服务的端口
#mongod --port 27017 --rest
#启动服务器方式2
#server mongod start
#完成
|
mongo
MongoDB shell version: 2.4.14
connecting to: test
Server has startup warnings:
Tue May 2 09:54:15.478 [initandlisten]
Tue May 2 09:54:15.478 [initandlisten] ** NOTE: This is a 32 bit MongoDB binary.
Tue May 2 09:54:15.478 [initandlisten] ** 32 bit builds are limited to less than 2GB of data (or less with --journal).
Tue May 2 09:54:15.478 [initandlisten] ** See http://dochub.mongodb.org/core/32bit
Tue May 2 09:54:15.478 [initandlisten]
> db
test
>
MongoDb安装--yum安装
标签:repos name version mongodb安装 文本 eve and sage test