在Ubuntu中安装MongoDB
MongoDB作为一种文档型的NoSQL数据库,使用起来非常灵活,回避了关系型数据库前期的复杂数据库设计。MongoDB存储基于JSON格式,同
MongoDB部署实验系列文章,MongoDB做为NoSQL数据库,最近几年持续升温,越来越多的企业都开始尝试用MongoDB代替原有Database做一些事情。MongoDB也在集群,分片,复制上也有相当不错的的表现。我通过将做各种MongoDB的部署实验进行介绍。
前言
MongoDB作为一种文档型的NoSQL数据库,使用起来非常灵活,回避了关系型数据库前期的复杂数据库设计。MongoDB存储基于JSON格式,同时用Javascript做为数据库操作语言,给了使用者无限想象的空间,可以通过编程在MongoDB服务器中解决非常复杂的条件查询的问题。
目录
1 MongoDB在Windows中安装在Windows系统上安装MongoDB数据库是件非常简单的事情,下载可执行安装文件(exe),双击安装即可。下载地址:
本文使用的Linux是Ubuntu 12.04.2 LTS 64bit的系统,安装MongoDB数据库软件包可以通过apt-get实现。但我们修要安装官方提供MongoDB软件源。
修改apt的source.list文件,增加10gen的设置。
# 下载密钥文件 ~ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.kVFab9XYw0 --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 gpg: 下载密钥‘7F0CEB10’,从 hkp 服务器 keyserver.ubuntu.com gpg: 密钥 7F0CEB10:公钥“Richard Kreuter在Linux Ubuntu中安装MongoDB数据库
#安装MongoDB服务器端 ~ sudo apt-get install mongodb-10gen安装完成后,MongoDB服务器会自动启动,我们检查MongoDB服务器程序
# 检查MongoDB服务器系统进程 ~ ps -aux|grep mongo mongodb 6870 3.7 0.4 349208 39740 ? Ssl 10:27 2:23 /usr/bin/mongod --config /etc/mongodb.conf # 通过启动命令检查MongoDB服务器状态 ~ netstat -nlt|grep 27017 tcp 0 0 0.0.0.0:27017 0.0.0.0:* LISTEN # 通过启动命令检查MongoDB服务器状态 ~ sudo /etc/init.d/mongodb status Rather than invoking init scripts through /etc/init.d, use the service(8) utility, e.g. service mongodb status Since the script you are attempting to invoke has been converted to an Upstart job, you may also use the status(8) utility, e.g. status mongodb mongodb start/running, process 6870 # 通过系统服务检查MongoDB服务器状态 ~ sudo service mongodb status mongodb start/running, process 6870通过web的控制台,查看MongoDB服务器的状态。在浏览器输入 :28017 ,,就可以打开通过web的控制台了。
安装MongoDB服务器,会自动地一起安装MongoDB命令行客户端程序。
在本机输入mongo命令就可以启动,客户端程序访问MongoDB服务器。
~ mongo MongoDB shell version: 2.4.9 connecting to: test Welcome to the MongoDB shell. For interactive help, type "help". For more comprehensive documentation, see Questions? Try the support group # 查看命令行帮助 > help db.help() help on db methods db.mycoll.help() help on collection methods sh.help() sharding helpers rs.help() replica set helpers help admin administrative help help connect connecting to a db help help keys key shortcuts help misc misc things to know help mr mapreduce show dbs show database names show collections show collections in current database show users show users in current database show profile show most recent system.profile entries with time >= 1ms show logs show the accessible logger names show log [name] prints out the last segment of log in memory, 'global' is default useMongoDB服务器,默认情况下是允许外部访问的。这样单节的MongoDB,我们已经成功地安装在Linux Ubuntu系统中。
MongoDB 的详细介绍:请点这里
MongoDB 的下载地址:请点这里
相关阅读:
MongoDB备份与恢复
CentOS编译安装MongoDB
CentOS 编译安装 MongoDB与mongoDB的php扩展
CentOS 6 使用 yum 安装MongoDB及服务器端配置
Ubuntu 13.04下安装MongoDB2.4.3
如何在MongoDB中建立新数据库和集合
MongoDB入门必读(概念与实战并重)
《MongoDB 权威指南》(MongoDB: The Definitive Guide)英文文字版[PDF]

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



DDREASE is a tool for recovering data from file or block devices such as hard drives, SSDs, RAM disks, CDs, DVDs and USB storage devices. It copies data from one block device to another, leaving corrupted data blocks behind and moving only good data blocks. ddreasue is a powerful recovery tool that is fully automated as it does not require any interference during recovery operations. Additionally, thanks to the ddasue map file, it can be stopped and resumed at any time. Other key features of DDREASE are as follows: It does not overwrite recovered data but fills the gaps in case of iterative recovery. However, it can be truncated if the tool is instructed to do so explicitly. Recover data from multiple files or blocks to a single

0.What does this article do? We propose DepthFM: a versatile and fast state-of-the-art generative monocular depth estimation model. In addition to traditional depth estimation tasks, DepthFM also demonstrates state-of-the-art capabilities in downstream tasks such as depth inpainting. DepthFM is efficient and can synthesize depth maps within a few inference steps. Let’s read about this work together ~ 1. Paper information title: DepthFM: FastMonocularDepthEstimationwithFlowMatching Author: MingGui, JohannesS.Fischer, UlrichPrestel, PingchuanMa, Dmytr

If you need to know how to use filtering with multiple criteria in Excel, the following tutorial will guide you through the steps to ensure you can filter and sort your data effectively. Excel's filtering function is very powerful and can help you extract the information you need from large amounts of data. This function can filter data according to the conditions you set and display only the parts that meet the conditions, making data management more efficient. By using the filter function, you can quickly find target data, saving time in finding and organizing data. This function can not only be applied to simple data lists, but can also be filtered based on multiple conditions to help you locate the information you need more accurately. Overall, Excel’s filtering function is a very practical

The performance of JAX, promoted by Google, has surpassed that of Pytorch and TensorFlow in recent benchmark tests, ranking first in 7 indicators. And the test was not done on the TPU with the best JAX performance. Although among developers, Pytorch is still more popular than Tensorflow. But in the future, perhaps more large models will be trained and run based on the JAX platform. Models Recently, the Keras team benchmarked three backends (TensorFlow, JAX, PyTorch) with the native PyTorch implementation and Keras2 with TensorFlow. First, they select a set of mainstream

Facing lag, slow mobile data connection on iPhone? Typically, the strength of cellular internet on your phone depends on several factors such as region, cellular network type, roaming type, etc. There are some things you can do to get a faster, more reliable cellular Internet connection. Fix 1 – Force Restart iPhone Sometimes, force restarting your device just resets a lot of things, including the cellular connection. Step 1 – Just press the volume up key once and release. Next, press the Volume Down key and release it again. Step 2 – The next part of the process is to hold the button on the right side. Let the iPhone finish restarting. Enable cellular data and check network speed. Check again Fix 2 – Change data mode While 5G offers better network speeds, it works better when the signal is weaker

I cry to death. The world is madly building big models. The data on the Internet is not enough. It is not enough at all. The training model looks like "The Hunger Games", and AI researchers around the world are worrying about how to feed these data voracious eaters. This problem is particularly prominent in multi-modal tasks. At a time when nothing could be done, a start-up team from the Department of Renmin University of China used its own new model to become the first in China to make "model-generated data feed itself" a reality. Moreover, it is a two-pronged approach on the understanding side and the generation side. Both sides can generate high-quality, multi-modal new data and provide data feedback to the model itself. What is a model? Awaker 1.0, a large multi-modal model that just appeared on the Zhongguancun Forum. Who is the team? Sophon engine. Founded by Gao Yizhao, a doctoral student at Renmin University’s Hillhouse School of Artificial Intelligence.

Recently, the military circle has been overwhelmed by the news: US military fighter jets can now complete fully automatic air combat using AI. Yes, just recently, the US military’s AI fighter jet was made public for the first time and the mystery was unveiled. The full name of this fighter is the Variable Stability Simulator Test Aircraft (VISTA). It was personally flown by the Secretary of the US Air Force to simulate a one-on-one air battle. On May 2, U.S. Air Force Secretary Frank Kendall took off in an X-62AVISTA at Edwards Air Force Base. Note that during the one-hour flight, all flight actions were completed autonomously by AI! Kendall said - "For the past few decades, we have been thinking about the unlimited potential of autonomous air-to-air combat, but it has always seemed out of reach." However now,

This week, FigureAI, a robotics company invested by OpenAI, Microsoft, Bezos, and Nvidia, announced that it has received nearly $700 million in financing and plans to develop a humanoid robot that can walk independently within the next year. And Tesla’s Optimus Prime has repeatedly received good news. No one doubts that this year will be the year when humanoid robots explode. SanctuaryAI, a Canadian-based robotics company, recently released a new humanoid robot, Phoenix. Officials claim that it can complete many tasks autonomously at the same speed as humans. Pheonix, the world's first robot that can autonomously complete tasks at human speeds, can gently grab, move and elegantly place each object to its left and right sides. It can autonomously identify objects
