LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   CentOS (https://www.linuxquestions.org/questions/centos-111/)
-   -   How to create yum repository locally without having internet connectivity? (https://www.linuxquestions.org/questions/centos-111/how-to-create-yum-repository-locally-without-having-internet-connectivity-4175576800/)

sco1984 04-06-2016 03:19 AM

How to create yum repository locally without having internet connectivity?
 
Hello,

I am trying to create local repository of cent os 6.7 but struggling with repositories.

I did following but getting errors. [performed using SU]

- Did mounting of Cent OS 6.7 64bit iso in installed cent os 6.7
- Now created repo under /etc/yum.repos.d
- wrote following details in 'centosdvd.repo'
[customrepo]
name=customrepo
baseurl=file:///home/user/Documents/centos/repodata [also tried to give path till centos]
enabled=1

#yum clean all
#yum install createrepo

Error I am constantly getting as follows = Error: Cannot find a valid baseurl for repo: base
'CentOS-Base.repo' contains all default parameters. I did not touch this file.
Add-on: The machine don't have internet connectivity at all.

Any suggestions how to solve this issue?
Thanks in advance.

Regards,
Amey.

tshikose 04-06-2016 04:51 AM

Hi,

Disable the repos in CentOS-Base.repo by adding line enabled=no.

sco1984 04-06-2016 05:15 AM

Quote:

Originally Posted by tshikose (Post 5526941)
Hi,

Disable the repos in CentOS-Base.repo by adding line enabled=no.

Thanks for quick update.

For a quick work around, I removed all repo's from yum.repos.d & just kept my custom repo.
It worked. :D

But now the issue is, I am trying to 'yum install createrepo' & the Cent OS dvd don't have deltarpm & python-deltarpm packages :-/
Any solution/work around for this issue?

Regards,
Amey.

tshikose 04-07-2016 05:44 PM

Hi,

My recommandation was to disable the CentOS default repos, not to "remove" their /etc/yum.repos.d/*.repo files!

For having a local evolutive local repo, my recommandation is the yum-plugin-local package.
But for installing that you will need an Internet connection and to re enable the deleted CentOS repos.

Let me know if my suggestions are not clear to you.

dt64 04-08-2016 10:30 AM

you can use another machine with the same OS version installed to run yum with downloadonly plugin, then copy the files to your server and install them using yum --localinstall. This way you may get any software to your no-internet-box as you like.

helmet1980 04-14-2016 07:39 PM

Debian has DVDs to install packages off-line. Just execute the command "apt-cdrom add" while each dvd is mounted, the job is done one at a time, then you can install whatever software you want. Once the dvds are added to the repositories, you just have to mount the dvd that correspond to the package needed.

helmet1980 04-14-2016 07:53 PM

Watch this, it's easy to understand. https://www.youtube.com/watch?v=zBWTxDBXZj0


All times are GMT -5. The time now is 09:22 AM.