2
edits
Changes
New page: To create a centos 5 minimal template from centos-4-i386-minimal follow the next steps: 1 - Create a vps using centos-4-i386-minimal and set a valid nameserver <pre> vzctl create VEID --...
To create a centos 5 minimal template from centos-4-i386-minimal follow the next steps:
1 - Create a vps using centos-4-i386-minimal and set a valid nameserver
<pre>
vzctl create VEID --ostemplate centos-4-i386-minimal --config CONFIG_TEMPLATE
--ipadd VPS_IP --hostname temp
vzctl set VEID --nameserver NAMESERVER_IP --save
</pre>
2 - Enter in VPS
<pre>
vzctl enter VEID
</pre>
3 - Install centos-5-release packages
<pre>
rpm -Uvh http://mirror.centos.org/centos/5.0/os/i386/CentOS/centos-release-5-0.0.el5.centos.2.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/5.0/os/i386/CentOS/centos-release-notes-5.0.0-2.i386.rpm
</pre>
4 - Backup your /dev/, since initscripts need udev and will remove vzdev you'll net the backup
<pre>
tar -cf dev.tar ./dev
</pre>
5 - Install initscripts package (forced and with no deps)
<pre>
rpm -Uvh http://mirror.centos.org/centos/5.0/os/i386/CentOS/initscripts-8.45.14.EL-1.el5.centos.1.i386.rpm --force --nodeps
</pre>
6 - Exit from VPS
<pre>
exit
</pre>
7 - Upgrade vps packages using vzyum (32bit only)
<pre>
vzyum VEID upgrade
</pre>
8 - Stop your VE
<pre>
vzctl stop VEID
</pre>
9 - Replace the new /dev/ with the old one
<pre>
cd /vz/private/VEID
rm -rf dev
tar -xvf dev.tar
</pre>
10 - Leave the vps private dir (or it will not stard)
<pre>
cd
</pre>
11 - Start the VPS
<pre>
vzctl start VEID
</pre>
12 - Remove VPS IP
<pre>
vzctl set --ipdel VPS_IP
</pre>
13 - Stop VPS
<pre>
vzctl stop VEID
</pre>
14 - Create the template
<pre>
cd /vz/private/VEID
tar -zcf /vz/template/cache/centos-5.0-i386-minimal.tar.gz .
</pre>
1 - Create a vps using centos-4-i386-minimal and set a valid nameserver
<pre>
vzctl create VEID --ostemplate centos-4-i386-minimal --config CONFIG_TEMPLATE
--ipadd VPS_IP --hostname temp
vzctl set VEID --nameserver NAMESERVER_IP --save
</pre>
2 - Enter in VPS
<pre>
vzctl enter VEID
</pre>
3 - Install centos-5-release packages
<pre>
rpm -Uvh http://mirror.centos.org/centos/5.0/os/i386/CentOS/centos-release-5-0.0.el5.centos.2.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/5.0/os/i386/CentOS/centos-release-notes-5.0.0-2.i386.rpm
</pre>
4 - Backup your /dev/, since initscripts need udev and will remove vzdev you'll net the backup
<pre>
tar -cf dev.tar ./dev
</pre>
5 - Install initscripts package (forced and with no deps)
<pre>
rpm -Uvh http://mirror.centos.org/centos/5.0/os/i386/CentOS/initscripts-8.45.14.EL-1.el5.centos.1.i386.rpm --force --nodeps
</pre>
6 - Exit from VPS
<pre>
exit
</pre>
7 - Upgrade vps packages using vzyum (32bit only)
<pre>
vzyum VEID upgrade
</pre>
8 - Stop your VE
<pre>
vzctl stop VEID
</pre>
9 - Replace the new /dev/ with the old one
<pre>
cd /vz/private/VEID
rm -rf dev
tar -xvf dev.tar
</pre>
10 - Leave the vps private dir (or it will not stard)
<pre>
cd
</pre>
11 - Start the VPS
<pre>
vzctl start VEID
</pre>
12 - Remove VPS IP
<pre>
vzctl set --ipdel VPS_IP
</pre>
13 - Stop VPS
<pre>
vzctl stop VEID
</pre>
14 - Create the template
<pre>
cd /vz/private/VEID
tar -zcf /vz/template/cache/centos-5.0-i386-minimal.tar.gz .
</pre>