LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-25-2013, 01:10 PM   #1
sagar666
Member
 
Registered: Feb 2013
Posts: 212

Rep: Reputation: Disabled
yum repository not working


hi I configured yum repository like below

1. copies all packages to /var/ftp/pub*

2 rpm -ivh vsftpd*

3. rpm -ivh delta*

4. rpm -ivh createrepo*

5. vi /etc/yum.repos.d/server.repo

[yum-server]
name= This is my RPM store
baseurl=file:///var/ftp/pub/
enable=1
gpgcheck=0

6. createrepo -v /var/ftp/pub

7. yum clean all


After doing all this seps am getting following errors

1.[root@srikar /]# yum update
Loaded plugins: product-id, subscription-manager
Updating Red Hat repositories.
server | 1.3 kB 00:00 ...
server/primary | 238 kB 00:00 ...
server 962/962
Setting up Update Process
No Packages marked for Update

2.[root@srikar /]# yum install cron*
Loaded plugins: product-id, subscription-manager
Updating Red Hat repositories.
Setting up Install Process
Nothing to do.

Please help me out
 
Old 03-25-2013, 01:27 PM   #2
rayfordj
Member
 
Registered: Feb 2008
Location: Texas
Distribution: Fedora, RHEL, CentOS
Posts: 488

Rep: Reputation: 78
I believe the option is 'enabled', not 'enable' in your server.repo. If changing that doesn't work, see if the repo shows up under a 'yum repolist'.

Code:
yum repolist all
Code:
yum repolist enabled
Code:
yum repolist disabled
Maybe that'll provide clues and we can work from there to identify solution.
 
Old 03-25-2013, 02:37 PM   #3
sagar666
Member
 
Registered: Feb 2013
Posts: 212

Original Poster
Rep: Reputation: Disabled
hi rayfordj

1.

[root@srikar /]# yum repolist all
Loaded plugins: product-id, subscription-manager
Updating Red Hat repositories.
repo id repo name status
server This is my RPM store enabled: 962
repolist: 962


2.

[root@srikar /]# yum repolist enabled
Loaded plugins: product-id, subscription-manager
Updating Red Hat repositories.
repo id repo name status
server This is my RPM store 962
repolist: 962

but i try to install any package that are in yum list all it gives following error

[root@srikar /]# yum install rsync.i686
Loaded plugins: product-id, subscription-manager
Updating Red Hat repositories.
Setting up Install Process
Nothing to do
[root@srikar /]#
 
Old 03-25-2013, 05:00 PM   #4
rayfordj
Member
 
Registered: Feb 2008
Location: Texas
Distribution: Fedora, RHEL, CentOS
Posts: 488

Rep: Reputation: 78
Is the package already installed?
Code:
yum list rsync
If so, try with something that isn't already installed. You can use 'yum list packagename' or 'rpm -q packagename' to determine if what you want to install is already installed or not. Depending on if you performed an @everything install or not, may take a few attempts... or you can look at
Code:
yum list
output and pick something.

Code:
yum list available
Maybe try with iptraf.
Code:
yum install iptraf
I've used in on occasion to demonstrate or test package installations as it's often not pre-installed on the systems I've been on.
 
Old 03-26-2013, 12:09 PM   #5
sagar666
Member
 
Registered: Feb 2013
Posts: 212

Original Poster
Rep: Reputation: Disabled
I delete all my old configuration and configured newly

-->mount the media to /media

-->cp -rf /media /var/ftp/pub

-->cd /var/ftp/pub

-->createrepo -v Packages

-->vi /etc/yum.repos.d/myrepo.repo

[rhel6]
name=rpm
baseurlr=file:///var/ftp/pub/Packages
enabled=1
gpgcheck=0

:wq

# yum clean all

but showing zero repolist

[root@srikar pub]# yum repolist all
Loaded plugins: product-id, subscription-manager
Updating Red Hat repositories.
repo id repo name status
rhel6 rpm enabled: 0
repolist: 0

Note : i already installed

vsftpd, delta , createrepo

Last edited by sagar666; 03-26-2013 at 12:11 PM.
 
Old 03-28-2013, 02:26 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
On the server try this https://code.google.com/p/iredmail/w...Yum_Repository
 
Old 03-28-2013, 06:35 AM   #7
jitendra.sharma
Member
 
Registered: Mar 2013
Location: ahmedabad
Distribution: CentOS, Ubuntu, Debian
Posts: 92
Blog Entries: 1

Rep: Reputation: Disabled
you can make your own repository via ftp services: ...

=> First mount your cd
#mount /dev/cdrom /mnt

=> Move on Mounted packages location -
#cd /mnt/CentOS

=> Install these two packages -
#rpm -ivh createrepo*
#rpm -ivh vsftpd*

#service vsftpd restart
#chkconfig vsftpd on

=> Then copy all packages to your ftp defaults location-
#cp -rv /mnt/CentOS /var/ftp/pub/

=> then go to the packages location-
#cd /var/ftp/pub/CentOS/

=> Type command to create repository database
#createrepo .

=> Then configure yum.repo file
#vim /etc/yum.repos.d/yum.repo

[yum]
name=yumserver
baseurl=ftp://"type your server ip"/pub/CentOS
enabled=1
gpgcheck=0

#yum clean all; yum list all


@@@@@@@@@ yum enables with firewall @@@@@@@@

=> edit the following file
#vim /etc/sysconfig/iptables-config

-> add the line
#IPTABLES MODULES = "ip_conntrack_ftp ip_nat_ftp"

-> save the file

#service iptables restart

Last edited by jitendra.sharma; 03-28-2013 at 06:36 AM.
 
Old 04-23-2013, 02:35 AM   #8
JackHamm3r
LQ Newbie
 
Registered: May 2012
Distribution: OpenSUSE, Sabayon, RHEL
Posts: 23

Rep: Reputation: Disabled
Smile Try My Way

U missed out python-deltarpm package. Try My method (did it in RHEL6, and works flawless), and you'll need to be root for this.

1. Mount the disc, and install vsftpd

2. Create a folder in /var/ftp, and copy all the packages over there (let's assume the folder name is 'abc')

3. cd into folder in terminal, and
rpm -ivh deltarpm*
rpm -ivh python-deltarpm*
rpm -ivh createrepo

4. Then do the createrepo
createrepo /var/ftp/abc

this'll take a couple of minutes

5. Create the .repo file in /etc/yum.repos.d (any name you're free to choose, just mind the .repo extension, THIS IS NOT A HIDDEN FILE!)
The content should be like this

[REPOSITORY]
name=My Repository
baseurl=ftp://localhost/abc
enabled=1
gpgcheck=0


6. The restart and enable vsftpd service

# service vsftpd restart ; chkconfig vsftpd on

7. Clean the yum data
# yum clean all

8. Then do this
# yum repolist

This should make your repository up and running

This works great for me, and you can also share this repository with other computers in the network, all you have to do is create the .repo in their /etc/yum.repos.d, just in the baseurl, change 'localhost' into your own IP address, and in your computer, allow communication for FTP services from the firewall.

I hope this'll help you!

Last edited by JackHamm3r; 04-23-2013 at 03:36 AM. Reason: Typing error!
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
yum Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. glowe Linux - Newbie 8 01-13-2016 10:55 PM
yum repository not working on local computer. gardenair Linux - Server 8 03-17-2012 01:14 AM
yum fails with error: Cannot retrieve repository metadata (repomd.xml) for repository dmendonsa Fedora 6 02-10-2010 07:23 PM
Redhat 5.1 Yum Repository vs Fedora x.x Yum Repository lead2gold Linux - Software 1 05-22-2008 02:19 PM
finding working YUM repository for Mono tenn_eric Fedora 2 05-07-2005 02:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:00 PM.

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