<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Chris Schuld&#039;s Blog &#187; OpenVZ</title>
	<atom:link href="http://chrisschuld.com/category/linux/openvz/feed/" rel="self" type="application/rss+xml" />
	<link>http://chrisschuld.com</link>
	<description>personal musings on the composition of software</description>
	<lastBuildDate>Mon, 30 Aug 2010 03:48:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Installing vzdump on CentOS 5.4 (32-bit)</title>
		<link>http://chrisschuld.com/2010/07/installing-vzdump-on-centos-5-4-32-bit/</link>
		<comments>http://chrisschuld.com/2010/07/installing-vzdump-on-centos-5-4-32-bit/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 07:04:45 +0000</pubDate>
		<dc:creator>Chris Schuld</dc:creator>
				<category><![CDATA[OpenVZ]]></category>

		<guid isPermaLink="false">http://chrisschuld.com/?p=344</guid>
		<description><![CDATA[There are a few items required for installing vzdump for OpenVZ on 32bit CentOS. First, make sure you read the installation post covering the 64bit install. Here are the commands for 32bit. Here is how you get vzdump on a clean version of 32bit CentOS (via the hostnode): rpm -ivh &#34;ftp://ftp.pbone.net/mirror/ftp.freshrpms.net/pub/freshrpms/pub/dag/redhat/el5/en/i386/RPMS.dag/cstream-2.7.4-3.el5.rf.i386.rpm&#34; wget http://dag.wieers.com/rpm/packages/perl-LockFile-Simple/perl-LockFile-Simple-0.206-1.el5.rf.noarch.rpm rpm -ivh [...]]]></description>
			<content:encoded><![CDATA[<p>There are a few items required for installing <a href="http://wiki.openvz.org/Backup_of_a_running_container_with_vzdump">vzdump</a> for <a href="http://wiki.openvz.org/Main_Page">OpenVZ</a> on 32bit CentOS.<br />
<span id="more-344"></span><br />
First, make sure you read the <a href="http://chrisschuld.com/2009/11/installing-vzdump-for-openvz-on-centos/">installation post covering the 64bit install</a>.  Here are the commands for 32bit.  Here is how you get vzdump on a clean version of 32bit CentOS (via the hostnode):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rpm <span style="color: #660033;">-ivh</span> <span style="color: #ff0000;">&quot;ftp://ftp.pbone.net/mirror/ftp.freshrpms.net/pub/freshrpms/pub/dag/redhat/el5/en/i386/RPMS.dag/cstream-2.7.4-3.el5.rf.i386.rpm&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>dag.wieers.com<span style="color: #000000; font-weight: bold;">/</span>rpm<span style="color: #000000; font-weight: bold;">/</span>packages<span style="color: #000000; font-weight: bold;">/</span>perl-LockFile-Simple<span style="color: #000000; font-weight: bold;">/</span>perl-LockFile-Simple-<span style="color: #000000;">0.206</span>-1.el5.rf.noarch.rpm
rpm <span style="color: #660033;">-ivh</span> perl-LockFile-Simple-<span style="color: #000000;">0.206</span>-1.el5.rf.noarch.rpm
<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">rm</span> perl-LockFile-Simple-<span style="color: #000000;">0.206</span>-1.el5.rf.noarch.rpm
rpm <span style="color: #660033;">-ivh</span> <span style="color: #ff0000;">&quot;http://chrisschuld.com/centos54/vzdump-1.2-6.noarch.rpm&quot;</span></pre></div></div>

<p>Make sure you add in the PERL5LIB in your export (see the <a href="http://chrisschuld.com/2009/11/installing-vzdump-for-openvz-on-centos/">64bit post</a>):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PERL5LIB</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>perl5<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://chrisschuld.com/2010/07/installing-vzdump-on-centos-5-4-32-bit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Re-number an OpenVZ Container from one CTID to another</title>
		<link>http://chrisschuld.com/2010/04/how-to-re-number-an-openvz-container-from-one-ctid-to-another/</link>
		<comments>http://chrisschuld.com/2010/04/how-to-re-number-an-openvz-container-from-one-ctid-to-another/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 00:31:54 +0000</pubDate>
		<dc:creator>Chris Schuld</dc:creator>
				<category><![CDATA[OpenVZ]]></category>

		<guid isPermaLink="false">http://chrisschuld.com/?p=359</guid>
		<description><![CDATA[Poor planning: I guess I am guilty. A few times I have needed to re-number an OpenVZ Container. You just need to know what your current CTID is (sourcecid) and your desired target CTID (targetcid). Here are the steps: sourcecid=100 targetcid=101 vzctl chkpnt ${sourcecid} --dumpfile /tmp/openvz-renumber-dump.${sourcecid} mv /etc/vz/conf/${sourcecid}.conf /etc/vz/conf/${targetcid}.conf mv /vz/private/${sourcecid} /vz/private/${targetcid} mv /vz/root/${sourcecid} /vz/root/${targetcid} [...]]]></description>
			<content:encoded><![CDATA[<p>Poor planning: I guess I am guilty.  A few times I have needed to re-number an OpenVZ Container.  You just need to know what your current CTID is (sourcecid) and your desired target CTID (targetcid).<br />
<span id="more-359"></span></p>
<p>Here are the steps:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">sourcecid</span>=<span style="color: #000000;">100</span>
<span style="color: #007800;">targetcid</span>=<span style="color: #000000;">101</span>
vzctl chkpnt <span style="color: #800000;">${sourcecid}</span> <span style="color: #660033;">--dumpfile</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>openvz-renumber-dump.<span style="color: #800000;">${sourcecid}</span>
<span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>vz<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${sourcecid}</span>.conf <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>vz<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${targetcid}</span>.conf
<span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>vz<span style="color: #000000; font-weight: bold;">/</span>private<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${sourcecid}</span> <span style="color: #000000; font-weight: bold;">/</span>vz<span style="color: #000000; font-weight: bold;">/</span>private<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${targetcid}</span>
<span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>vz<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${sourcecid}</span> <span style="color: #000000; font-weight: bold;">/</span>vz<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${targetcid}</span>
vzctl restore <span style="color: #800000;">${targetcid}</span> <span style="color: #660033;">--dumpfile</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>openvz-renumber-dump.<span style="color: #800000;">${sourcecid}</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://chrisschuld.com/2010/04/how-to-re-number-an-openvz-container-from-one-ctid-to-another/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting VPS Disk Space with OpenVZ the &#8220;easy way&#8221;</title>
		<link>http://chrisschuld.com/2009/11/setting-vps-disk-space-with-openvz-the-easy-way/</link>
		<comments>http://chrisschuld.com/2009/11/setting-vps-disk-space-with-openvz-the-easy-way/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 08:10:39 +0000</pubDate>
		<dc:creator>Chris Schuld</dc:creator>
				<category><![CDATA[OpenVZ]]></category>

		<guid isPermaLink="false">http://chrisschuld.com/?p=297</guid>
		<description><![CDATA[Disk space can be easily controlled via OpenVZ but I have yet to find anyone to actually explain what the heck to &#8220;really&#8221; do when you need to add more! Everything I have found about OpenVZ just explains the parameters and never shows you how to do it easily. When I need to adjust disk [...]]]></description>
			<content:encoded><![CDATA[<p>Disk space can be easily controlled via OpenVZ but I have yet to find anyone to actually explain what the heck to &#8220;really&#8221; do when you need to add more!  Everything I have found about OpenVZ just explains the parameters and never shows you how to do it easily.  When I need to adjust disk space on an VPS it is usually when I have someone beating up my ear on the phone or my IM so I needed a fast way to expand the disk without worrying about the details.</p>
<p>There are three parameters in OpenVZ which are directly related to disk usage.  They are <strong>disk_quota</strong>, <strong>diskspace</strong> and <strong>diskinodes</strong>.  <em><strong>NOTE</strong>: there are a lot of other parameters that control and effect the disk but this tutorial will only cover the basics!</em></p>
<p>The parameter <strong>disk_quota</strong> is a YES or NO value which disables the file system quotas; if you are not worried about the quotas set it to NO and stop reading.  Otherwise; leave it set at YES and continue.</p>
<p>The parameter <strong>diskspace</strong> is the count of 1K blocks available to the VPS in a soft and hard limit.  The hard limit is a stop point similar to filling up a physical disk &#8211; when you are out, you are out.  The soft limit is when the bean counters get angry and the quotatime timer starts.  On a basic installation and VPS setup you will have a 1048576 1K blocks as a soft limit and 1153024 1K blocks as a hard limit.  The numbers are not <em>crazy</em> as they are derived from <a href="http://en.wikipedia.org/wiki/Binary_numeral_system">base2</a>.  Thus, 1048576 1K blocks is 1GB of disk space.  Add an additional 10.2MB to the disk space and you arrive at the 1048576 1K blocks.  These are the basic numbers for the basic template that ships with OpenVZ.</p>
<p>The parameter <strong>diskinodes</strong> is the total number of files, directories and links you can have in the container.  Think of them as <a href="http://en.wikipedia.org/wiki/Post-it_note">Post-it® notes</a> and each file, directory and link gets a single note.  The default basic number is 200,000 for a soft limit for 1GB of disk space and 220,000 for the hard limit.  Normally *nix systems will set aside enough inodes for one inode per 4K disk space block.  In the default template for OpenVZ they are setting aside enough inodes for 5.2K blocks.  Which I&#8217;ll write off as either (a) a magic number or (b) a unique calculation I am not familiar with.  Thus, because the 4K block inode count for 1GB of disk space should be 262,144 inodes we&#8217;ll use the default template values for our calculations and simply multiply times the number of GB requested.</p>
<p>So&#8230;</p>
<p>Now&#8230;</p>
<p>The question is how do you adjust them quickly and easily.  In this example we are going to work with units of GBs.  If you need more granularity you will need to divide it back out to MBs but Gigabytes works great for our needs:</p>
<p>First, we need to define the soft and hard limits, next we apply the updated diskspace numbers and finally set the inode numbers correctly based on the ratio we know from the default template:</p>
<p>Here are the commands (<em>and note below for a quick and easy Perl script</em>):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">cid</span>=<span style="color: #000000;">1324</span>
<span style="color: #007800;">gb</span>=<span style="color: #000000;">5</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #800000;">${cid}</span> <span style="color: #660033;">--diskspace</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1048576</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #800000;">${gb}</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>:$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1153434</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #800000;">${gb}</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #800000;">${cid}</span> <span style="color: #660033;">--diskinodes</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">200000</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #800000;">${gb}</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>:$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">220000</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #800000;">${gb}</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #660033;">--save</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># display the commands to update an OpenVZ VPS with new disk space requirements</span>
<span style="color: #666666; font-style: italic;"># 2009/11/15 - Chris Schuld (chris@chrisschuld.com)</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> strict<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;Enter VPS CID: &quot;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$_CID</span> <span style="color: #339933;">=</span> <span style="color: #009999;">&lt;stdin&gt;</span><span style="color: #339933;">;</span> <span style="color: #000066;">chomp</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$_CID</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;Enter SOFT Diskspace Limit (ex 10GB):&quot;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$_SOFT</span> <span style="color: #339933;">=</span> <span style="color: #009999;">&lt;stdin&gt;</span><span style="color: #339933;">;</span> <span style="color: #000066;">chomp</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$_SOFT</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #0000ff;">$_SOFT</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/[^0-9]//g</span><span style="color: #339933;">;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;Enter HARD Diskspace Limit (ex 11GB):&quot;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$_HARD</span> <span style="color: #339933;">=</span> <span style="color: #009999;">&lt;stdin&gt;</span><span style="color: #339933;">;</span> <span style="color: #000066;">chomp</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$_HARD</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #0000ff;">$_HARD</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/[^0-9]//g</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$_INODE_SOFT</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">200000</span> <span style="color: #339933;">*</span> <span style="color: #0000ff;">$_SOFT</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$_INODE_HARD</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">220000</span> <span style="color: #339933;">*</span> <span style="color: #0000ff;">$_HARD</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;Run these commands:<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;vzctl set $_CID --diskspace &quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$_SOFT</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;G:&quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$_HARD</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;G --save<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;vzctl set $_CID --diskinodes $_INODE_SOFT:$_INODE_HARD --save<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://chrisschuld.com/2009/11/setting-vps-disk-space-with-openvz-the-easy-way/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing vzdump for OpenVZ on CentOS</title>
		<link>http://chrisschuld.com/2009/11/installing-vzdump-for-openvz-on-centos/</link>
		<comments>http://chrisschuld.com/2009/11/installing-vzdump-for-openvz-on-centos/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 06:48:06 +0000</pubDate>
		<dc:creator>Chris Schuld</dc:creator>
				<category><![CDATA[OpenVZ]]></category>

		<guid isPermaLink="false">http://chrisschuld.com/?p=294</guid>
		<description><![CDATA[There are a few items required for installing vzdump for OpenVZ on CentOS. First, you&#8217;ll need an MTA &#8211; I suggest making sure you have postfix installed; if you have postfix installed the initial RPM requirement for &#8220;MTA&#8221; will be handled for you. Next, you&#8217;ll need cstream. This installation is slightly more tricky because (as [...]]]></description>
			<content:encoded><![CDATA[<p>There are a few items required for installing <a href="http://wiki.openvz.org/Backup_of_a_running_container_with_vzdump">vzdump</a> for <a href="http://wiki.openvz.org/Main_Page">OpenVZ</a> on CentOS.</p>
<p>First, you&#8217;ll need an MTA &#8211; I suggest making sure you have postfix installed; if you have postfix installed the initial RPM requirement for &#8220;MTA&#8221; will be handled for you.  Next, you&#8217;ll need <a href="http://www.cons.org/cracauer/cstream.html">cstream</a>.  This installation is slightly more tricky because (as far as I know) there is no real way to gain this from yum unless you use the <a href="http://dag.wieers.com/rpm/">DAG Wieers</a> repo.  Also, depending on what you have already installed you will likely need the Simple Locking file I/O library for Perl.</p>
<p>Here is how you get vzdump on a clean version of CentOS (via the hostnode):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rpm <span style="color: #660033;">-ivh</span> <span style="color: #ff0000;">&quot;ftp://ftp.pbone.net/mirror/ftp.freshrpms.net/pub/freshrpms/pub/dag/redhat/el5/en/x86_64/RPMS.dag/cstream-2.7.4-3.el5.rf.x86_64.rpm&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>dag.wieers.com<span style="color: #000000; font-weight: bold;">/</span>rpm<span style="color: #000000; font-weight: bold;">/</span>packages<span style="color: #000000; font-weight: bold;">/</span>perl-LockFile-Simple<span style="color: #000000; font-weight: bold;">/</span>perl-LockFile-Simple-<span style="color: #000000;">0.206</span>-1.el5.rf.noarch.rpm
rpm <span style="color: #660033;">-ivh</span> perl-LockFile-Simple-<span style="color: #000000;">0.206</span>-1.el5.rf.noarch.rpm
<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">rm</span> perl-LockFile-Simple-<span style="color: #000000;">0.206</span>-1.el5.rf.noarch.rpm
rpm <span style="color: #660033;">-ivh</span> <span style="color: #ff0000;">&quot;http://chrisschuld.com/centos54/vzdump-1.2-6.noarch.rpm&quot;</span></pre></div></div>

<p>Since version 1.2-6 of vzdump the location of the modules is not &#8220;automatic&#8221; and have found it necessary to export the location of the PVE libraries that vzdump requires via this command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PERL5LIB</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>perl5<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>All said and done there has to be a better way to do this&#8230; anyone&#8230; anyone??</p>
<p><em><strong>NOTE</strong>: 7/19/2010 &#8211; Proxmox updated their site&#8230; I updated all of the links!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://chrisschuld.com/2009/11/installing-vzdump-for-openvz-on-centos/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Setting the Timezones across all VPS&#8217;s (OpenVZ)</title>
		<link>http://chrisschuld.com/2009/10/setting-the-timezones-across-all-vps-openvz/</link>
		<comments>http://chrisschuld.com/2009/10/setting-the-timezones-across-all-vps-openvz/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 03:42:56 +0000</pubDate>
		<dc:creator>Chris Schuld</dc:creator>
				<category><![CDATA[OpenVZ]]></category>

		<guid isPermaLink="false">http://chrisschuld.com/?p=273</guid>
		<description><![CDATA[All of our servers are currently based off of the Phoenix, Arizona, USA Timezone. This script allows this conversion from each HN (Host Node): &#160; #!/bin/bash for f in `ls /vz/private` do vzctl exec $f rm -f /etc/localtime 2&#62;/dev/null vzctl exec $f ln -s /usr/share/zoneinfo/America/Phoenix /etc/localtime done]]></description>
			<content:encoded><![CDATA[<p>All of our servers are currently based off of the Phoenix, Arizona, USA Timezone.  This script allows this conversion from each HN (Host Node):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">&nbsp;
<span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #000000; font-weight: bold;">for</span> f <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #000000; font-weight: bold;">/</span>vz<span style="color: #000000; font-weight: bold;">/</span>private<span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #000000; font-weight: bold;">do</span>
  vzctl <span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #007800;">$f</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>localtime <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null
  vzctl <span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #007800;">$f</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>zoneinfo<span style="color: #000000; font-weight: bold;">/</span>America<span style="color: #000000; font-weight: bold;">/</span>Phoenix <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>localtime
<span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://chrisschuld.com/2009/10/setting-the-timezones-across-all-vps-openvz/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Adjusting RAM for an OpenVZ VPS</title>
		<link>http://chrisschuld.com/2009/09/adjusting-ram-for-an-openvz-vps/</link>
		<comments>http://chrisschuld.com/2009/09/adjusting-ram-for-an-openvz-vps/#comments</comments>
		<pubDate>Sun, 06 Sep 2009 20:35:52 +0000</pubDate>
		<dc:creator>Chris Schuld</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[OpenVZ]]></category>

		<guid isPermaLink="false">http://chrisschuld.com/?p=253</guid>
		<description><![CDATA[Here are commands to help adjust the memory / RAM for an OpenVZ VPS: 64MB Guaranteed, 128MB Burstable cid=1000 vzctl set ${cid} --vmguarpages 64M --save vzctl set ${cid} --oomguarpages 64M --save vzctl set ${cid} --privvmpages 64M:128M --save 256MB Guaranteed, 512MB Burstable cid=1000 vzctl set ${cid} --vmguarpages 256M --save vzctl set ${cid} --oomguarpages 256M --save vzctl [...]]]></description>
			<content:encoded><![CDATA[<p>Here are commands to help adjust the memory / RAM for an OpenVZ VPS:</p>
<p><strong>64MB Guaranteed, 128MB Burstable</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">cid</span>=<span style="color: #000000;">1000</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #800000;">${cid}</span> <span style="color: #660033;">--vmguarpages</span> 64M <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #800000;">${cid}</span> <span style="color: #660033;">--oomguarpages</span> 64M <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #800000;">${cid}</span> <span style="color: #660033;">--privvmpages</span> 64M:128M <span style="color: #660033;">--save</span></pre></div></div>

<p><strong>256MB Guaranteed, 512MB Burstable</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">cid</span>=<span style="color: #000000;">1000</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #800000;">${cid}</span> <span style="color: #660033;">--vmguarpages</span> 256M <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #800000;">${cid}</span> <span style="color: #660033;">--oomguarpages</span> 256M <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #800000;">${cid}</span> <span style="color: #660033;">--privvmpages</span> 256M:512M <span style="color: #660033;">--save</span></pre></div></div>

<p><strong>512MB Guaranteed, 1024MB Burstable</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">cid</span>=<span style="color: #000000;">1000</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #800000;">${cid}</span> <span style="color: #660033;">--vmguarpages</span> 512M <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #800000;">${cid}</span> <span style="color: #660033;">--oomguarpages</span> 512M <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #800000;">${cid}</span> <span style="color: #660033;">--privvmpages</span> 512M:1024M <span style="color: #660033;">--save</span></pre></div></div>

<p><strong>1024MB Guaranteed, 2048MB Burstable</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">cid</span>=<span style="color: #000000;">1000</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #800000;">${cid}</span> <span style="color: #660033;">--vmguarpages</span> 1024M <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #800000;">${cid}</span> <span style="color: #660033;">--oomguarpages</span> 1024M <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #800000;">${cid}</span> <span style="color: #660033;">--privvmpages</span> 1024M:2048M <span style="color: #660033;">--save</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://chrisschuld.com/2009/09/adjusting-ram-for-an-openvz-vps/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Adding NFS support to an OpenVZ VPS</title>
		<link>http://chrisschuld.com/2009/09/adding-nfs-support-to-an-openvz-vps/</link>
		<comments>http://chrisschuld.com/2009/09/adding-nfs-support-to-an-openvz-vps/#comments</comments>
		<pubDate>Sun, 06 Sep 2009 20:09:28 +0000</pubDate>
		<dc:creator>Chris Schuld</dc:creator>
				<category><![CDATA[CentOS5]]></category>
		<category><![CDATA[OpenVZ]]></category>
		<category><![CDATA[NFS]]></category>

		<guid isPermaLink="false">http://chrisschuld.com/?p=251</guid>
		<description><![CDATA[I still use a lot of NFS connections on my equipment and when I create OpenVZ VPS systems I need them to have access to NFS. Here are the steps I use: From the Host Node (HN): modprobe nfs vzctl set 101 --features &#34;nfs:on&#34; --save From the VPS: yum -y install nfs-utils nfs-utils-lib chkconfig --levels [...]]]></description>
			<content:encoded><![CDATA[<p>I still use a lot of NFS connections on my equipment and when I create OpenVZ VPS systems I need them to have access to NFS.  Here are the steps I use:</p>
<p>From the Host Node (HN):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">modprobe nfs
vzctl <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #000000;">101</span> <span style="color: #660033;">--features</span> <span style="color: #ff0000;">&quot;nfs:on&quot;</span> <span style="color: #660033;">--save</span></pre></div></div>

<p>From the VPS:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #660033;">-y</span> <span style="color: #c20cb9; font-weight: bold;">install</span> nfs-utils nfs-utils-lib
chkconfig <span style="color: #660033;">--levels</span> <span style="color: #000000;">345</span> portmap on
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>portmap start</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://chrisschuld.com/2009/09/adding-nfs-support-to-an-openvz-vps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up an OpenVZ VPS DNS Server in CentOS 5.3</title>
		<link>http://chrisschuld.com/2009/09/setting-up-an-openvz-vps-dns-server-in-centos-5-3/</link>
		<comments>http://chrisschuld.com/2009/09/setting-up-an-openvz-vps-dns-server-in-centos-5-3/#comments</comments>
		<pubDate>Sun, 06 Sep 2009 18:26:55 +0000</pubDate>
		<dc:creator>Chris Schuld</dc:creator>
				<category><![CDATA[CentOS5]]></category>
		<category><![CDATA[OpenVZ]]></category>

		<guid isPermaLink="false">http://chrisschuld.com/?p=247</guid>
		<description><![CDATA[Here is my quick-and dirty way to build DNS servers using OpenVZ, CentOS and Bind/Named. This assumes you are creating a new server via OpenVZ. Although Bind is easy to admin with the configuration files recently I have found it is easier to simply admin the zones with Webmin. This setup will create the VPS, [...]]]></description>
			<content:encoded><![CDATA[<p>Here is my quick-and dirty way to build DNS servers using OpenVZ, CentOS and Bind/Named.  This assumes you are creating a new server via OpenVZ.  Although Bind is easy to admin with the configuration files recently I have found it is easier to simply admin the zones with Webmin.  This setup will create the VPS, install Bind and install Webmin.</p>
<p>Create the VPS:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">cid</span>=<span style="color: #000000;">1161</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>vz<span style="color: #000000; font-weight: bold;">/</span>template<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>download.openvz.org<span style="color: #000000; font-weight: bold;">/</span>template<span style="color: #000000; font-weight: bold;">/</span>precreated<span style="color: #000000; font-weight: bold;">/</span>centos-<span style="color: #000000;">5</span>-x86_64.tar.gz
vzctl create <span style="color: #800000;">${cid}</span> <span style="color: #660033;">--ostemplate</span> centos-<span style="color: #000000;">5</span>-x86_64 <span style="color: #660033;">--config</span> vps.basic
vzctl <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #800000;">${cid}</span> <span style="color: #660033;">--hostname</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>HOSTNAMEHERE<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #800000;">${cid}</span> <span style="color: #660033;">--ipadd</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>IP<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #800000;">${cid}</span> <span style="color: #660033;">--nameserver</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>IP<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #660033;">--save</span>
vzctl start <span style="color: #800000;">${cid}</span>
vzctl <span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #800000;">${cid}</span> <span style="color: #c20cb9; font-weight: bold;">passwd</span>
vzctl enter <span style="color: #800000;">${cid}</span></pre></div></div>

<p>From inside the VPS I install bind and webmin</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #660033;">-y</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #7a0874; font-weight: bold;">bind</span> bind-chroot bind-libs bind-utils caching-nameserver
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>root
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>prdownloads.sourceforge.net<span style="color: #000000; font-weight: bold;">/</span>webadmin<span style="color: #000000; font-weight: bold;">/</span>webmin-<span style="color: #000000;">1.480</span>-1.noarch.rpm
rpm <span style="color: #660033;">-Uvh</span> webmin-<span style="color: #000000;">1.480</span>-1.noarch.rpm</pre></div></div>

<p>Now I simply visit webmin&#8217;s panel and tap in any new zones (<em>or copy over our zones from another box</em>).</p>
<p>OpenVZ and virtual serving makes this time-consuming task of bringing new boxes up a simple task!</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisschuld.com/2009/09/setting-up-an-openvz-vps-dns-server-in-centos-5-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing OpenVZ in CentOS 5.3 (64bit)</title>
		<link>http://chrisschuld.com/2009/09/installing-openvz-in-centos-5-3-64bit/</link>
		<comments>http://chrisschuld.com/2009/09/installing-openvz-in-centos-5-3-64bit/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 22:28:36 +0000</pubDate>
		<dc:creator>Chris Schuld</dc:creator>
				<category><![CDATA[CentOS5]]></category>
		<category><![CDATA[OpenVZ]]></category>

		<guid isPermaLink="false">http://chrisschuld.com/?p=242</guid>
		<description><![CDATA[There are a few tutorials out there on installing OpenVZ in CentOS 5.3. Here are the steps I use to install OpenVZ on a brand new installation of CentOS 5.3: Note: this tutorial / walkthrough is for use 64 bit only Update the box via yum Install the OpenVZ Repository and grab the GPG key [...]]]></description>
			<content:encoded><![CDATA[<p>There are a few tutorials out there on installing OpenVZ in CentOS 5.3.  Here are the steps I use to install OpenVZ on a brand new installation of CentOS 5.3:</p>
<p>Note: this tutorial / walkthrough is for use 64 bit only</p>
<ol>
<li>Update the box via yum</li>
<li>Install the OpenVZ Repository and grab the GPG key</li>
<li>Install OpenVZ</li>
<li>Install OpenVZ Controller and Quota system</li>
<li>Configure the local system for the OpenVZ kernel</li>
<li>Update OpenVZ&#8217;s ARP Settings</li>
<li>Disable SELINUX</li>
<li>Reboot</li>
</ol>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #660033;">-y</span> update
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>yum.repos.d
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>download.openvz.org<span style="color: #000000; font-weight: bold;">/</span>openvz.repo
rpm <span style="color: #660033;">--import</span> http:<span style="color: #000000; font-weight: bold;">//</span>download.openvz.org<span style="color: #000000; font-weight: bold;">/</span>RPM-GPG-Key-OpenVZ
yum <span style="color: #660033;">-y</span> <span style="color: #c20cb9; font-weight: bold;">install</span> ovzkernel.x86_64
yum <span style="color: #660033;">-y</span> <span style="color: #c20cb9; font-weight: bold;">install</span> vzctl.x86_64 vzquota.x86_64</pre></div></div>

<p>Now; we need to configure the sysctl.conf file for OpenVZ</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">perl</span> <span style="color: #660033;">-pi</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/net\.ipv4\.ip_forward = 0/net\.ipv4\.ip_forward = 1/'</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>sysctl.conf
<span style="color: #c20cb9; font-weight: bold;">perl</span> <span style="color: #660033;">-pi</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/kernel\.sysrq = 0/kernel\.sysrq = 1/'</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>sysctl.conf
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>net.ipv4.conf.default.proxy_arp = 0<span style="color: #000099; font-weight: bold;">\n</span>net.ipv4.conf.all.rp_filter = 1<span style="color: #000099; font-weight: bold;">\n</span>net.ipv4.conf.default.send_redirects = 1<span style="color: #000099; font-weight: bold;">\n</span>net.ipv4.conf.all.send_redirects = 0<span style="color: #000099; font-weight: bold;">\n</span>net.ipv4.icmp_echo_ignore_broadcasts=1<span style="color: #000099; font-weight: bold;">\n</span>net.ipv4.conf.default.forwarding=1<span style="color: #000099; font-weight: bold;">\n</span>kernel.ve_allow_kthreads=1<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>sysctl.conf
<span style="color: #c20cb9; font-weight: bold;">perl</span> <span style="color: #660033;">-pi</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/NEIGHBOUR_DEVS=detect/NEIGHBOUR_DEVS=all/'</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>vz<span style="color: #000000; font-weight: bold;">/</span>vz.conf</pre></div></div>

<p>Disable SELINUX</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>sysconfig<span style="color: #000000; font-weight: bold;">/</span>selinux</pre></div></div>

<p>Reboot the machine</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">reboot</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://chrisschuld.com/2009/09/installing-openvz-in-centos-5-3-64bit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up a simple Web/Mail Server in OpenVZ</title>
		<link>http://chrisschuld.com/2009/06/setting-up-a-simple-webmail-server-in-openvz/</link>
		<comments>http://chrisschuld.com/2009/06/setting-up-a-simple-webmail-server-in-openvz/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 21:22:14 +0000</pubDate>
		<dc:creator>Chris Schuld</dc:creator>
				<category><![CDATA[OpenVZ]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[remi]]></category>

		<guid isPermaLink="false">http://chrisschuld.com/?p=238</guid>
		<description><![CDATA[Here are the steps I continue to use over and over to build utilities/project servers in OpenVZ. Utilities servers host web apps, mailing applications, etc for my company. We usually build them as self-contained little appliance-like servers. My vision and goal is simple == better every day! First, we create the virtual machine: cid=1164 cd [...]]]></description>
			<content:encoded><![CDATA[<p>Here are the steps I continue to use over and over to build utilities/project servers in OpenVZ.  Utilities servers host web apps, mailing applications, etc for my company.  We usually build them as self-contained little appliance-like servers.  My vision and goal is <strong>simple == better</strong> every day!</p>
<p>First, we create the virtual machine:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">cid</span>=<span style="color: #000000;">1164</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>vz<span style="color: #000000; font-weight: bold;">/</span>template<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>download.openvz.org<span style="color: #000000; font-weight: bold;">/</span>template<span style="color: #000000; font-weight: bold;">/</span>precreated<span style="color: #000000; font-weight: bold;">/</span>centos-<span style="color: #000000;">5</span>-x86_64.tar.gz
vzctl create <span style="color: #800000;">${cid}</span> <span style="color: #660033;">--ostemplate</span> centos-<span style="color: #000000;">5</span>-x86_64 <span style="color: #660033;">--config</span> vps.basic
vzctl <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #800000;">${cid}</span> <span style="color: #660033;">--hostname</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>HOSTNAMEHERE<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #800000;">${cid}</span> <span style="color: #660033;">--ipadd</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>IP<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #660033;">--save</span>
vzctl <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #800000;">${cid}</span> <span style="color: #660033;">--nameserver</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>IP<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #660033;">--save</span>
vzctl start <span style="color: #800000;">${cid}</span>
vzctl <span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #800000;">${cid}</span> <span style="color: #c20cb9; font-weight: bold;">passwd</span>
vzctl enter <span style="color: #800000;">${cid}</span></pre></div></div>

<p>Now that we are in the virtual machine and away from the HN we add the REMI repo and apply the updates directly on the box.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>download.fedora.redhat.com<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>epel<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">5</span><span style="color: #000000; font-weight: bold;">/</span>i386<span style="color: #000000; font-weight: bold;">/</span>epel-release-<span style="color: #000000;">5</span>-3.noarch.rpm
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>rpms.famillecollet.com<span style="color: #000000; font-weight: bold;">/</span>enterprise<span style="color: #000000; font-weight: bold;">/</span>remi-release-5.rpm
rpm <span style="color: #660033;">-Uvh</span> remi-release-<span style="color: #000000;">5</span><span style="color: #000000; font-weight: bold;">*</span>.rpm epel-release-<span style="color: #000000;">5</span><span style="color: #000000; font-weight: bold;">*</span>.rpm
<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">rm</span> epel-release-<span style="color: #000000;">5</span>-3.noarch.rpm remi-release-5.rpm
&nbsp;
yum <span style="color: #660033;">--enablerepo</span> remi <span style="color: #660033;">-y</span> update
yum <span style="color: #660033;">--enablerepo</span> remi <span style="color: #660033;">-y</span> <span style="color: #c20cb9; font-weight: bold;">install</span> httpd php php-devel php-pear php-gd php-xsl php-mbstring php-mcrypt php-mysql mysql</pre></div></div>

<p>Add Postfix and switch it on via <strong>system-switch-mail</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #660033;">--enablerepo</span> remi <span style="color: #660033;">-y</span> <span style="color: #c20cb9; font-weight: bold;">install</span> postfix system-switch-mail
system-switch-mail</pre></div></div>

<p>Now&#8230; customer configurations and setups&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisschuld.com/2009/06/setting-up-a-simple-webmail-server-in-openvz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
