共计 5181 个字符,预计需要花费 13 分钟才能阅读完成。
一、参考链接
🔴阿里巴巴开源镜像站 -OPSX 镜像站 - 阿里云开发者社区 (aliyun.com)
🟡mongodb 镜像 -mongodb 下载地址 -mongodb 装置教程 - 阿里巴巴开源镜像站 (aliyun.com)
🟢centOs 装置并应用 mongodb【国内镜像版】_SWEENEY_HE 的博客 -CSDN 博客_mongodb 国内镜像
二、MongoDB 镜像简介
MongoDB 是一个基于分布式文件存储的数据库。由 C++ 语言编写。旨在为 WEB 利用提供可扩大的高性能数据存储解决方案。
下载地址 : https://mirrors.aliyun.com/mongodb/
三、MongoDB 镜像配置办法
1、配置 CentOS 零碎的 YUM 源(基于 Linux 零碎)
🔴查看零碎版本信息
Kernel 3.10.0-1160.el7.x86_64 on an x86_64
centos login: root
Password:
Last login: Wed Dec 22 13:42:01 on tty1
[root@centos ~]# hostnamectl
Static hostname: centos
Icon name: computer-vm
Chassis: vm
Machine ID: f6fc8fb7991c4c518238af7c75f16046
Boot ID: 870af0bae5394857882a0baa5fa4c8e0
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-1160.el7.x86_64
Architecture: x86-64
[root@centos ~]#
🟠革除并更新 YUM 源
[root@centos ~]# yum clean all
[root@centos ~]# yum repolist
🟡增加内容如下:(配置偶数版本,奇数版不适宜生产应用)
在 /etc/yum.repos.d 创立一个 mongodb-org.repo 源文件
[root@centos ~]# vim /etc/yum.repos.d/mongodb-org.repo
[root@centos ~]# cat /etc/yum.repos.d/mongodb-org.repo
[mongodb-org]
name = MongoDB Repository
baseurl = https://mirrors.aliyun.com/mongodb/yum/redhat/$releasever/mongodb-org/3.6/x86_64/
gpgcheck = 1
enabled = 1
gpgkey = https://www.mongodb.org/static/pgp/server-3.6.asc
[root@centos ~]#
🟢革除缓存
执行 yum makecache 命令将服务器上的软件包信息浮现在本地缓存,以进步搜寻装置软件的速度
[root@centos ~]# yum makecache
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
base | 3.6 kB 00:00:00
epel | 4.7 kB 00:00:00 extras | 2.9 kB 00:00:00 mongodb-org | 2.5 kB 00:00:00 updates | 2.9 kB 00:00:00 Metadata Cache Created
[root@centos ~]#
2、装置 mongodb-org
[root@centos ~]# yum install mongodb-org
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package mongodb-org.x86_64 0:3.6.23-1.el7 will be installed
--> Processing Dependency: mongodb-org-mongos = 3.6.23 for package: mongodb-org-3.6.23-1.el7.x86_64
--> Processing Dependency: mongodb-org-server = 3.6.23 for package: mongodb-org-3.6.23-1.el7.x86_64
--> Processing Dependency: mongodb-org-shell = 3.6.23 for package: mongodb-org-3.6.23-1.el7.x86_64
--> Processing Dependency: mongodb-org-tools = 3.6.23 for package: mongodb-org-3.6.23-1.el7.x86_64
--> Running transaction check
---> Package mongodb-org-mongos.x86_64 0:3.6.23-1.el7 will be installed
---> Package mongodb-org-server.x86_64 0:3.6.23-1.el7 will be installed
---> Package mongodb-org-shell.x86_64 0:3.6.23-1.el7 will be installed
---> Package mongodb-org-tools.x86_64 0:3.6.23-1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================================== Package Arch Version Repository Size
========================================================================================================================Installing:
mongodb-org x86_64 3.6.23-1.el7 mongodb-org 5.9 k
Installing for dependencies:
mongodb-org-mongos x86_64 3.6.23-1.el7 mongodb-org 12 M
mongodb-org-server x86_64 3.6.23-1.el7 mongodb-org 21 M
mongodb-org-shell x86_64 3.6.23-1.el7 mongodb-org 12 M
mongodb-org-tools x86_64 3.6.23-1.el7 mongodb-org 66 M
Transaction Summary
========================================================================================================================Install 1 Package (+4 Dependent packages)
Total download size: 111 M
Installed size: 292 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7/mongodb-org/packages/mongodb-org-3.6.23-1.el7.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID 91fa4ad5: NOKEY
Public key for mongodb-org-3.6.23-1.el7.x86_64.rpm is not installed
(1/5): mongodb-org-3.6.23-1.el7.x86_64.rpm | 5.9 kB 00:00:00 (2/5): mongodb-org-mongos-3.6.23-1.el7.x86_64.rpm | 12 MB 00:00:17 (3/5): mongodb-org-shell-3.6.23-1.el7.x86_64.rpm | 12 MB 00:00:24 (4/5): mongodb-org-tools-3.6.23-1.el7.x86_64.rpm | 66 MB 00:01:19 (5/5): mongodb-org-server-3.6.23-1.el7.x86_64.rpm | 21 MB 00:02:16 ------------------------------------------------------------------------------------------------------------------------Total 824 kB/s | 111 MB 00:02:17 Retrieving key from https://www.mongodb.org/static/pgp/server-3.6.asc
Importing GPG key 0x91FA4AD5:
Userid : "MongoDB 3.6 Release Signing Key <packaging@mongodb.com>"
Fingerprint: 2930 adae 8caf 5059 ee73 bb4b 5871 2a22 91fa 4ad5
From : https://www.mongodb.org/static/pgp/server-3.6.asc
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : mongodb-org-server-3.6.23-1.el7.x86_64 1/5 Created symlink from /etc/systemd/system/multi-user.target.wants/mongod.service to /usr/lib/systemd/system/mongod.service.
Installing : mongodb-org-shell-3.6.23-1.el7.x86_64 2/5 Installing : mongodb-org-tools-3.6.23-1.el7.x86_64 3/5 Installing : mongodb-org-mongos-3.6.23-1.el7.x86_64 4/5 Installing : mongodb-org-3.6.23-1.el7.x86_64 5/5 Verifying : mongodb-org-mongos-3.6.23-1.el7.x86_64 1/5 Verifying : mongodb-org-tools-3.6.23-1.el7.x86_64 2/5 Verifying : mongodb-org-shell-3.6.23-1.el7.x86_64 3/5 Verifying : mongodb-org-3.6.23-1.el7.x86_64 4/5 Verifying : mongodb-org-server-3.6.23-1.el7.x86_64 5/5
Installed:
mongodb-org.x86_64 0:3.6.23-1.el7
Dependency Installed:
mongodb-org-mongos.x86_64 0:3.6.23-1.el7 mongodb-org-server.x86_64 0:3.6.23-1.el7
mongodb-org-shell.x86_64 0:3.6.23-1.el7 mongodb-org-tools.x86_64 0:3.6.23-1.el7
Complete!
[root@centos ~]#
正文完