Install MongoDB on Ubuntu 12.04
来源:互联网 发布:网络大电影为何成本低 编辑:程序博客网 时间:2024/05/22 02:00
from:https://www.digitalocean.com/community/articles/how-to-install-mongodb-on-ubuntu-12-04
Install MongoDB on Ubuntu 12.04
MongoDB is a document database used commonly in modern web applications. This tutorial should help you setup a virtual private server to use as a dedicated MongoDB server for a production application environment.
Step 1 -- Create a Droplet
This one's easy. Once you're done, go ahead and `ssh` in.
N.B. :: It is recommended that you configure `ssh` and `sudo` like this
Step 2 -- Create the Install Script
The MongoDB install process is simple enough to be completed with a Bash script. Copy the following into a new file named `mongo_install.bash` in your home directory:
apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10echo "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" | tee -a /etc/apt/sources.list.d/10gen.listapt-get -y updateapt-get -y install mongodb-10gen
Here's an explanation of each line in the script:
- The `apt-key` call registers the public key of the custom 10gen MongoDB aptitude repository
- A custom 10gen repository list file is created containing the location of the MongoDB binaries
- Aptitude is updated so that new packages can be registered locally on the Droplet
- Aptitude is told to install MongoDB
TIP: At any time, to change to your home directory, simply execute `cd`
Step 3 -- Run the Install Script
Execute the following from your home directory:
$ sudo bash ./mongo_install.bash
If everything is successful, you should see the output contain a PID of the newly started MongoDB process:
mongodb start/running, process 2368
Step 4 -- Check It Out
By default with this install method, MongoDB should start automatically when your Droplet is booted. This means that if you need to reboot your Droplet, MongoDB will start right back up.
To start learning about the running `mongod` process, run the following command:
$ ps aux | grep mongo
One line of the output should look like the following:
mongodb 569 0.4 6.4 627676 15936 ? Ssl 22:54 0:02 /usr/bin/mongod --config /etc/mongodb.conf
We can see the...
- User: `mongodb`
- PID: `569`
- Command: `/usr/bin/mongod --config /etc/mongodb.conf`
- Config File: `/etc/mongodb.conf`
Resources
- http://docs.mongodb.org/manual/tutorial/install-mongodb-on-debian-or-ubuntu-linux/
- https://www.digitalocean.com/community/articles/introduction-to-ssh-on-ubuntu
- Install MongoDB on Ubuntu 12.04
- Install MongoDB on Ubuntu
- Install MongoDB on Ubuntu
- Install MongoDB on ubuntu 12.04 (Precise) Server
- How to install mongoDB on Ubuntu
- Install MongoDB Community Edition on Ubuntu
- [MongoDB--Unbuntu installation]---How to Install MongoDB on Ubuntu 16.04
- install jdk on ubuntu 12.04
- install SSH on ubuntu 12.04
- Install CMake on Ubuntu 12.04
- install ffmpeg on ubuntu 12.04
- install jdk on ubuntu 12.04
- install mongodb on windows
- Install MongoDB on FC6
- Install MongoDB on Windows
- Install MongoDB on Linux
- Ubuntu_ install JDK on Ubuntu 12.04
- Install Java6 JDK on Ubuntu 12.04
- 简单理解extern "C"
- android的AsyncTask使用方法-多线程下载
- 从一个头文件想到
- 编译本地服务器Release版本
- discuz 后台词语过滤帮你轻松实现附件自动隐藏
- Install MongoDB on Ubuntu 12.04
- 黑帽seo之隐藏文字
- Singleton——单例模式
- 程序员:孤独的人是可耻的!
- 函数式编程扫盲篇 (都是精华)
- Linux kernel测试初探
- linux 测试工具
- 洗牌!!!随机数序列~!
- 分布式文件系统测试方法与测试工具