PDA

View Full Version : [SOLVED] add repository using ipv6


kenifanying
21st November 2010, 11:19 AM
hi guys,
I want to add repository using ipv6. So, I add a xxx.repo file in /etc/yum.repos.d/. Just like it:



[sjtu6]
name=Fedora $releasever - $basearch - ftp6.xxx.xxx.xxx
baseurl=ftp://ftp6.xxx.xxx.xxx/fedora/releases/$releasever/Everything/$basearch/os/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch



but it doesn't work. Who can give me some help?

glennzo
21st November 2010, 11:47 AM
What error messages are present?

kenifanying
21st November 2010, 11:48 AM

[Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: sjtu6. Please verify its path and try again

glennzo
21st November 2010, 11:50 AM
Well you're fast, eh? Not sure about this one as I don't play with FTP. Are you able to get into this IP address using normal ftp?


Meanwhile, how much have you done in preparation for this new repository? Have you populated the folder with files? Have you run createrepo?

kenifanying
21st November 2010, 11:54 AM
Yeah,I can get into it using firefox or lftp! What the error means?

glennzo
21st November 2010, 12:06 PM
While I think about this Google will tell you what the error means.

Meanwhile, how much have you done to prepare this new repository? Have you populated the folder with files and run createrepo?

kenifanying
21st November 2010, 12:12 PM
I cat't find any useful topic about that by google search.yum couldn't use ipv6 repository ?

glennzo
21st November 2010, 12:21 PM
Not sure about IPV6. Have you done the other things yet? Populate the folder and run createrepo?

kenifanying
21st November 2010, 12:39 PM
I feel that ipv6 repository is faster than ipv4 repository when I use wget or lftp. So, I disabled all other repository. Then, I created a xxx.repo file in /etc/yum.repos.d/. When I use yum to make cache,it doesn't work! I try google and search related topic in docs.fedoraproject.org documentation.Nothing has been found! Sorry for my bad English. Thanks!

glennzo
21st November 2010, 12:58 PM
You need to do this first.

* Create a folder that will become the repository folder.
* Populate that folder with files.
* Install and run createrepo so that all of the metadata is created.
* Set up a repository file that points to the location of this new repository.
* Test the repository.
* Troubleshoot the repository if necessary.

You can't just create a repo file and expect it to magically work.

kenifanying
21st November 2010, 01:05 PM
:p I don't kown how to do. Could you help me step by step?

glennzo
21st November 2010, 01:10 PM
I'm creating a local repository as we speak, just for kicks. Here's the steps I've taken so far, as I'm not finished.

1. Copy the files (since I already had them downloaded). This command is all relevant to the folder structure on my computer.
cp -R /media/sata500/fedora14/* /media/FreeAgent/fedora14/
2. Run createrepo against the folder.
createrepo fedora14
(This is a long operation, as was the file copy, so I'm currently waiting on this to finish). If you don't have createrepo installed then first install it with
su -c 'yum install createrepo'
Then run it as described above.

While I'm waiting for createrepo to finish I'll go ahead and create a .repo file and add content.
su -c 'vi /etc/yum.repos.d/test.repo'
This is the content that I hope will provide a working repository.
#Testing only.
[test]
Name=Test - $releasever - $basearch - Testing Only!
baseurl=file:///media/FreeAgent/fedora14/
enabled=0


By the way, this is a local repository. No Internet or network involved.

glennzo
21st November 2010, 01:13 PM
All done, and it works.
[root@phenom14 ~># yum --enablerepo=test repolist
Loaded plugins: fastestmirror, langpacks, presto, refresh-packagekit
Adding en_US to language list
Loading mirror speeds from cached hostfile
* fedora: mirror.seas.harvard.edu
* rpmfusion-free: mirror.liberty.edu
* rpmfusion-free-updates: mirror.liberty.edu
* rpmfusion-nonfree: mirror.liberty.edu
* rpmfusion-nonfree-updates: mirror.liberty.edu
* updates: mirror.seas.harvard.edu
test | 1.3 kB 00:00 ...
test/primary | 6.5 MB 00:00 ...
test 17761/17761
repo id repo name status
adobe-linux-i386 Adobe Systems Incorporated 18
fedora Fedora 14 - i386 17,761+122
fedora-compiz-fusion Latest version of compiz fusion + some extras 3
glennz-repo Fedora 14 - i386 - glennz-repo 17,761
google-chrome google-chrome 3
rpmfusion-free RPM Fusion for Fedora 14 - Free 364
rpmfusion-free-updates RPM Fusion for Fedora 14 - Free - Updates 364
rpmfusion-nonfree RPM Fusion for Fedora 14 - Nonfree 176
rpmfusion-nonfree-updates RPM Fusion for Fedora 14 - Nonfree - Updates 187
test Test - 14 - i386 - Testing Only! 17,761
updates Fedora 14 - i386 - Updates 2,123+104
virtualbox Fedora 14 - i386 - VirtualBox 1
repolist: 56,522
Why don't you try this before you go messing with http or ftp? At least you will get a feel for how this all works.

kenifanying
21st November 2010, 01:14 PM
Thanks! I will try it immediately!

glennzo
21st November 2010, 01:22 PM
Keep me posted. If you get the local repository working then we can move on to bigger and better things.

kenifanying
21st November 2010, 02:06 PM
glennzo,
:D Now everything is OK! What should I do next?

glennzo
21st November 2010, 03:04 PM
Dunno. Where are you at? What works and what doesn't? What have you done so far?

kenifanying
22nd November 2010, 07:06 AM
I do as you say . And I get the local repository working .But the ipv6 repository is still can not work. So, What should I do next?:)

glennzo
22nd November 2010, 09:09 AM
To be honest, I have no idea why it doesn't work with FTP and IPV6. I do know that IPV6 has been know to cause problems with yum, but that may only apply to the actual Fedora repositories.

kenifanying
22nd November 2010, 10:32 AM
:)Thanks you!

kenifanying
11th December 2010, 02:44 AM
To be honest, I have no idea why it doesn't work with FTP and IPV6. I do know that IPV6 has been know to cause problems with yum, but that may only apply to the actual Fedora repositories.

:)hi,
It's so happy that I can use the ipv6 repository now. I ask people everywhere and this problem has been solved last night. I updated the "curl" package to lasest version.Then, everything is OK. Maybe the “curl" package cause the problem. I think yum depends on curl. I hope this thread can help some people that have the same problem.
Finally, thanks for any reply!