OpenVZ Forum


Home » General » Support » VPS template for Redhat Enterprise Linux 4
VPS template for Redhat Enterprise Linux 4 [message #389] Sun, 20 November 2005 02:38 Go to next message
Eric Sammons is currently offline  Eric Sammons
Messages: 10
Registered: November 2005
Junior Member
Has anyone created a template for RHEL 4? if so I would appreciate any and all assistance. With the lack of documentation on the topic of creating templates I have not been able to figure out how to create my own.

Thanks!
Re: VPS template for Redhat Enterprise Linux 4 [message #394 is a reply to message #389] Mon, 21 November 2005 03:12 Go to previous messageGo to next message
che2cbs is currently offline  che2cbs
Messages: 5
Registered: November 2005
Location: Virgina
Junior Member
Eric,

I think this is a deceptively simple four step process:

1) Make a copy of the directory tree /vz/template/fedora-core as /vz/template/rhel. Also, change the version and arch directory names under /vz/template/rhel if necessary.

2) Clean out /vz/template/rhel/4/i386/yum-cache

3) Create your *.list files in /vz/template/rhel/4/i386/config to contain the packages you want (don't worry about dependencies since yum will handle that for you). For every .list file in the config directory vzpkgcache will build a cache file (see get_all_os_templates() in /usr/share/vzpkg/functions). One template can produce multiple cache files each suited for different purposes. You could have an ldap.list, mysql.list, etc. IOW, it looks like you only need a different template for each distro or version of a distro.

4) Run vzpkgcache and then use 'vzctl create ...' to install it into a VPS

Now the trick is figuring out what packages should be in your .list file. Here's my question: Are there any packages that will cause a VPS to fail? Does it matter if the kernel, grub or the like get installed into a VPS? My gut reaction is no, since they'll never actually be used but I'm not sure. If that's the case then you can use the list of packages installed on any RHEL4 box to create your .list file.

BTW, I haven't tried any of this yet since I don't have access to the RHEL4 media Rolling Eyes

--Chris
Re: VPS template for Redhat Enterprise Linux 4 [message #395 is a reply to message #389] Mon, 21 November 2005 05:32 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

CentOS 4 is basically the same as RHEL 4, so you'd better start with it. The problem with RHEL4 is binary RPMS are not available (unless you bought a CD), so there is no template for RHEL.

Still, if you do have RHEL4 binary rpms you can put them to some directory, run createrepo on it and then take CentOS 4 template, copy it to /vz/template/rhel/4/ directory as it was suggested above, and then change /vz/template/rhel/4/i386/config/yum.conf to point to that directory with RHEL 4 rpms.


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: VPS template for Redhat Enterprise Linux 4 [message #402 is a reply to message #395] Mon, 21 November 2005 12:33 Go to previous messageGo to next message
Eric Sammons is currently offline  Eric Sammons
Messages: 10
Registered: November 2005
Junior Member
Where is the command createrepo? Curious I didn't come across it on my system.

Thanks
Re: VPS template for Redhat Enterprise Linux 4 [message #403 is a reply to message #389] Mon, 21 November 2005 13:11 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

I and che2cbs have said above how to create RHEL4 template. It is as easy as (1) providing a repository of RHEL4 packages and (2) copying centos4 template metadata and changing it's yum.conf to point to the repository you have created on during step 1.

The thing is, RHEL 4 binary packages are not legally available for anyone (they are just for those who have bought RHEL4), and there is no network repository of RHEL 4 available. That is the problem, and that is why we do not have RHEL 4 template.

But instead we have CentOS 4; if you don't know CentOS 4 is RHEL 4 recompiled from source RPMS (which are available).

So, you have two options
(a) use CentOS 4
(b) create rhel4 repository and then template.

(b) is quite an easy thing to do, but the only way I can help you with doing that is providing an instructions of how it can be done, which I already did. Surely if you will come across any problem we are here to help.


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: VPS template for Redhat Enterprise Linux 4 [message #404 is a reply to message #395] Mon, 21 November 2005 13:54 Go to previous messageGo to next message
Eric Sammons is currently offline  Eric Sammons
Messages: 10
Registered: November 2005
Junior Member
Disregard my other reply, createrepo is a package in the Fedora distro.

Thank you!
Re: VPS template for Redhat Enterprise Linux 4 [message #405 is a reply to message #389] Mon, 21 November 2005 14:10 Go to previous message
Eric Sammons is currently offline  Eric Sammons
Messages: 10
Registered: November 2005
Junior Member
I have create a RHEL 4.0 AS edition template. Works great thanks Kir... I used fedora Core 4 as my list.
Previous Topic: Sync'ing between servers
Next Topic: /proc/vz/vestat
Goto Forum:
  


Current Time: Thu May 09 23:46:27 GMT 2024

Total time taken to generate the page: 0.01507 seconds