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

Use Docker to build a Git image using the clone repository

Overview I have been using Docker for more than a...

Ten important questions for learning the basics of Javascript

Table of contents 1. What is Javascript? 2. What ...

4 ways to avoid duplicate insertion of data in Mysql

The most common way is to set a primary key or un...

MySQL installation and configuration method graphic tutorial (CentOS7)

1. System environment [root@localhost home]# cat ...

Detailed explanation of Vue form binding and components

Table of contents 1. What is two-way data binding...

Solution to inserting a form with a blank line above and below

I don't know if you have noticed when making a...

MySQL 8.0.21 installation steps and problem solutions

Download the official website First go to the off...

Detailed explanation of MySQL batch SQL insert performance optimization

For some systems with large amounts of data, the ...

Detailed explanation of the correct use of the if function in MySQL

For what I am going to write today, the program r...

JavaScript implements an input box component

This article example shares the specific code for...

Solve the problem of OpenLayers 3 loading vector map source

1. Vector Map Vector graphics use straight lines ...

Detailed explanation of JS ES6 variable destructuring assignment

Table of contents 1. What is deconstruction? 2. A...

A detailed introduction to the netstat command in Linux

Table of contents 1. Introduction 2. Output Infor...