LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 04-06-2016, 03:19 AM   #1
sco1984
Member
 
Registered: Sep 2005
Location: Pune, India
Distribution: openSUSE Leap
Posts: 137

Rep: Reputation: 15
Red face 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.
 
Old 04-06-2016, 04:51 AM   #2
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 525

Rep: Reputation: 95
Hi,

Disable the repos in CentOS-Base.repo by adding line enabled=no.
 
Old 04-06-2016, 05:15 AM   #3
sco1984
Member
 
Registered: Sep 2005
Location: Pune, India
Distribution: openSUSE Leap
Posts: 137

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by tshikose View Post
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.

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.
 
Old 04-07-2016, 05:44 PM   #4
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 525

Rep: Reputation: 95
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.
 
Old 04-08-2016, 10:30 AM   #5
dt64
Member
 
Registered: Sep 2012
Distribution: RHEL5/6, CentOS5/6
Posts: 218

Rep: Reputation: 38
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.
 
Old 04-14-2016, 07:39 PM   #6
helmet1980
Member
 
Registered: Apr 2016
Distribution: Debian
Posts: 40

Rep: Reputation: Disabled
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.
 
Old 04-14-2016, 07:53 PM   #7
helmet1980
Member
 
Registered: Apr 2016
Distribution: Debian
Posts: 40

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


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create my own yum group repository? nsampath Linux - Software 6 06-13-2013 10:42 AM
How to create Local YUM Repository? your_shadow03 Linux - Server 9 04-01-2012 10:25 AM
can i create a local yum repository? Sharaz Linux - General 5 01-21-2008 01:51 PM
How to create YUM repository with my RPMs (not mirror) kepkin Red Hat 2 08-01-2007 02:47 PM
Can I create a local yum repository without copying DVDs? Charlie Spencer Linux - Newbie 3 09-22-2006 07:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 07:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration