Customized rpm package --- Yum environment building, customized rpm --- yum Building
1.1 create a yum repository command on the yum Server
1 mkdir -p /application/nginx/html/yum2 cd /application/nginx/html/yum
Rz # upload rpm packages to this directory
1.2 install the createrepo Software
1 yum install createrepo -y
1.3 initialize the repodata index file
1 createrepo -pdo /application/nginx/html/yum/ /application/nginx/html/yum/
1.4 yum Service
1 # web services can be provided using Apache or nginx, but http modules using Python are simpler and suitable for Intranet Environments (nginx is used here) 2 cd/application/nginx/html/yum/3 python-m SimpleHTTPServer 80 &>/dev/null &
1.5 Add a new rpm package
1 # Only download software do not install 2 yumdownloader pcre-devel openssl-devel3 createrepo -- update/application/nginx/html/yum/4 # Every added to an rpm package will be updated.
1.6 client Configuration
1 cd/etc/yum. repos. d 2 [root @ test yum. repos. d] # cat znix. repo 3 [znix] 4 name = Server 5 baseurl = http: // 10.0.0.250/yum/6 enable = 1 7 gpgcheck = 0 8 yum -- enablerepo = znix -- disablerepo = base, extras, updates, epel list 9 10 # specify to use the znix Library
When adding a yum source, you only need to add a new repo file.
1.7 then you can use yum to install the software package.