安装DRBD的一些问题

时间:2022-04-09 15:46:20
安装DRBD,建议用源代码包先生成rpm包来安装,不要用直接download的rpm包,有可能会用不了,因为这跟系统内核版本有关系,在2.6.33版本以前内核没有集成drbd,
 
A.先安装一些其它的工具包yum install gcc* flex kernel-devel rpm-build libxslt -y
C.tar zxf drbd-8.4.4.tar.gz -C /usr/src 并进入解压的目录 drbd-8.4.4.tar.gz为你下载的源码包:http://pan.baidu.com/s/1pJ7lbmV
D.进入解压目录,执行./configure
E.make rpm,此时有可能提示错误如下:
/usr/bin/xsltproc \
        --xinclude \
        http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl drbdsetup.xml
error : Operation in progress
warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"
cannot parse http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
make[1]: *** [drbdsetup.8] Error 4
 
提示有一个地址文件没能找到,解决方法:
yum -y install docbook-style-xsl
 

F.执行make km-rpm

G.最后会提示:
You have now:
/root/rpmbuild/RPMS/x86_64/drbd-bash-completion-8.4.4-4.el6.x86_64.rpm
/root/rpmbuild/RPMS/x86_64/drbd-udev-8.4.4-4.el6.x86_64.rpm
/root/rpmbuild/RPMS/x86_64/drbd-utils-8.4.4-4.el6.x86_64.rpm
/root/rpmbuild/RPMS/x86_64/drbd-xen-8.4.4-4.el6.x86_64.rpm
/root/rpmbuild/RPMS/x86_64/drbd-heartbeat-8.4.4-4.el6.x86_64.rpm
/root/rpmbuild/RPMS/x86_64/drbd-km-debuginfo-8.4.4-4.el6.x86_64.rpm
/root/rpmbuild/RPMS/x86_64/drbd-8.4.4-4.el6.x86_64.rpm
/root/rpmbuild/RPMS/x86_64/drbd-debuginfo-8.4.4-4.el6.x86_64.rpm
/root/rpmbuild/RPMS/x86_64/drbd-km-2.6.32_504.el6.x86_64-8.4.4-4.el6.x86_64.rpm
/root/rpmbuild/RPMS/x86_64/drbd-pacemaker-8.4.4-4.el6.x86_64.rpm
 
H.进入/root/rpmbuild/RPMS/x86_64,执行
yum install *.rpm即可
 
ps:如果有些依赖包找不到,有可能得加入oracle的源:

Oracle Linux 7

# cd /etc/yum.repos.d
# wget http://public-yum.oracle.com/public-yum-ol7.repo

Oracle Linux 6

# cd /etc/yum.repos.d
# wget http://public-yum.oracle.com/public-yum-ol6.repo

Oracle Linux 5

# cd /etc/yum.repos.d
# wget http://public-yum.oracle.com/public-yum-el5.repo

Oracle Linux 4, Update 6 or Newer

# cd /etc/yum.repos.d
# mv Oracle-Base.repo Oracle-Base.repo.disabled
# wget http://public-yum.oracle.com/public-yum-el4.repo

Oracle VM 2

# cd /etc/yum.repos.d
# wget http://public-yum.oracle.com/public-yum-ovm2.repo