我是靠谱客的博主 风中月亮,最近开发中收集的这篇文章主要介绍HeartBeat-DRBD rpm安装包生成,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

请注意内核版本对应的软件包是否存在 kernel-devel-$(uname -r) kernel-headers-$(uname -r)

HeartBeat

RPM 包生成

# 配置yum源
rm -f /etc/yum.repos.d/*.repo
curl -so /etc/yum.repos.d/epel-7.repo http://mirrors.aliyun.com/repo/epel-7.repo
curl -so /etc/yum.repos.d/Centos-7.repo http://mirrors.aliyun.com/repo/Centos-7.repo
sed -i '/aliyuncs.com/d' /etc/yum.repos.d/Centos-7.repo /etc/yum.repos.d/epel-7.repo

# 配置cluster-glue-libs-devel 安装源
cat <<EOF   >/etc/yum.repos.d/gf-epel-7.repo
[epel-testing]
name=Extra Packages for Enterprise Linux 7 - $basearch - Testing
baseurl=http://mirror.ghettoforge.org/distributions/gf/el/7/testing/x86_64
enabled=1
gpgcheck=0
EOF

# 安装依赖环境
yum install -y glib2-devel libtool-ltdl-devel bzip2-devel ncurses-devel openssl-devel libtool 
  zlib-devel mailx cluster-glue-libs-devel libxslt docbook-dtds docbook-style-xsl libuuid-devel 
  bzip2 rpm-build wget kernel-headers-$(uname -r)

# 下载软件
wget http://hg.linux-ha.org/heartbeat-STABLE_3_0/archive/958e11be8686.tar.bz2

# heartbeat
mkdir -p /root/rpmbuild/SOURCES
mkdir heartbeat
tar xvf 958e11be8686.tar.bz2 -C heartbeat --strip-components 1
tar cjvf /root/rpmbuild/SOURCES/heartbeat.tar.bz2 heartbeat
rpmbuild -ba heartbeat/heartbeat-fedora.spec

客户端安装

# 配置yum源
rm -f /etc/yum.repos.d/*.repo
curl -so /etc/yum.repos.d/epel-7.repo http://mirrors.aliyun.com/repo/epel-7.repo
curl -so /etc/yum.repos.d/Centos-7.repo http://mirrors.aliyun.com/repo/Centos-7.repo
sed -i '/aliyuncs.com/d' /etc/yum.repos.d/Centos-7.repo /etc/yum.repos.d/epel-7.repo

# 配置cluster-glue-libs-devel 安装源
cat <<EOF   >/etc/yum.repos.d/gf-epel-7.repo
[epel-testing]
name=Extra Packages for Enterprise Linux 7 - $basearch - Testing
baseurl=http://mirror.ghettoforge.org/distributions/gf/el/7/testing/x86_64
enabled=1
gpgcheck=0
EOF

# 安装
yum install heartbeat-3.0.6-1.el7.centos.x86_64.rpm heartbeat-libs-3.0.6-1.el7.centos.x86_64.rpm

DRBD

生成RPM包

# 配置yum源
rm -f /etc/yum.repos.d/*.repo
curl -so /etc/yum.repos.d/epel-7.repo http://mirrors.aliyun.com/repo/epel-7.repo
curl -so /etc/yum.repos.d/Centos-7.repo http://mirrors.aliyun.com/repo/Centos-7.repo
sed -i '/aliyuncs.com/d' /etc/yum.repos.d/Centos-7.repo /etc/yum.repos.d/epel-7.repo


# 安装 DRBD
yum install -y gcc gcc-c++ make automake autoconf libxslt libxslt-devel flex rpm-build wget  kernel-devel-$(uname -r) kernel-headers-$(uname -r)


mkdir -p rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
wget -c www.linbit.com/downloads/drbd/8.4/drbd-8.4.11-1.tar.gz 
www.linbit.com/downloads/drbd/utils/drbd-utils-9.6.0.tar.gz

tar zxvf drbd-8.4.11-1.tar.gz
cd drbd-8.4.11-1
make km-rpm
cd
tar zxvf drbd-utils-9.6.0.tar.gz
cd drbd-utils-9.6.0
cp drbd.spec.in{,.bak}
sed -i '33a %undefine with_sbinsymlinks' drbd.spec.in
./configure
make rpm
cd /root/rpmbuild/RPMS/x86_64

客户端安装

rpm -Uvh drbd-km-3.10.0_862.el7.x86_64-8.4.11-1.x86_64.rpm 
  drbd-utils-9.6.0-1.el7.centos.x86_64.rpm 
  drbd-bash-completion-9.6.0-1.el7.centos.x86_64.rpm 
  drbd-heartbeat-9.6.0-1.el7.centos.x86_64.rpm

转载于:https://my.oschina.net/yx571304/blog/3030546

最后

以上就是风中月亮为你收集整理的HeartBeat-DRBD rpm安装包生成的全部内容,希望文章能够帮你解决HeartBeat-DRBD rpm安装包生成所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(42)

评论列表共有 0 条评论

立即
投稿
返回
顶部