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