Create your own YUM repository and your own YUM Repository

Source: Internet
Author: User

Create your own YUM repository and your own YUM Repository

Link: http://blog.csdn.net/kongxx/article/details/43917065


Today, let's talk about how to release your own software, install and update the YUM source.

1. first, assume that our application is named helloworld (you can refer to simple RPM package creation to create two versions of helloworld installation RPM package, helloworld-1.0.0-1.el6.x86_64.rpm and helloworld-1.0.0-2.el6.x86_64.rpm, where the second rpm package is the first upgrade package)

2. Create a YUM Repository
sudo mkdir -p /var/www/html/yum_repo/my/Packagessudo cp helloworld-1.0.0-1.el6.x86_64.rpm /var/www/html/yum_repo/my/Packages/;cd /var/www/html/yum_repo/my/Packages; sudo createrepo .sudo /etc/init.d/httpd start

3. Create a new file/etc/yum. repos. d/my. repo On the test machine. The content is as follows:

[my]name=mybaseurl=http://<repos_host>/yum_repos/my/Packagesenabled=1gpgcheck=0priority=1

<Repos_host> indicates the machine name or IP address of the YUM source.


4. update local YUM Cache
sudo yum clean allsudo yum makecache

5. query the helloworld Application
sudo yum list helloworldsudo yum search helloworld

6. Install the application
sudo yum install helloworld

Then run helloworld to test

7. Update the application

7.1 first update the RPM package in the YUM repository, copy the helloworld-1.0.0-2.el6.x86_64.rpm to the/var/www/html/yum_repo/my/Packages directory, and then delete the old version of the rpm package. Finally, run the following command to update the repository.
cd /var/www/html/yum_repo/my/Packagessudo createrepo .

7.2 update helloworld on the client

sudo yum clean allsudo yum makecachesudo yum update helloworld



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.