MongoDB 버전별 설치 방법
#sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
14.04 다른 버전은 매뉴얼에서 참조
#echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
#sudo apt-get update
#sudo apt-get install -y mongodb-org
이것는 아무 변화가 없네...
#sudo apt-get install -y mongodb-org=4.0.0 mongodb-org-server=4.0.0 mongodb-org-shell=4.0.0 mongodb-org-mongos=4.0.0 mongodb-org-tools=4.0.0
echo "mongodb-org hold" | sudo dpkg --set-selections
echo "mongodb-org-server hold" | sudo dpkg --set-selections
echo "mongodb-org-shell hold" | sudo dpkg --set-selections
echo "mongodb-org-mongos hold" | sudo dpkg --set-selections
echo "mongodb-org-tools hold" | sudo dpkg --set-selections
#sudo apt-get install libcurl3 openssl
명령어
sudo service mongod start
sudo service mongod stop
sudo service mongod restart
접속시작
# mongo --host 127.0.0.1:27017
MongoDB shell version v4.0.0
connecting to: mongodb://127.0.0.1:27017/
MongoDB server version: 4.0.0
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
Server has startup warnings:
2018-07-09T19:24:22.140+0900 I STORAGE [initandlisten]
2018-07-09T19:24:22.140+0900 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2018-07-09T19:24:22.140+0900 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem
2018-07-09T19:24:23.558+0900 I CONTROL [initandlisten]
2018-07-09T19:24:23.558+0900 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2018-07-09T19:24:23.558+0900 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2018-07-09T19:24:23.558+0900 I CONTROL [initandlisten]
2018-07-09T19:24:23.558+0900 I CONTROL [initandlisten]
2018-07-09T19:24:23.558+0900 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2018-07-09T19:24:23.558+0900 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2018-07-09T19:24:23.558+0900 I CONTROL [initandlisten]
2018-07-09T19:24:23.558+0900 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2018-07-09T19:24:23.558+0900 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2018-07-09T19:24:23.558+0900 I CONTROL [initandlisten]
---
Enable MongoDB's free cloud-based monitoring service to collect and display
metrics about your deployment (disk utilization, CPU, operation statistics,
etc).
The monitoring data will be available on a MongoDB website with a unique
URL created for you. Anyone you share the URL with will also be able to
view this page. MongoDB may use this information to make product
improvements and to suggest MongoDB products and deployment options to you.
To enable free monitoring, run the following command:
db.enableFreeMonitoring()
---
> db
test
Install MongoDB Community Edition on Ubuntu
14.04 다른 버전은 매뉴얼에서 참조
#echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
#sudo apt-get update
#sudo apt-get install -y mongodb-org
이것는 아무 변화가 없네...
#sudo apt-get install -y mongodb-org=4.0.0 mongodb-org-server=4.0.0 mongodb-org-shell=4.0.0 mongodb-org-mongos=4.0.0 mongodb-org-tools=4.0.0
echo "mongodb-org hold" | sudo dpkg --set-selections
echo "mongodb-org-server hold" | sudo dpkg --set-selections
echo "mongodb-org-shell hold" | sudo dpkg --set-selections
echo "mongodb-org-mongos hold" | sudo dpkg --set-selections
echo "mongodb-org-tools hold" | sudo dpkg --set-selections
#sudo apt-get install libcurl3 openssl
명령어
sudo service mongod start
sudo service mongod stop
sudo service mongod restart
접속시작
# mongo --host 127.0.0.1:27017
MongoDB shell version v4.0.0
connecting to: mongodb://127.0.0.1:27017/
MongoDB server version: 4.0.0
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
Server has startup warnings:
2018-07-09T19:24:22.140+0900 I STORAGE [initandlisten]
2018-07-09T19:24:22.140+0900 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2018-07-09T19:24:22.140+0900 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem
2018-07-09T19:24:23.558+0900 I CONTROL [initandlisten]
2018-07-09T19:24:23.558+0900 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2018-07-09T19:24:23.558+0900 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2018-07-09T19:24:23.558+0900 I CONTROL [initandlisten]
2018-07-09T19:24:23.558+0900 I CONTROL [initandlisten]
2018-07-09T19:24:23.558+0900 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2018-07-09T19:24:23.558+0900 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2018-07-09T19:24:23.558+0900 I CONTROL [initandlisten]
2018-07-09T19:24:23.558+0900 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2018-07-09T19:24:23.558+0900 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2018-07-09T19:24:23.558+0900 I CONTROL [initandlisten]
---
Enable MongoDB's free cloud-based monitoring service to collect and display
metrics about your deployment (disk utilization, CPU, operation statistics,
etc).
The monitoring data will be available on a MongoDB website with a unique
URL created for you. Anyone you share the URL with will also be able to
view this page. MongoDB may use this information to make product
improvements and to suggest MongoDB products and deployment options to you.
To enable free monitoring, run the following command:
db.enableFreeMonitoring()
---
> db
test
댓글
댓글 쓰기