How to create local yum server, by
1:First create a folder name Server in /var/ftp/pub/
#mkdir -p /var/ftp/pub/Server
2: copy all the packages from the cd or dvd to /var/ftp/pub/Server
3: Once all the packages are copied in /var/ftp/pub/Server . We need
to run this command
#cd /var/ftp/pub
#createrepo -v Server/
4: After running the command go into the folder Server/ .You will be
able to see repodata folder
5: Go into to the folder and check whether four .xml files are
created.
6: Great that is it your yum repository is ready .
7: Now just start the ftp service
# service vsftpd restart
8:Now we need to edit the Yum configuration file
#cd /etc/yum.repos.d
9:Now we will edit the file
# vi rheldebug.info
10: Please edit remove all the lines and make this entry
[rhel-server]
name=
baseurl=ftp://< youripaddress >/pub/Server
enable = 1
gpgcheck = 0
save this file
Now run this command
#yum clean all
Thats it now the yum server is ready
for http service
just add the packages in /var/www/html/Server
follow step 3
restart the httpd service
make an entry in vi /etc/yum.repos.d/rheldebug.info
here in baseurl://http:///html/Server
and for ordinary yum
make this entry in vi /etc/yum.repos.d/rheldebug.info
baseurl://file:///
eg baseurl://file:///var/ftp/pub/Server
No comments:
Post a Comment