mongodb的安裝

最近一言難盡,被個外包公司坑了,唉,不多說了,還是寫博客吧。
1.mongdb安裝文檔:
https://docs.mongodb.com/manual/tutorial/install-mongodb-enterprise-on-red-hat/

2.我的機器是centos7,爲了方便所以採用yum的方式安裝。
[root@worker1 ~]# cat /etc/yum.repos.d/mangodb.repo
[mongodb-enterprise]
name=MongoDB Enterprise Repository
baseurl=https://repo.mongodb.com/yum/redhat/$releasever/mongodb-enterprise/4.2/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.2.asc

sudo yum install -y mongodb-enterprise

3.開啓服務
systemctl enable mongod && systemctl start mongod

4.檢查端口是否存在,默認端口是27017
lsof -i:27017

5.安裝完成

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章