OpenVZ Forum


Home » General » Support » How to create a full template for centos
Re: How to create a full template for centos [message #21230 is a reply to message #21115] Wed, 03 October 2007 15:37 Go to previous messageGo to previous message
dowdle is currently offline  dowdle
Messages: 261
Registered: December 2005
Location: Bozeman, Montana
Senior Member
With the CentOS metadata package, you can create your own OS Template. You don't have to go with the stock stuff that it installs when you create it, just edit the following file and add the packages you want in the OS Template you create:

/vz/template/centos/{version}/{arch}/config/default.list

To change what goes in the minimal, you can edit:

/vz/template/centos/{version}/{arch}/config/minimal.list

Once you have the packages you want (and it'll figure out all of the dependencies), just use the vzpkgcache command to build your template.

That's how you build an OS Template with what you want in it.

Another way, it to create a VPS from the stock template or a pre-created template... and install and configure it just the way you like it... and then stop the VPS... and then tar.gz up the private dir (such that it doesn't contain any file references above it's own root)... and then copy that .tar.gz file to your /vz/template/cache directory... and bingo... you have a new OS template.

If you have local/LAN copies of the CentOS repos and want to make your OS template builds faster and use less bandwidth, you can edit the following file:

/vz/template/centos/{version}/{arch}/config/yum.conf

Just comment out the stock mirror or baseurl lines and put in your own. You can also add additional repos.

The most recent release by Steve (a community member) of the CentOS-5 metadata package will save your VPS from accidentally installing udev (and removing vzdev) which usually renders the VPS unusable... so make sure you find the latest metadata package he posted here in the forum. I don't have the URL handy but you can search for it. I don't think his package has been added to the OpenVZ project download section.

Any other questions?


--
TYL, Scott Dowdle
Belgrade, Montana, USA
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Host OS and OpenVZ Kernel matching
Next Topic: *SOLVED* Easy way to create templates from iso packages
Goto Forum:
  


Current Time: Mon Sep 09 20:22:34 GMT 2024

Total time taken to generate the page: 0.04446 seconds