Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of ceph Source Code installation

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail the example analysis on the installation of ceph source code. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

1. Ceph source code compilation

1.1 ceph source code download

There are three commonly used source code acquisition addresses for Ceph, of which the official source code path is:

Http://download.ceph.com/tarballs/

Download the source code tar package of the corresponding distribution under this path

You can also use the git version management tool to obtain the source code for the latest development version:

Git clone-- recursive https://github.com/ceph/ceph

You can also download the srpm package for installation, which is more convenient; http://download.ceph.com/rpm-infernalis/el7/SRPMS/ (I version ceph srpm package address)

1.2 establish a compilation environment

Compiling and packaging ceph requires a corresponding tool chain and a series of third-party libraries, and the establishment of an appropriate yum source can make the compilation get twice the result with half the effort, but it still can not solve all the problems. If there are missing dependencies, the compilation system will report errors during construction, and the corresponding dependencies need to be installed according to the log.

The following compilation and packaging process is based on the srpm package and redhat7.1, before which you need to configure the yum source.

1.2.1 yum source configuration for ceph

The official yum source sometimes encounters the problem of slow network speed. Ali's ceph source is recommended. For example, this is the f version I configured:

[Ceph] name=Ceph packages for $basearch baseurl= http://mirrors.aliyun.com/ceph/rpm-firefly/el7/$basearch enabled=1 gpgcheck=1 type=rpm-md gpgkey= http://mirrors.aliyun.com/ceph/keys/release.asc priority=1 [Ceph-noarch] name=Ceph noarch packages baseurl= http://mirrors.aliyun.com/ceph/rpm-firefly/el7/noarch enabled=1 gpgcheck=1 type=rpm-md gpgkey= http://mirrors.aliyun.com/ceph/keys/release.asc priority=1 [ceph-source] name=Ceph source packages baseurl= http://mirrors.aliyun . com/ceph/rpm-firefly/el7/SRPMS enabled=1 gpgcheck=1 type=rpm-md gpgkey= http://mirrors.aliyun.com/ceph/keys/release.asc priority=1

Thus, the configuration of the local yum source is completed.

1.2.1.2 Network yum source configuration

Self-configuration

After completing the local and network yum source configuration:

# yum makecache

1.3 ceph source code compilation and packaging

This process is actually mainly the use of rpm-related tools.

Execute rpmdev-setuptree to generate the rpm packaging tool required ~ / rpmbuild directory and a series of subdirectories and ~ / .rpmmacros files, of course, if you do not use the tool, you can also create these directories and files manually.

Rpm-ivh [downloaded srpm package]

Execute rpmbuild-- ba ~ / rpmbuild/SPECS/ceph.spec to start compilation and packaging, and if all goes well, all binary rpm packages and source code rpm packages will be generated in ~ / rpmbuild/RPMS and ~ / rpmbuild/SRPMS, respectively.

At this point, there are still some dependent libraries that need to be installed. Install them one by one according to the log (if the version of the library is inconsistent, you need to uninstall the current library and install the required libraries):

After completing the rpmbuild, make install is performed in the ~ / rpmbuild/BUILD/ [cpeh- version] / src directory

Note: the whole process requires high memory. When the memory is small, the compilation time is long and easy to report errors. It can be executed many times or memory 7GB or above is recommended.

This is the end of this article on "sample Analysis of ceph Source installation". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report