Changes

Jump to: navigation, search

Creating a CentOS 5.0 Template

109 bytes added, 15:40, 27 October 2008
no edit summary
#: and copying the '''/etc/vz/conf/ve-vps.basic.conf-sample''' to '''/etc/vz/conf/50.conf'''.
#: '''NOTE''': 50 is the CTID for the container. You can choose any unused CTID on the OpenVZ server.
# Now create a new folder called '''/vz/template/centos/5.0/<ARCH>/config''' again where
#: <'''ARCH'''> represents the system architecture.
# Create a file in the folder called rpm and add the following line:
#: [main]
#:
#: cachedir=/vz/template/centos/5.0/<ARCH>/yum-cache/
#:
#: reposdir=/dev/null
#:
#: gpgcheck=1
# Copy '''/etc/vz/dists/centos-4.conf''' to '''/etc/vz/dists/centos-5.0conf'''.conf# Copy '''/vz/template/centos/4/i386/config/minimal.list''' to ''' /vz/template/centos/5/i386/config/minimal.list'''.# Change to the '''/vz/private/50''' folder and then run the command '''gunzip –dc /vz/template/cache/centos-5.0-<ARCH>-<DISTRO>-image.tar.gz | tar –xvf –''' to unpack the base image to the folder.
# Make sure you are in the '''/vz/private/50''' folder.
# Edit '''etc/shadow''' and remove the replace the '''root''' password with !! instead of the hashed value.
# Stop the container by typing '''vzctl stop 50'''.
# Make sure you are in the '''/vz/private/50''' folder.
# Finally, package up the new template by typing '''tar –czvf /vz/template/cache/centos-5.0-<ARCH>-<DISTRO>.tar.gz ./'''.
# The template is ready for use.
8
edits

Navigation menu