- Как скачать программу из репозитория Ubuntu из другого дистрибутива?
- How to download a file from repo, and install it later w/o internet connection?
- 1 Answer 1
- Example
- What’s the packages location
- What else about the package?
- How to download packages from a command-line given repository?
- 4 Answers 4
- How to download entire repository from CentOS /RHEL 7/8 for offline use?
- Install the required packages
- Download entire repository from CentOS 7
- Download entire repository from RHEL 7
- Related Posts
- 3 thoughts on “How to download entire repository from CentOS /RHEL 7/8 for offline use?”
- Red Hat Customer Portal
- Log in to Your Red Hat Account
- Red Hat Account
- Customer Portal
- Select Your Language
- How to use yum to download a package without installing it
- Environment
- Issue
- Resolution
- Downloadonly plugin for yum
- Yumdownloader
- 30 Comments
Как скачать программу из репозитория Ubuntu из другого дистрибутива?
Собственно сабж. Я использую Slackware.
Вчера на одном ноуте с KUbuntu установил AceStream, всё запустилось с первого раза. Сейчас эту же программу хочу установить себе на слаку, но как скачать из репозитория не знаю. Есть прямая ссылка (http://torrentstream.org/downloads/linux/test/acestream-local_2.0.0_i386.deb), но скачивается старый пакет (устанавливаются другие файлы).
В общем, если кто знает, то «направьте стопы идущего».
Я правильно понимаю, что речь идёт о проприетарной фигне и не об официальных репозиториях Убунты, а о репах этой проприетарной фигни?
Тогда я бы не советовал спрашивать, как поставить «программу от Убунту на Slackware», а «как поставить AceStream на Slackware». Всё равно пакет deb на Слаке не установится (или установится?), и сборка для Убунты на Слаке, скорее всего, не запустится.
Как скачать программу из репозитория Ubuntu
Также apt-get, ЕМНИП, умеет скачивать .deb пакеты: $ apt-get download $PKG_NAME
эту же программу хочу установить себе на слаку
Логичней было бы смотреть в репозиториях искать пакет для своего дистрибутива.
Я спрашиваю вообще, для этой программы и не только.
Deb-пакеты (Ubuntu/Debian) на слаку устанавливаются, вернее конвертируются из deb в tgz утилитой alien, правда возможной прядется отлавливать зависимости.
Ну, вообще вот тут есть ответ (см. раздел «How to download and verify individual packages by hand»):
http://askubuntu.com/questions/253728/how-to-safely-download-and-gpg-verify-a.
Все файлы должны быть доступны по HTTP, просто нужно скачивать по определённым путям.
Ну и, конечно, к официальным репам Убунты есть простой доступ через http://packages.ubuntu.com
Поиск по оф.репозиторию ничего не дал.
Это совершенно другая программа.
Поиск по оф.репозиторию ничего не дал.
Конечно не дал, им делать нечего что ли, только фигню проприетарную себе тянуть? Ты спрашивал в общем случае, я в общем и ответил.
Но ведь не они одни делают свои репозитории.
Пробовал запустить, но так и не получилось (возможно только у меня), но на оф.форуме писали что эта версия работает максимум минут 15 потом падает.
Пока текущая версия 2.1.6
доколе ЦА бубунты будет ставить себе слаку и арч?
Что бы поставить deb пакет в слаку, можно воспользоваться alien или makepkg.
Но я думаю, что вам будет проще поставить из tar.gz
(распаковывать в /usr, зависимости — python 2.6 и python-argparse)
Не, если уж так, то можно впилить deb2tgz и пересобрать по правилам, но это всё равно не есть хорошо.
Мой первый линукс был AltLinux, он у меня продержался несколько дней (т.к. не было ни знаний, не опыта работы с линуксом). Затем установил слаку 9.0 (на тот момент текущий релиз) и с того момента больше другого мне не нужно. Пробовал пользоваться убунто-подобными дистритутивами,но после слаки, — не кошерно это. Про alien знаю и пользовался (в третьем посте писал). А за ссылочку большой спасиб.
Спасибо! Как получить прямую ссылку было вообще не понятно.
Источник
How to download a file from repo, and install it later w/o internet connection?
Assuming that I want to install a program called leafpad later.
Currently the only way to install it is via:
but I want to save this and install it later without internet connection.
How can I grab it from the yum repo and save it to a folder and then install it later?
1 Answer 1
If you’re only interest is in downloading a package + its dependencies for offline installation you can use the tool yumdownloader . It’s part of the package yum-utils .
Example
The above command shows the graphical version of vim, gvim being installed. Notice that it checks to see if you have the necessary dependencies installed, if not then it will download them as well.
What’s the packages location
You can also find out what the URL of a given package would be using another tool included with yum-utils called repoquery . This is a fantastic tool and allows you to peer inside of repositories without having to download the packages that they offer.
NOTE: This URL is the URL from one of the repository mirrors, so it may change from run to run.
What else about the package?
You can use repoquery to answer these questions too:
What does a package require:
What does a package contain:
There’s more consult the man page for repoquery .
Источник
How to download packages from a command-line given repository?
It is not about the common download & install thing, what apt (aptitude, etc) does, it is a scripted download a package file.
I found the dget tool for this task, which works quite well. But, unfortunately, it doesn’t have any option to specify a different repository URL as it is given in the /etc/apt/sources.list .
Is it somehow possible? Actually, a dget -like functionality would be the best, but where I can also specify the repo URL.
P.s. thank you very much the scripts, but I would like to prefer a debian tool for this very simple task. It will be part of a buildscript, for external usage, and any unneeded complexity has intolerable collateral costs. It must be done by a debian tool.
P.s.2. Finally I solved this with updating the system-wide repos, and downloading the packages with dget . Thank you very much the scripts!
4 Answers 4
All the tools I can find use the local apt information (and hence repositories in /etc/apt/sources.list etc., as defined the last time apt-get update was run). It’s not too difficult to interpret the repository format though.
as pkgfilename , make them executable, and you can then download a package by running
If you need to handle repositories whose Packages files aren’t in canonical order ( Package before Filename ), you can use the following AWK script instead:
There’s no error-handling, that’s left as an exercise for the reader. There’s no signature verification either.
If you’re running a reasonably recent version of Debian or other distribution using apt, you can use apt-get for this. Put the following settings in a file called apt-get.conf to make it not use
Prepare some necessary files:
Then you can download packages to the current directory with
With old versions of apt-get that lack the download command, you can use
to download packages and their dependencies into apt-tmp/archives .
I don’t think what you’re trying to achieve is in line with the idea of having repos as such. The idea being, you’d have to add the repo to the repolist, and then install from it, etc.
It is possible to download a package manually (I do that quite often with RPM packages for Fedora), and install a package manually with the regular tools (in my case dnf ).
I usually use the URL from /etc/yum.repos.d/ .repo and then just browse with a browser, and download with wget . It should be analogous with DEB packages.
- Download package manually with a browser or wget
- Install with your package management client from cli.
If the repo is directly available online (which I don’t see why not), dnf understands when it is given a URL to an RPM package. I’m sure the equivalent Debian tool will do the same. So you’ll save yourself downloading the package with a browser or with wget .
As I understand it, you’r only interested in just downloading the packages. So in that case, I think using plain wget is the best way to go, etc.
Источник
How to download entire repository from CentOS /RHEL 7/8 for offline use?
Table of Contents
I have already written an article to download an individual rpm along with all it’s dependencies, in this article I will share the steps to download entire repository from CentOS / RHEL 7 to your local Linux node. To download the repository you will need one time active internet access .
Once the rpms are downloaded the you can configure a local repository with these rpms for offline usage. Although downloading (syncing) the entire repository content to local Linux node may take some time depending upon your internet speed and the content of the repository.
I have a node which is in a private network and does not has access to the Internet so I always have to go through a lot of trouble in case I have to install some additional rpm with multiple dependencies. Using this method I have created a local repository in my private network which helps me download required rpm without internet.
Install the required packages
First install the yum-utils and createrepo packages on the system which will be used for the syncing purpose:
Download entire repository from CentOS 7
On CentOS unlike RHEL you do not need to perform any additional subscription related activity to get the access to their repository. As soon as you install CentOS, you will find below list of repo files under /etc/yum.repos.d
Not all of these repositories will be in enable state, some of them may be in disable state. To check the currently active repos use below command
To download (or sync) a repository on CentOS/RHEL 7 use the below command
Here replace repo_id with the ID of the repository you wish to sync locally, for example in the below command I am syncing extras repo and downloading the rpms to /tmp
To have access to the group data for the newly synced repo, please run the createrepo command as follows:
Download entire repository from RHEL 7
First of all on RHEL 7 you must first register your node to the Red Hat Network.
Next check the list of entitlements to your ID
Once you know which entitlement suits your requirement, then attach the POOL ID for your system
Next enable all the repositories you wish to use. You can check all the subscribed repositories using the below command
Once you have the repo id which you wish to download use the same command as we use with CentOS 7
Here replace repo_id with the ID of the repository you wish to sync locally, for example in the below command I am syncing extras repo and downloading the rpms to /tmp
To have access to the group data for the newly synced repo, please run the createrepo command as follows:
Let us validate our repository
So now I can start using this repository offline.
Lastly I hope the steps from the article to download entire repository from CentOS /RHEL 7 to your local Linux node was helpful. So, let me know your suggestions and feedback using the comment section.
Related Posts
Didn’t find what you were looking for? Perform a quick search across GoLinuxCloud
If my articles on GoLinuxCloud has helped you, kindly consider buying me a coffee as a token of appreciation.
For any other feedbacks or questions you can either use the comments section or contact me form.
Thank You for your support!!
3 thoughts on “How to download entire repository from CentOS /RHEL 7/8 for offline use?”
Im still learning from you, as Im trying to reach my goals. I absolutely enjoy reading all that is written on your site.Keep the information coming. I loved it!
This is great!. How would you keep those offline repo’s up-to-date after the initial creation? Is there a method to only pull new updates once you have the initial sync?
You can use -n to only download the updated packages using reposync .
Источник
Red Hat Customer Portal
Log in to Your Red Hat Account
Your Red Hat account gives you access to your profile, preferences, and services, depending on your status.
If you are a new customer, register now for access to product evaluations and purchasing capabilities.
Need access to an account?
If your company has an existing Red Hat account, your organization administrator can grant you access.
Red Hat Account
Customer Portal
For your security, if you’re on a public computer and have finished using your Red Hat services, please be sure to log out.
Select Your Language
How to use yum to download a package without installing it
Environment
- Red Hat Enterprise Linux (RHEL) 7
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 5
Issue
- How do I use yum to download a package without installing it?
Resolution
There are two ways to download a package without installing it.
One is using the «downloadonly» plugin for yum, the other is using «yumdownloader» utility.
Downloadonly plugin for yum
Install the package including «downloadonly» plugin:
Run yum command with «—downloadonly» option as follows:
Confirm the RPM files are available in the specified download directory.
Note:
- Before using the plugin, check /etc/yum/pluginconf.d/downloadonly.conf to confirm that this plugin is «enabled=1»
- This is applicable for «yum install/yum update» and not for «yum groupinstall». Use «yum groupinfo» to identify packages within a specific group.
- If only the package name is specified, the latest available package is downloaded (such as sshd). Otherwise, you can specify the full package name and version (such as httpd-2.2.3-22.el5).
- If you do not use the —downloaddir option, files are saved by default in /var/cache/yum/ in rhel-
-channel/packages - If desired, you can download multiple packages on the same command.
- You still need to re-download the repodata if the repodata expires before you re-use the cache. By default it takes two hours to expire.
Yumdownloader
If downloading a installed package, «yumdownloader» is useful.
Install the yum-utils package:
Run the command followed by the desired package:
Note:
- The package is saved in the current working directly by default; use the —destdir option to specify an alternate location.
- Be sure to add —resolve if you need to download dependencies.
- Product(s)
- Red Hat Enterprise Linux
- Component
- yum
- Category
- Install
- Tags
- rhel_5
- rhel_6
- rhn
- yum
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
30 Comments
very useful information ..
ThankQ
You should mention that the yumdownloader utility is part of the yum-utils package, which is not installed by default (at least it wasn’t installed by default on my RHEL-5 system.)
Thanks for your feedback David.
Thank you for the info. yes very useful
Is there is anyway to download all the packages of RHEL 6. I want to create a local repository.
ThaneDC if you need the question answered quickly I would suggest posting this on discussions (https://access.redhat.com/site/discussions) or even asking someone in support. Otherwise I’ll try to have someone get back as soon as possible.
Hello ThaneDC Linux,
You can go to the Downloads section of the portal and, for each release you will fond a «Source» tab on the page where you download the binary ISO. Click on that tab and it will take you to a page where you can download the sources DVD. Here is the Red Hat Enterprise Linux 6 Update 5 page as an example.
Downloading the ISOs will give you the latest release. You can copy the CD’s contents to a web server and point a yum repo at the directories that contain a «repodata» subdirectory. For the RHEL7 DVD, that would be the disc’s root directory, addons/HighAvailability and addonsa/ResilentStorage.
If you want a repo with updates, then there are two choices:
The first option is that you can install all of the packages on a single computer. Then edit /etc/yum.conf to set the «keepcache» option to 1, so packages won’t be deleted after installation. You can copy all these packages to a common location and run «createrepo» (part of the yum-utils package) to make it into a repo that yum can use. Note that you can’t actually install every package, because there are some contradictions, but there aren’t many. If you want to delete redundant packages (e.g. if something has been updated more than once), you will have to do that by hand.
The second approach is to use the «reposync» utility (also from yum-utils) to mirror all the packages from RedHat repo to a local location (use «yum repolist» to get the correct name) and then use the «createrepo» utility to make a local repo from what you downloaded. This is probably easier than the first option, but you’ll end up downloading everything, including packages from your installation DVD, which you might already have in a different repo.
Источник