- Web Development with MongoDB and Node(Third Edition)
- Bruno Joseph D'mello Mithun Satheesh Jason Krol
- 267字
- 2021-07-08 10:32:41
Linux installation instructions
Once again, we will face a slightly more challenging installation process with Linux versus Windows or Mac. The official website http://docs.MongoDB.org/manual/administration/install-on-linux/ has great instructions on how to install MongoDB on a number of different Linux distributions.
We will continue to use Ubuntu as our flavor of choice and use the APT package manager for the installation:
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv
7F0CEB10 $ echo 'deb http://downloads-distro.MongoDB.org/repo/ubuntu-upstart
dist 10gen' | sudo tee /etc/apt/sources.list.d/MongoDB.list $ sudo apt-get update $ sudo apt-get install MongoDB-10gen
Once these steps are completed, MongoDB should be installed and ready to run on your system. Execute the following command in the terminal to be sure. This gets the MongoDB daemon up and running, listening for connections:
$ mongod
2017-08-04T10:10:47.853+0530 I NETWORK [thread1] waiting for
connections on port 27017
Success! Your MongoDB server is up and running. You can type Ctrl-C to cancel and shut down the server.
As you are performing local development on your development machine and not a production server, you don't need the MongoDB server to always be up and running. This will be an unnecessary strain on your machine for the majority of the time you're not developing against the server. Because of this, throughout the remainder of this book, it will always be a requirement that you manually launch the server every time you launch code that expects to connect to a MongoDB server. If you want, you can certainly configure MongoDB to run locally as a service and always be up, but the instructions to do so are beyond the scope of this chapter.
推薦閱讀
- Web程序設計及應用
- 算法訓練營:入門篇(全彩版)
- 深入淺出Prometheus:原理、應用、源碼與拓展詳解
- Learning Python Design Patterns(Second Edition)
- 征服RIA
- 單片機C語言程序設計實訓100例
- HTML5從入門到精通(第4版)
- 小程序,巧應用:微信小程序開發實戰(第2版)
- 軟件供應鏈安全:源代碼缺陷實例剖析
- Statistical Application Development with R and Python(Second Edition)
- 零基礎學C語言第2版
- Arduino可穿戴設備開發
- QPanda量子計算編程
- 從零開始學Selenium自動化測試:基于Python:視頻教學版
- Python大規模機器學習