Kylin v10 编译安装ceph 15.2.17

这篇具有很好参考价值的文章主要介绍了Kylin v10 编译安装ceph 15.2.17。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

1. 环境:

ceph:octopus(15.2.17)
OS:Kylin-Server-V10_U1-Release-Build02-20210824-GFB-x86_64


2. 基础环境准备

2.1 配置软件源

vim /etc/yum.repos.d/kylin_x86_64.repo

###Kylin Linux Advanced Server 10 - os repo###

[ks10-adv-cdrom]
name = Kylin Linux Advanced Server 10 - cdrom
baseurl = http://archive2.kylinos.cn/rpm/kylin/production/KY10-GFB-amd64/custom/kylin-server/KY10-GFB-amd64/
gpgcheck = 0
enabled = 1

2.1 安装依赖包

安装编译依赖环境和编译工具

yum install make python-devel openssl-devel graphviz autoconf automake rpm-build libtool
yum install CUnit-devel boost-random cmake expat-devel fuse-devel gperf libaio-devel libbabeltrace-devel libblkid-devel libcap-ng-devel libcurl-devel libibverbs-devel libnl3-devel librabbitmq-devel librdkafka-devel librdmacm-devel libxml2-devel lttng-ust-devel lz4-devel ncurses-devel nss-devel openldap-devel python3-Cython python3-devel python3-prettytable python3-sphinx  snappy-devel valgrind-devel xfsprogs-devel xmlstarlet yasm systemd-devel leveldb-devel spax at time mailx ed sendmail util-linux-user cups-client gperftools-devel gperftools-libs nasm  lua-devel libicu-devel gperftools-devel cryptsetup-devel

下载安装额外依赖(https://download.csdn.net/download/nanhai_happy/88218750?spm=1001.2014.3001.5503)如下:

wget https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/liboath-2.6.2-1.el7.x86_64.rpm
wget https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/liboath-devel-2.6.2-1.el7.x86_64.rpm
wget http://mirror.centos.org/centos/7/os/x86_64/Packages/redhat-lsb-core-4.1-27.el7.centos.1.x86_64.rpm
wget http://mirror.centos.org/centos/7/os/x86_64/Packages/redhat-lsb-submod-security-4.1-27.el7.centos.1.x86_64.rpm

安装

rpm -ivh liboath-2.6.2-1.el7.x86_64.rpm
rpm -ivh liboath-devel-2.6.2-1.el7.x86_64.rpm
rpm -ivh redhat-lsb-submod-security-4.1-27.el7.centos.1.x86_64.rpm
rpm -ivh redhat-lsb-core-4.1-27.el7.centos.1.x86_64.rpm

2.2 安装gcc 8.3.1

挂载Kylin-Server-V10_U1-Release-Build02-20210824-GFB-x86_64.iso,默认挂载路径为/run/media/root/KYLIN10-SVR/,在 Packages-gcc路径下有8.3.11的包,执行安装如下:

cd /run/media/root/KYLIN10-SVR/Packages-gcc
yum install gmp-devel libmpc-devel mpfr-devel isl
rpm -ivh *.rpm --force

3. 编译安装ceph

3.1 下载ceph 15.2.17

访问ceph网站https://download.ceph.com/tarballs/,找到对应的版本,下载

wget https://download.ceph.com/tarballs/ceph-15.2.17.tar.gz

3.2 创建rpmbuild环境

创建rpmbuild目录

cd ~
mkdir rpmbuild/{BUILD,SOURCES,SPECS,RPMS,BUILDROOT} -pv

3.3 解压ceph软件包

mv ceph-15.2.17.tar.gz /root/rpmbuild/SOURCES
cd /root/rpmbuild/SOURCES
tar -xvf ceph-15.2.17.tar.gz

3.4 修改ceph.spec文件

进入源码目录,修改ceph.spec,将Source0 定义的包名改成tar.gz格式的,本例中下载的为tar.gz的包,故需要修改相应的
vim ceph.spec

Summary:        User space components of the Ceph file system
License:        LGPL-2.1 and LGPL-3.0 and CC-BY-SA-3.0 and GPL-2.0 and BSL-1.0 and BSD-3-Clause and MIT
%if 0%{?suse_version}
Group:          System/Filesystems
%endif
URL:            http://ceph.com/
Source0:        %{?_remote_tarball_prefix}ceph-15.2.17.tar.bz2

更改为

Summary:        User space components of the Ceph file system
License:        LGPL-2.1 and LGPL-3.0 and CC-BY-SA-3.0 and GPL-2.0 and BSL-1.0 and BSD-3-Clause and MIT
%if 0%{?suse_version}
Group:          System/Filesystems
%endif
URL:            http://ceph.com/
Source0:        %{?_remote_tarball_prefix}ceph-15.2.17.tar.gz

将redhat-rpm-config更改为kylin-rpm-config

%if 0%{?fedora} || 0%{?rhel}
BuildRequires:  redhat-rpm-config
%endif

更改为

%if 0%{?fedora} || 0%{?rhel}
BuildRequires:  kylin-rpm-config
%endif

3.5 修改宏定义

在/usr/lib/rpm/macros文件中有一个定义:

%_unpackaged_files_terminate_build 1,把1改为0只警告

3.6 python版本修改

把系统默认的python版本修改为为3.7.4,如下

ln -sf /usr/bin/python3.7 /usr/bin/python

3.7 编译

编译执行如下命令:

rpmbuild -ba --target=$(uname -m) ceph.spec
  • -ba 编译后做成.rpm和src.rpm(还原成刚下载的NAME-VERSION.SRC.RPM包格式)
  • -bb 编译后做成.rpm
  • -bp 只执行spec的%pre 段(解开源码包并打补丁,即只做准备)

注意:编译的机器配置高一些,不然编译比较缓慢,存储空间要求100GB以上

3.8 安装

编译完成后进行安装,如下

yum -y remove librados2 librbd1
yum -y install librabbitmq librdkafka resource-agents jq socat xmlstarlet leveldb
yum -y install python2-zope-event python3-pyyaml  python3-zope-event python3-prettytable python3-bcrypt python3-pecan python3-werkzeug python3-pyOpenSSL python3-more-itertools python3-zipp

rpm -ivh ext-deps/liboath-2.6.2-1.el7.x86_64.rpm
rpm -ivh x86_64/python3-zope-interface-4.6.0-1.ky10.ky10.x86_64.rpm
rpm -ivh noarch/python3-*.rpm
rpm -ivh noarch/ceph-mgr-modules-core-15.2.17-0.ky10.ky10.noarch.rpm
chmod 600 /var/log/tallylog
rpm -ivh noarch/cephadm-15.2.17-0.ky10.ky10.noarch.rpm

rpm -ivh x86_64/lib*.rpm
rpm -ivh x86_64/python*.rpm --force
rpm -ivh x86_64/ceph-*.rpm
rpm -ivh x86_64/rbd-*.rpm
rpm -ivh x86_64/rados-objclass-devel-15.2.17-0.ky10.ky10.x86_64.rpm

软件包链接如下:

链接:https://pan.baidu.com/s/1SKZg5eNZ2XqX0Zky_eCBtA?pwd=icyv 
提取码:icyv 
--来自百度网盘超级会员V5的分享

或者通过该地址下载 kylin v10 ceph 15.2.17 x86_64 rpm


4. 问题记录:

4.1 CMake Error at cmake/modules/BuildBoost.cmake

执行rpmbuild的时候出现如下错误:

-- Found Curses: /usr/lib64/libncurses.so
-- Found nl: /usr/lib64/libnl-3.so
-- Checking for module 'libcap-ng'
--   Found libcap-ng, version 0.7.10
-- Setting civetweb to use OPENSSL >= 1.1
-- Found RabbitMQ: /usr/include
-- Checking for one of the modules 'rdkafka'
-- Found RDKafka: /usr/include (found suitable version "0.11.4", minimum required is "0.9.2")
-- exclude following files under src: *.js;*.css;civetweb;erasure-code/jerasure/jerasure;erasure-code/jerasure/gf-complete;rocksdb;googletest;spdk;xxHash;isa-l;lua;zstd;crypto/isa-l/isa-l_crypto;blkin;rapidjson;dmclock;seastar;fmt;c-ares;spawn;pybind/mgr/rook/rook-client-python
-- Configuring done
CMake Error at cmake/modules/BuildBoost.cmake:278 (_add_executable):
  Target "ceph-mon" links to target "StdFilesystem::filesystem" but the
  target was not found.  Perhaps a find_package() call is missing for an
  IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
  src/CMakeLists.txt:526 (add_executable)


CMake Error at cmake/modules/BuildBoost.cmake:278 (_add_executable):
  Target "ceph-mon" links to target "StdFilesystem::filesystem" but the
  target was not found.  Perhaps a find_package() call is missing for an
  IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
  src/CMakeLists.txt:526 (add_executable)
	 

......


CMake Error at cmake/modules/BuildBoost.cmake:270 (_add_library):
  Target "rgw_a" links to target "StdFilesystem::filesystem" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  src/rgw/CMakeLists.txt:218 (add_library)


CMake Error at cmake/modules/BuildBoost.cmake:270 (_add_library):
  Target "rgw" links to target "StdFilesystem::filesystem" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  src/rgw/CMakeLists.txt:369 (add_library)


CMake Error at cmake/modules/BuildBoost.cmake:278 (_add_executable):
  Target "ceph_rgw_jsonparser" links to target "StdFilesystem::filesystem"
  but the target was not found.  Perhaps a find_package() call is missing for
  an IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
  src/rgw/CMakeLists.txt:402 (add_executable)


CMake Error at cmake/modules/BuildBoost.cmake:278 (_add_executable):
  Target "ceph_rgw_multiparser" links to target "StdFilesystem::filesystem"
  but the target was not found.  Perhaps a find_package() call is missing for
  an IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
  src/rgw/CMakeLists.txt:408 (add_executable)


-- Generating done
-- Build files have been written to: /root/rpmbuild/BUILD/ceph-15.2.17/build
错误:/var/tmp/rpm-tmp.0Le2Ek (%build) 退出状态不好

后来发现gcc未升级到8.3.1导致的,将gcc进行升级后解决该问题


5. 参考文献:

https://www.cnblogs.com/yzbhfdz/p/15791759.html
https://download.ceph.com/tarballs/
https://developer.aliyun.com/article/477157
https://blog.51cto.com/xiexiaojun/1884429
https://www.cnblogs.com/jing99/p/9672295.html
https://bediverezero.github.io/utinity/2020/10/21/rpmbuild-acceleration.html文章来源地址https://www.toymoban.com/news/detail-666099.html

到了这里,关于Kylin v10 编译安装ceph 15.2.17的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • kylin v10 配置 rime 输入法

    删除自带的 fcitx 框架 清理缓存和残留数据 下载 ibus 框架 下载 rime 输入法 重启电脑 找到 ibus 首选项,选择 输入法 ————》 添加 ————》 中文 ——————》 rime . 网上选择 一个 rime 方案(雾凇 rime) https://github.com/iDvel/rime-ice 将文件全部复制到这个rime 文件夹下

    2024年02月20日
    浏览(26)
  • 【Linux】银河麒麟V10 ARM架构_安装JDK8-kylinV10(Kylin Linux Advanced Server V10 )操作系统(CentOS8)

    🦄 个人主页——🎐开着拖拉机回家_大数据运维-CSDN博客 🎐✨🍁 🪁🍁 希望本文能够给您带来一定的帮助🌸文章粗浅,敬请批评指正!🍁🐥 🪁🍁🪁🍁🪁🍁🪁🍁 🪁🍁🪁🍁🪁🍁🪁 🪁🍁🪁🍁🪁🍁🪁🍁🪁🍁🪁🍁 🪁🍁🪁🍁🍁🪁🍁 感谢点赞和关注 ,每天

    2024年02月05日
    浏览(53)
  • 【Docker】Kylin V10 下 MySQL 容器内存占用异常的解决方法

    以下内容均来自个人笔记并重新梳理,如有错误欢迎指正!如果对您有帮助,烦请点赞、关注、转发!欢迎扫码关注个人公众号!  公众号原文链接:Kylin V10 下 MySQL 容器内存占用异常的解决方法 背景介绍 笔者在文章《MySQL 源码构建 Docker 镜像(基于 ARM 64 架构)》中曾提到

    2024年02月22日
    浏览(44)
  • 飞腾 kylin-server v10 arm64 aarch64 anaconda3 conda 非法指令 Illegal instruction 笔记

    原因: chenghlee  commented on Jun 15, 2021 It\\\'s likely related to the compiler options used to build the linux-aarch64 packages on defaults; basically, Anaconda uses options that target the server-class Neoverse N1/N2 microarchitecture, rather than the application-class Cortex-A* CPUs. Some thought that needs to be put into the  linux-aarch64  and ho

    2024年02月09日
    浏览(46)
  • 在离线的arm架构kylin v10服务器上使用Kuboard-Spray搭建K8S集群

    在离线的arm架构kylin v10服务器上使用Kuboard-Spray搭建K8S集群 在内网项目中需要安装K8S集群,经过调研,选择使用Kuboard-Spray工具搭建K8S集群,降低学习成本,提高安装效率。 为了简化安装使用集群的过程,搭建了私有yum源仓库和harbor私有镜像仓库。 详细参考文章: 本地yum源仓

    2024年04月10日
    浏览(41)
  • 银河麒麟kylin_V10系统安装mysql-8.0.31

    0.安装前的准备工作 检查是否已经安装mysql   rpm -qa | grep mysql 有的话,将查询出来的卸载掉, rpm -e –nodeps   xxxxxxxx 查询残余文件夹 :   whereis mysql 检查MySQL用户组以及用户是否存在,若没有则创建 [root@localhost ~]# cat /etc/group | grep mysql [root@localhost ~]# cat /etc/passwd |grep mysql [ro

    2024年02月07日
    浏览(35)
  • 华为服务器Taishan安装银河麒麟Kylin-Server-V10-SP3操作系统(IBMC安装)

    iBMC是华为面向服务器全生命周期的服务器嵌入式管理系统。提供硬件状态监控、部署、节能、安全等系列管理工具,标准化接口构建服务器管理更加完善的生态系统。 服务器BMC IP:192.168.2.100 1、确保本机和服务器BMC管理口在同一网络 2、银河麒麟V10操作系统arm64版ISO镜像 银河

    2024年01月21日
    浏览(97)
  • 麒麟-飞腾Kylin-V4桌面arm64系统静态编译QT

    1.系统具体版本:   2. 因为此版本的源很老了,需要修改版本的源,才能正常更新各种软件,否则,你连麒麟商店都打不开。 选择你系统对应版本的源地址:  改完后:   然后重启电脑。 3.编译QT源码: 在编译之前,因为qt会用到openssl。我们要确定openssl的版本: 输入   

    2024年02月16日
    浏览(31)
  • Kylin 安装novnc 远程访问

    noVNC可以使用浏览器直接访问服务器,而不需要使用VNC客户端。 1.初始环境 关闭防火墙或允许IP访问本机 2.安装依赖 dnf install -y tigervnc-server git 3.git下载novnc git clone https://github.com/novnc/noVNC.git git clone https://gitee.com/yangyizhao/noVNC.git 4.配置信任证书 路径 openssl req -new -x509 -days 365

    2024年01月19日
    浏览(23)
  • Kylin-Server-V10-SP1 x86_64 备份及还原

    1、查看磁盘分区 打开终端,输入lsblk查看磁盘分区 sda为系统磁盘(名称依现场情况而定) 2、外接一块存储设备 在终端输入lsblk查看外接存储名称 sdb为外接存储设备(名称依现场情况而定) 3、格式化外接存储设备并挂载 使用fdisk命令对外接存储设备重新分区 使用mkfs.xfs命令

    2024年01月21日
    浏览(57)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包