Install mock in centos 6

Source: Internet
Author: User
Tags rpmbuild

Mock is required in recent work. Here we introduce two installation methods. The environment in this article is centos 6.4 x86_64.

1. Install mock using yum

Install a third-party Yum source rpmforge

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

Install the downloaded RPM package

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

Install mock

yum install mock

2. Install mock using rpmbuild

1. Install the basic package:

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. Install pigz using rpmbuild (it should be a compression tool dependent on zlib-devel ncompress)

cd /rootwget http://mirrors.163.com/fedora/releases/19/Everything/source/SRPMS/p/pigz-2.2.5-2.fc19.src.rpmuseradd mockbuildrpm -ivh pigz-2.2.5-2.fc19.src.rpmcd rpmbuild/SPECSrpmbuild -ba pigz.specrpm -ivh ../RPMS/x86_64/pigz-2.2.5-2.el6.x86_64.rpm

3. Use rpmbuild to install creatrepo

cd /rootwget http://createrepo.baseurl.org/download/createrepo-0.9.9-1.src.rpmuseradd skvidalrpm -ivh createrepo-0.9.9-1.src.rpmcd rpmbuild/SPECSrpmbuild -ba createrepo.specrpm -ivh ../RPMS/noarch/createrepo-0.9.9-1.noarch.rpm

4. Use rpmbuild to install mock

cd /rootwget http://mirrors.163.com/fedora/releases/19/Everything/source/SRPMS/m/mock-1.1.32-1.fc19.src.rpmrpm -ivh mock-1.1.32-1.fc19.src.rpmcd rpmbuild/SPECSrpmbuild -ba mock.specrpm -ivh ../RPMS/noarch/mock-1.1.32-1.el6.noarch.rpm

 

Install mock in centos 6

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.