MongoDb安裝--yum安裝

來源:互聯網
上載者:User

標籤:repos   name   version   mongodb安裝   文本   eve   and   sage   test   

本帖最後由 草包 於 2017-5-2 09:57 編輯

[Shell] 純文字查看 複製代碼?
0102030405060708091011121314151617 echo ‘[mongodb-org-3.2]name=MongoDB Repositorybaseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/gpgcheck=1enabled=1gpgkey=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
db
輸入test 如下
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安裝

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.