CentOS 6.5安装MongoDB 2.6
下面我们在CentOS 6.5 x64系统上安装最新的MongoDB 2.6.0版。MongoDB v2.4.x版的软件仓库有两个包:1)mongo-10gen-server此包里
下面我们在CentOS 6.5 x64系统上安装最新的MongoDB 2.6.0版。
MongoDB v2.4.x版的软件仓库有两个包:
1)mongo-10gen-server
此包里面有最新版的mongod和mongos守护程序以及相关的配置和初始化脚本。
2)mongo-10gen
此包里面有最新版的所有MongoDB工具。这些工具方便你管理MongoDB系统。
但在MongoDB v2.6.0版的软件仓库一共有五个包:
1)mongodb-org
此包是元数据包,它可以实现自动安装下面的4个组件包。
2)mongodb-org-server
此包里面有mongod守护程序,以及相关的配置和初始化脚本。
3)mongodb-org-mongos
此包里面有mongos守护程序。
4)mongodb-org-shell
此包里面有mongo shell环境。
5)mongodb-org-tools
此包里面有以下的MongoDB工具:mongoimport、bsondump、mongodump、mongoexport、mongofiles、mongoimport、mongooplog、mongoperf、mongorestore、mongostat以及mongotop。
控制脚本:mongodb-org包里面有各种控制脚本,包括初始化脚本/etc/rc.d/init.d/mongod
使用/etc/mongod.conf配置文件来对MongoDB进行配置。
MongoDB 2.6.0版不再有mongos的控制脚本。mongos进程只用于分片的场景。你可以使用mongod初始化脚本来驱动mongos控制脚本。
相关阅读:
CentOS编译安装MongoDB
CentOS 编译安装 MongoDB与mongoDB的php扩展
CentOS 6 使用 yum 安装MongoDB及服务器端配置
Ubuntu 13.04下安装MongoDB2.4.3
MongoDB入门必读(概念与实战并重)
《MongoDB 权威指南》(MongoDB: The Definitive Guide)英文文字版[PDF]
要安装最新的64位MongoDB 2.6.0版,步骤如下:
1、创建mongodb.repo文件
在/etc/yum.repos.d/目录下创建文件mongodb.repo,它包含MongoDB仓库的配置信息,内容如下:
[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/RedHat/os/x86_64/
gpgcheck=0
enabled=1
2、执行安装命令
$ sudo yum install mongodb-org
Loaded plugins: security
base | 3.7 kB 00:00
base/primary_db | 4.4 MB 00:01
extras | 3.4 kB 00:00
extras/primary_db | 19 kB 00:00
mongodb | 951 B 00:00
mongodb/primary | 24 kB 00:16
mongodb 155/155
openlogic | 1.3 kB 00:00
openlogic/primary | 273 kB 00:00
openlogic 24/24
updates | 3.4 kB 00:00
updates/primary_db | 2.6 MB 00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mongodb-org.x86_64 0:2.6.0-1 will be installed
--> Processing Dependency: mongodb-org-tools = 2.6.0 for package: mongodb-org-2.6.0-1.x86_64
--> Processing Dependency: mongodb-org-shell = 2.6.0 for package: mongodb-org-2.6.0-1.x86_64
--> Processing Dependency: mongodb-org-server = 2.6.0 for package: mongodb-org-2.6.0-1.x86_64
--> Processing Dependency: mongodb-org-mongos = 2.6.0 for package: mongodb-org-2.6.0-1.x86_64
--> Running transaction check
---> Package mongodb-org-mongos.x86_64 0:2.6.0-1 will be installed
---> Package mongodb-org-server.x86_64 0:2.6.0-1 will be installed
---> Package mongodb-org-shell.x86_64 0:2.6.0-1 will be installed
---> Package mongodb-org-tools.x86_64 0:2.6.0-1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved

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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

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











Full table scanning may be faster in MySQL than using indexes. Specific cases include: 1) the data volume is small; 2) when the query returns a large amount of data; 3) when the index column is not highly selective; 4) when the complex query. By analyzing query plans, optimizing indexes, avoiding over-index and regularly maintaining tables, you can make the best choices in practical applications.

Yes, MySQL can be installed on Windows 7, and although Microsoft has stopped supporting Windows 7, MySQL is still compatible with it. However, the following points should be noted during the installation process: Download the MySQL installer for Windows. Select the appropriate version of MySQL (community or enterprise). Select the appropriate installation directory and character set during the installation process. Set the root user password and keep it properly. Connect to the database for testing. Note the compatibility and security issues on Windows 7, and it is recommended to upgrade to a supported operating system.

MySQL and MariaDB can coexist, but need to be configured with caution. The key is to allocate different port numbers and data directories to each database, and adjust parameters such as memory allocation and cache size. Connection pooling, application configuration, and version differences also need to be considered and need to be carefully tested and planned to avoid pitfalls. Running two databases simultaneously can cause performance problems in situations where resources are limited.

MySQL is an open source relational database management system. 1) Create database and tables: Use the CREATEDATABASE and CREATETABLE commands. 2) Basic operations: INSERT, UPDATE, DELETE and SELECT. 3) Advanced operations: JOIN, subquery and transaction processing. 4) Debugging skills: Check syntax, data type and permissions. 5) Optimization suggestions: Use indexes, avoid SELECT* and use transactions.

LaravelEloquent Model Retrieval: Easily obtaining database data EloquentORM provides a concise and easy-to-understand way to operate the database. This article will introduce various Eloquent model search techniques in detail to help you obtain data from the database efficiently. 1. Get all records. Use the all() method to get all records in the database table: useApp\Models\Post;$posts=Post::all(); This will return a collection. You can access data using foreach loop or other collection methods: foreach($postsas$post){echo$post->

Data Integration Simplification: AmazonRDSMySQL and Redshift's zero ETL integration Efficient data integration is at the heart of a data-driven organization. Traditional ETL (extract, convert, load) processes are complex and time-consuming, especially when integrating databases (such as AmazonRDSMySQL) with data warehouses (such as Redshift). However, AWS provides zero ETL integration solutions that have completely changed this situation, providing a simplified, near-real-time solution for data migration from RDSMySQL to Redshift. This article will dive into RDSMySQL zero ETL integration with Redshift, explaining how it works and the advantages it brings to data engineers and developers.

In MySQL database, the relationship between the user and the database is defined by permissions and tables. The user has a username and password to access the database. Permissions are granted through the GRANT command, while the table is created by the CREATE TABLE command. To establish a relationship between a user and a database, you need to create a database, create a user, and then grant permissions.

MySQL is suitable for beginners because it is simple to install, powerful and easy to manage data. 1. Simple installation and configuration, suitable for a variety of operating systems. 2. Support basic operations such as creating databases and tables, inserting, querying, updating and deleting data. 3. Provide advanced functions such as JOIN operations and subqueries. 4. Performance can be improved through indexing, query optimization and table partitioning. 5. Support backup, recovery and security measures to ensure data security and consistency.
