码迷,mamicode.com
首页 > 其他好文 > 详细

CentOS 6安装mock

时间:2014-09-09 12:06:58      阅读:255      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   os   使用   ar   strong   for   

最近工作中需要用到mock,这里介绍两种安装方式。本文的环境为CentOS 6.4 x86_64。

一,使用yum安装mock

安装第三方yum源RPMForge

Centos5 64位  wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.x86_64.rpm
Centos5 32位  wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.i386.rpm
Centos6 64位  wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
Centos6 32位  wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm

安装下载回来的rpm包

yum install rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm

安装mock

yum install mock

二,使用rpmbuild方式安装mock

1,安装基础包:

yum install rpm-build python python-devel python-decoratortools libxml2-python python-deltarpm make gcc gcc-c++ wget yum-utils zlib zlib-devel ncompress

2,使用rpmbuild方式安装pigz(应该是个压缩工具,依赖zlib zlib-devel ncompress)

cd /root
wget http://mirrors.163.com/fedora/releases/19/Everything/source/SRPMS/p/pigz-2.2.5-2.fc19.src.rpm
useradd mockbuild
rpm -ivh pigz-2.2.5-2.fc19.src.rpm
cd rpmbuild/SPECS
rpmbuild -ba pigz.spec
rpm -ivh ../RPMS/x86_64/pigz-2.2.5-2.el6.x86_64.rpm

3,使用rpmbuild方式安装creatrepo

cd /root
wget http://createrepo.baseurl.org/download/createrepo-0.9.9-1.src.rpm
useradd skvidal
rpm -ivh createrepo-0.9.9-1.src.rpm
cd rpmbuild/SPECS
rpmbuild -ba createrepo.spec
rpm -ivh ../RPMS/noarch/createrepo-0.9.9-1.noarch.rpm

4,使用rpmbuild方式安装mock

cd /root
wget http://mirrors.163.com/fedora/releases/19/Everything/source/SRPMS/m/mock-1.1.32-1.fc19.src.rpm
rpm -ivh mock-1.1.32-1.fc19.src.rpm
cd rpmbuild/SPECS
rpmbuild -ba mock.spec
rpm -ivh ../RPMS/noarch/mock-1.1.32-1.el6.noarch.rpm

 

CentOS 6安装mock

标签:style   blog   http   color   os   使用   ar   strong   for   

原文地址:http://www.cnblogs.com/wpjamer/p/3961984.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!