|
|
Re: Can I create a template from an updated VPS? [message #2154 is a reply to message #2149] |
Thu, 23 March 2006 01:41 |
|
dowdle
Messages: 261 Registered: December 2005 Location: Bozeman, Montana
|
Senior Member |
|
|
You can also update your template package list and then do a vzpkgcache -f template-name... which will dump your old .tar.gz cache template a build a new one from scratch using the updated package list.
For example, speaking about CentOS 4, I wanted to add mc, system-config-date, links, and yum to the default packages so I edited:
/vz/template/centos/4/i386/config/default.list
I added the desired packages to the bottom of the list. Then I ran:
vzpkgcache -f centos-4
It built a new /vz/template/cache/centos-4-i386-default.tar.gz template cache.
Since I hadn't previously removed the packages downloaded during previous vzpkgcache runs (stuff under /vz/template/centos/4), it only had to download the additional packages along with any required dependencies... from which it created a new template .tar.gz file.
Now when I create a new VPS, it includes the additional packages.
Of course, if you were talking about other things besides just packages (altered configs, log files, stuff under /home or in /etc/skel etc), then your way would be the way to go.
Just curious... what kinda stuff were you talking about?
--
TYL, Scott Dowdle
Belgrade, Montana, USA
|
|
|
Re: Can I create a template from an updated VPS? [message #2159 is a reply to message #2154] |
Thu, 23 March 2006 06:47 |
|
Quote: | Of course, if you were talking about other things besides just packages (altered configs, log files, stuff under /home or in /etc/skel etc), then your way would be the way to go.
|
In that case, you can also stick to vzpkgcache, having three options:
1. Create and add your own RPMS to /vz/template/OSNAME/OSVERSION/ARCH/vz-addons/ directory (and run createrepo in it afterwards), then add those packages to some *.list file
2. Create your own yum repository and add it to /vz/template/OSNAME/OSVERSION/ARCH/config/yum.conf, then add those packages to some *.list file
2. Edit /vz/template/OSNAME/OSVERSION/ARCH/config/install-post (or install-pre, or update-post), adding some tweaks here. This is the way to go if you need to alter something left after installing RPMS, and you do not want to rebuild those RPMS.
Kir Kolyshkin
|
|
|