1752600 Members
4156 Online
108788 Solutions
New Discussion юеВ

Re: Linux Depots

 
SOLVED
Go to solution
brian_31
Super Advisor

Linux Depots

Greetings...

How do i make depots in linux? Similar to HP-UX swcopy -s (making depot from a source)and swlist -l depot (which would list the depots?)

Thanks & Regards

Brian.
4 REPLIES 4
Matti_Kurkela
Honored Contributor
Solution

Re: Linux Depots

Linux does not have depots.

Instead, Linux has software packages (in different formats, like .rpm and .deb) and package repositories.

For making the actual packages, you would use documentation like this:
http://tldp.org/HOWTO/RPM-HOWTO/

But your question seems more about package repositories.

In general, a package repository is essentially a directory or a specific directory hierarchy with the packages in it, often with some metadata added. The specific format depends on which package management tools you (or your Linux distribution of choice) is using.

Depending on your requirements, there might not even be a need to create a repository at all. In Linux, the basic package installation tools can accept multiple packages on the same command line:

RPM: (RedHat and a lot of other distros)
rpm -ivh foo.rpm bar.rpm baz.rpm

.deb: (Debian, Ubuntu etc.)
dpkg -i foo.deb bar.deb baz.deb

Also Linux package management tools usually won't force you to reboot in any case. Of course, when you install a new kernel package, you may have to reboot to start using it... but you get to do it on your own terms, at the time of your choice. This means installing multiple patches using separate commands is not a problem: unlike in HP-UX, there is no need to merge multiple packages into a single depot to get them all installed with just one reboot.

So if you're in a hurry, you can just create a directory, toss a bunch of package files into it and say "run the appropriate installation command (rpm -ivh *.rpm or dpkg -i *.deb, respectively) in it" and call it good.

But creating a proper package repository isn't that difficult either... at least if your Linux distribution is using the "yum" package manager:

http://www.cyberciti.biz/tips/redhat-centos-fedora-linux-setup-repo.html

In short:
- make a directory
- toss a bunch of RPM packages into it
- run the "createrepo" command on the directory to create the repository metadata
- make the directory accessible to your clients (make it available through a webserver or a FTP server, or share it over NFS, or whatever fits your requirements)
- write a small repository configuration file that tells yum where the repository is located (there are also GUI utilities that can simplify this step even further).

Creating a repository for .deb packages is a bit more involved, but there are tools to make it easier:

http://wiki.debian.org/HowToSetupADebianRepository

MK
MK
brian_31
Super Advisor

Re: Linux Depots

Thanks MK..

Thanks & Regards

Brian.
Tim Nelson
Honored Contributor

Re: Linux Depots

I did not read all of Matti's post but I am sure he said the same.

here is what I do.

OEL
I create an nfs respository with up2date and createrepo on my server and then configure yum to use only that.

RHEL
all servers have rhn plugin disabled, except one, and then yum is configured for NFS directory like above.

All details are available via rhel or oel (just google) or I can be more specific if needed.
dirk dierickx
Honored Contributor

Re: Linux Depots

using rpm you can even put your packages on a web or ftp server and get them directly from there without copying them over. this also works for other commands besides installing, you can query rpm packages remotely too.

check the rpm manpage, check the 'FTP/HTTP OPTIONS' section.

if you want to be a bit more advanced then that, depending on your needs you can create your own yum repository, documentation for that is available here:

http://yum.baseurl.org/wiki/RepoCreate

or use a more userfriendly web based tool from redhat called satellite (or the free oss version spacewalk), it does a lot more besides managing rpm packages though;

satellite: http://www.redhat.com/red_hat_network/moduledetail/

spacewalk: http://spacewalk.redhat.com/