Tutorial on installing Ceph distributed storage with yum under Centos7

Tutorial on installing Ceph distributed storage with yum under Centos7

Preface

This article describes how to install Ceph. After mastering the method, you can choose which version of Ceph to install.

Configure yum source, epel source

First, the machine needs to be connected to the Internet, and the network yum source and epel source must be configured. The source files can be downloaded from the Alibaba open source mirror site.

Note: EPEL (Extra Packages for Enterprise Linux) is a project based on Fedora that provides additional packages for the "Red Hat" operating system, suitable for RHEL, CentOS and Scientific Linux.

Website: Alibaba Cloud Official Mirror Site

For example, I am using Centos7. Next, I will download the yum source and epel source for the corresponding version of Linux.

insert image description here
insert image description here

Configure yum source

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

Create a cache

yum makecache 
Loaded plugins: fastestmirror, langpacks
Determining fastest mirrors
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
base | 3.6 kB 00:00     
extras | 2.9 kB 00:00     
updates | 2.9 kB 00:00     
base/7/x86_64/primary_db FAILED                                          
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/repodata/f09552edffa70f49f553e411c2282fbccfffbeafa21e81e32622b103038b8bae-primary.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying another mirror.
(1/10): base/7/x86_64/group_gz | 153 kB 00:00     
(2/10): extras/7/x86_64/filelists_db | 205 kB 00:00     
(3/10): extras/7/x86_64/other_db | 122 kB 00:00     
(4/10): base/7/x86_64/other_db | 2.6 MB 00:00     
(5/10): updates/7/x86_64/filelists_db | 1.3 MB 00:00     
(6/10): updates/7/x86_64/other_db | 195 kB 00:00     
(7/10): base/7/x86_64/primary_db | 6.1 MB 00:00     
base/7/x86_64/filelists_db FAILED                                          
http://mirrors.aliyuncs.com/centos/7/os/x86_64/repodata/6882feea31727f25dc12063b4bab119501d25dbf6cb6fa0f5b78b8e3d5401ea4-filelists.sqlite.bz2: [Errno 14] curl#7 - "Failed connect to mirrors.aliyuncs.com:80; Connection refused"
Trying another mirror.
extras/7/x86_64/primary_db FAILED                                          
http://mirrors.aliyuncs.com/centos/7/extras/x86_64/repodata/42c5d8fe33ef3f1ab94d1ae257bc56201267d8af60132e3d778e586693e50a8f-primary.sqlite.bz2: [Errno 14] curl#7 - "Failed connect to mirrors.aliyuncs.com:80; Connection refused"
Trying another mirror.
updates/7/x86_64/primary_db FAILED                                          
http://mirrors.aliyuncs.com/centos/7/updates/x86_64/repodata/9700f154a034cedf59ca9c4f0a1466cc4dccaeb7db2e20b7e247e9e8a3a5fbc5-primary.sqlite.bz2: [Errno 14] curl#7 - "Failed connect to mirrors.aliyuncs.com:80; Connection refused"
Trying another mirror.
(8/10): extras/7/x86_64/primary_db | 194 kB 00:00     
(9/10): base/7/x86_64/filelists_db | 7.1 MB 00:00     
(10/10): updates/7/x86_64/primary_db | 2.1 MB 00:00     
Metadata cache established

If Alibaba Cloud's ECS is not used, the message "Couldn't resolve host 'mirrors.cloud.aliyuncs.com" will appear, but it will not affect its normal use.

Configure epel source

insert image description here
insert image description here

wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

Creating a cache is generally not wrong

yum makecache 
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
base | 3.6 kB 00:00     
epel | 4.7 kB 00:00     
extras | 2.9 kB 00:00     
updates | 2.9 kB 00:00     
(1/6): epel/x86_64/group_gz | 95 kB 00:00     
(2/6): epel/x86_64/updateinfo | 1.0 MB 00:00     
(3/6): epel/x86_64/prestodelta | 4.0 kB 00:00     
(4/6): epel/x86_64/primary_db | 6.8 MB 00:01     
(5/6): epel/x86_64/other_db | 3.3 MB 00:00     
(6/6): epel/x86_64/filelists_db | 12 MB 00:02     
Metadata cache established

Configure Ceph source

Find Ceph in Alibaba Cloud Open Source Mirror Site

insert image description here

Go to its download URL

insert image description here

Among them are various versions of Ceph

insert image description here

For example, download the rpm-15.2.2/version of Ceph

insert image description here

Select el7, which is the Centos7 version.

insert image description here

Write the paths of these two items into the Ceph source file, and the directory contains the specific software package.

cat >>/etc/yum.repos.d/ceph.repo<< eof
[ceph] #The path is the x86_64 directory above name=ceph
baseurl=https://mirrors.aliyun.com/ceph/rpm-15.2.2/el7/x86_64/
gpgcheck=0
enabled=1
[ceph-noarch] #The path is the above noarch directory name=ceph-noarch
baseurl=https://mirrors.aliyun.com/ceph/rpm-15.2.2/el7/noarch/
gpgcheck=0
enabled=1
eof

Install Ceph and its components

Install epel-release and yum related components

yum -y install epel-release yum-plugin-priorities yum-utils

Install Ceph and related components

yum install -y ceph-deploy ceph ceph-radosgw snappy leveldb gdisk python-argparse gperftools-libs

Check the ceph version

ceph -v
ceph version 15.2.2 (0c857e985a29d90501a285f242ea9c008df49eb8) octopus (stable)

This is the end of this article about the tutorial on installing Ceph distributed storage with yum under Centos7. For more information about installing Ceph on Centos7, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Tutorial on how to install and use Ceph distributed software under Linux
  • Example analysis of installing ceph (JEWEL) and above versions in Centos7.0
  • Detailed explanation of using RadosGW object storage in ceph cluster

<<:  Tips on setting HTML table borders

>>:  Statement to determine browser version and compatible with multiple browsers

Recommend

How to write the style of CSS3 Tianzi grid list

In many projects, it is necessary to implement th...

Detailed explanation of overflow-scrolling to solve scrolling lag problem

Preface If you use the overflow: scroll attribute...

element-ui Mark the coordinate points after uploading the picture

What is element-ui element-ui is a desktop compon...

Example of how rem is adapted for mobile devices

Preface Review and summary of mobile terminal rem...

vue-admin-template dynamic routing implementation example

Provide login and obtain user information data in...

How to enable the slow query log function in MySQL

The MySQL slow query log is very useful for track...

HTML implements a fixed floating semi-transparent search box on mobile

Question. In the mobile shopping mall system, we ...

How to build Nginx image server with Docker

Preface In general development, images are upload...

Sample code for implementing history in vuex

I have recently been developing a visual operatio...

SQL Practice Exercise: Online Mall Database User Information Data Operation

Online shopping mall database-user information da...

IE6 implements min-width

First of all, we know that this effect should be ...

Detailed explanation of the use of DockerHub image repository

Previously, the images we used were all pulled fr...