<?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>Matt Gibson &#187; Linux</title>
	<atom:link href="http://www.mattgibson.ca/topics/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mattgibson.ca</link>
	<description>I'm one of those people radio shows call for obscure shit.</description>
	<lastBuildDate>Thu, 25 Mar 2010 00:04:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Fixing MySQL Error 1064 with PHPList when selecting new criteria</title>
		<link>http://www.mattgibson.ca/2009/01/29/fixing-mysql-error-1064-with-phplist-when-selecting-new-criteria/</link>
		<comments>http://www.mattgibson.ca/2009/01/29/fixing-mysql-error-1064-with-phplist-when-selecting-new-criteria/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 22:04:51 +0000</pubDate>
		<dc:creator>Matt G</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[PHPList]]></category>

		<guid isPermaLink="false">http://www.mattgibson.ca/?p=172</guid>
		<description><![CDATA[Today we had to fix a clients PHPlist. There was an error in their mysql select statement for whatever reason &#8211; whether it was their setup (they had some really weird group names and country names) or something with PHPList. Took us a while to figure it out, but as it turns out someone else [...]]]></description>
			<content:encoded><![CDATA[<p>Today we had to fix a clients PHPlist. There was an error in their mysql select statement for whatever reason &#8211; whether it was their setup (they had some really weird group names and country names) or something with PHPList. Took us a while to figure it out, but as it turns out someone <a href="http://mantis.phplist.com/view.php?id=15182">else had the same issue</a>.</p>
<p>Basically the fix is this:</p>
<p># nano /lists/admin/send_core.php</p>
<p>Find this</p>
<p>if (is_array($_POST["criteria_values"])) {<br />
$values = join(&#8220;, &#8220;,$_POST["criteria_values"]);<br />
} else {<br />
$values = $_POST["criteria_values"];<br />
}</p>
<p>and replace it with this</p>
<p>if (is_array($_POST["criteria_values"])) {<br />
# The following code checks for null values in the criteria_attribute array and removes them<br />
$values = $_POST["criteria_values"];<br />
foreach ($values as $key=&gt;$value) {<br />
if (!$value) {<br />
array_splice($values, $key, 1); // Remove null value from array<br />
}<br />
}<br />
$values = join(&#8220;, &#8220;,$values);<br />
#  $values = join(&#8220;, &#8220;,$_POST["criteria_values"]);<br />
} else {<br />
$values = $_POST["criteria_values"];<br />
}</p>
<p>Now everything should work, with no more mysql errors!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattgibson.ca/2009/01/29/fixing-mysql-error-1064-with-phplist-when-selecting-new-criteria/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Sendmail to work with Rogers and Smarthost settings</title>
		<link>http://www.mattgibson.ca/2008/11/10/getting-sendmail-to-work-with-rogers-and-smarthost-settings/</link>
		<comments>http://www.mattgibson.ca/2008/11/10/getting-sendmail-to-work-with-rogers-and-smarthost-settings/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 01:13:23 +0000</pubDate>
		<dc:creator>Matt G</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.mattgibson.ca/2008/11/10/getting-sendmail-to-work-with-rogers-and-smarthost-settings/</guid>
		<description><![CDATA[I didn&#8217;t do this myself so I can&#8217;t vouch for it, but there was a recent discussion on one of the mailing lists I&#8217;m on about getting Sendmail to work with Rogers Smarthost settings. Apparently this howto: http://www.newthink.net/2007/05/18/smarthost-authentication-with-sendmail/ Will get you going, but there is one critical change you must make as determined by the [...]]]></description>
			<content:encoded><![CDATA[<p>I didn&#8217;t do this myself so I can&#8217;t vouch for it, but there was a recent discussion on one of the mailing lists I&#8217;m on about getting Sendmail to work with Rogers Smarthost settings.</p>
<p>Apparently this howto:</p>
<blockquote>
<p><a href="http://www.newthink.net/2007/05/18/smarthost-authentication-with-sendmail/">http://www.newthink.net/2007/05/18/smarthost-authentication-with-sendmail/</a></p>
</blockquote>
<p>Will get you going, but there is one critical change you must make as determined by the Hugo on the mailing list.</p>
<blockquote>
<p>Don&#8217;t forget to use <strong>smtp-rog.mail.yahoo.com</strong> in authinf and <strong>not smtp.broadband.rogers.com</strong>!</p>
</blockquote>
<p>Also, if you want to use an external authinfo file, add this to your sendmail.mc file.</p>
<blockquote>
<p>FEATURE(`authinfo&#8217;, `hash -o /etc/mail/authinfo.db&#8217;)dnl</p>
</blockquote>
<p>Again, I didn&#8217;t try this myself, but I know some of you use Rogers and this may come in handy.</p>
<p>Another Reference on <a href="http://groups.google.ca/group/comp.mail.sendmail/browse_thread/thread/fe30c6b628c60e0e?pli=1">SMTP and Rogers Smarthost with Sendmail</a> is here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattgibson.ca/2008/11/10/getting-sendmail-to-work-with-rogers-and-smarthost-settings/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Installing Custom Themes with Trac 10.x. Beautify your Development and set yourself Apart.</title>
		<link>http://www.mattgibson.ca/2008/11/02/installing-custom-themes-with-trac-10x-beautify-your-development-and-set-yourself-apart/</link>
		<comments>http://www.mattgibson.ca/2008/11/02/installing-custom-themes-with-trac-10x-beautify-your-development-and-set-yourself-apart/#comments</comments>
		<pubDate>Sun, 02 Nov 2008 21:37:24 +0000</pubDate>
		<dc:creator>Matt G</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.mattgibson.ca/2008/11/02/installing-custom-themes-with-trac-10x-beautify-your-development-and-set-yourself-apart/</guid>
		<description><![CDATA[Ever wanted to install a new theme to your TRAC installation? Often we&#8217;ll want our development environments to look a little different from every other trac site on the Internet. We&#8217;d never tried to change the theme before, so decided to write a small tutorial on how it&#8217;s done for our archiving purposes, and for [...]]]></description>
			<content:encoded><![CDATA[<p>Ever wanted to install a new theme to your TRAC installation? Often we&#8217;ll want our development environments to look a little different from every other trac site on the Internet. We&#8217;d never tried to change the theme before, so decided to write a small tutorial on how it&#8217;s done for our archiving purposes, and for anyone else that wants to change their TRAC theme.</p>
<p>We&#8217;re using Ubuntu Linux, and this tutorial assume you&#8217;ve already installed TRAC on a global basis to your development server.</p>
<p>So, lets get some themes installed on our Trac 10.x installation shall we?</p>
<p>First, install the pre-requisites if not already installed.</p>
<blockquote>
<p># apt-get install python2.5-setuptools</p>
</blockquote>
<p>We had to change a couple permissions as well so Trac and everything can read/write where it needs to</p>
<blockquote>
<p># chown -R www-data:www-data /var/www</p>
</blockquote>
<p>Now we had to install <a href="http://trac.edgewall.org/wiki/WebAdmin">WebAdmin for Trac 10.x</a>:</p>
<blockquote>
<p># svn export <a href="http://svn.edgewall.com/repos/trac/sandbox/webadmin/">http://svn.edgewall.com/repos/trac/sandbox/webadmin/</a><br />
# cd webadmin<br />
# python setup.py bdist_egg<br />
# easy_install -Z dist/*.egg</p>
</blockquote>
<p>Note that WebAdmin is included with Trac 11.x if you&#8217;re bleeding edge, you probably don&#8217;t need this.</p>
<p>Now we had to install <a href="http://trac-hacks.org/wiki/ThemeEnginePlugin">ThemeEnginePlugin</a> for Trac 10.x:</p>
<blockquote>
<p># svn checkout <a href="http://trac-hacks.org/svn/themeengineplugin">http://trac-hacks.org/svn/themeengineplugin</a><br />
# cd themeengineplugin<br />
# cd 0.10<br />
# python setup.py bdist_egg<br />
# easy_install -Z dist/*.egg</p>
</blockquote>
<p>Now, lets install some themes for Trac 10.x:</p>
<blockquote>
<p># svn checkout <a href="http://trac-hacks.org/svn/pydotorgtheme/">http://trac-hacks.org/svn/pydotorgtheme/</a><br />
# cd pydotorgtheme/0.10/<br />
# python setup.py bdist_egg<br />
# easy_install -Z dist/*.egg<br />
# cd ../../<br />
# svn checkout <a href="http://trac-hacks.org/svn/gamedevtheme/">http://trac-hacks.org/svn/gamedevtheme/</a><br />
# cd gamedevtheme/0.10<br />
# python setup.py bdist_egg<br />
# easy_install -Z dist/*.egg<br />
# cd ../../<br />
# svn checkout <a href="http://trac-hacks.org/svn/consultanttheme/">http://trac-hacks.org/svn/consultanttheme/</a><br />
# cd consultanttheme/0.10<br />
# python setup.py bdist_egg<br />
# easy_install -Z dist/*.egg<br />
# cd ../../</p>
</blockquote>
<p>Now we added the following to our Trac.ini within the project we want the themes to be used for:</p>
<blockquote>
<p># cd /var/local/trac/trac.yourdomain.com/conf/<br />
# nano trac.ini</p>
</blockquote>
<p>Add this to the components section of your configuration file</p>
<blockquote>
<p>[components]<br />
webadmin.* = enabled<br />
themeengine.* = enabled</p>
</blockquote>
<p>Then we restarted Apache and we were able to select themes to make available, and attach to our Trac Installation. Note that with each new theme added, you will have to restart Apache in our experience.</p>
<p>This should get you going with installing some themes for Trac on your Ubuntu Linux server. Have Fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattgibson.ca/2008/11/02/installing-custom-themes-with-trac-10x-beautify-your-development-and-set-yourself-apart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial on how to Install Apache, Subversion and Trac with Virtual Hosting suppor in Ubuntu Linux</title>
		<link>http://www.mattgibson.ca/2008/11/02/tutorial-on-how-to-install-apache-subversion-and-trac-with-virtual-hosting-suppor-in-ubuntu-linux/</link>
		<comments>http://www.mattgibson.ca/2008/11/02/tutorial-on-how-to-install-apache-subversion-and-trac-with-virtual-hosting-suppor-in-ubuntu-linux/#comments</comments>
		<pubDate>Sun, 02 Nov 2008 21:22:04 +0000</pubDate>
		<dc:creator>Matt G</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.mattgibson.ca/2008/11/02/tutorial-on-how-to-install-apache-subversion-and-trac-with-virtual-hosting-suppor-in-ubuntu-linux/</guid>
		<description><![CDATA[We recently had to setup Apache, Subversion and Trac all within a virtual hosting environment for one of our Clients to be able to develop easily and effictively among team members. They wanted to use multiple domain names for separate projects. Made sense to us, so we started looking for instructions on setting this up. [...]]]></description>
			<content:encoded><![CDATA[<p>We recently had to setup Apache, Subversion and Trac all within a virtual hosting environment for one of our Clients to be able to develop easily and effictively among team members. They wanted to use multiple domain names for separate projects. Made sense to us, so we started looking for instructions on setting this up.</p>
<p>We wanted to setup LigHTTPD, however it&#8217;s not nearly as easy because of no svn-dav module available, so we stuck with Apache 2 for now.  </p>
<p>We found <a href="http://www.howtoforge.com/subversion-trac-virtual-hosts-on-ubuntu-server">a howto</a> on doing this, however there were a few vital steps and explanations missing so we&#8217;ve re-written it in hopes it will help others the trouble of searching to find this information.</p>
<p>So, lets move on to the tutorial shall we.</p>
<p>First install the required packages on your system. We started with a clean Ubuntu JEOS 8.0.4 Install on our server.</p>
<blockquote>
<p># sudo aptitude install enscript libapache2-mod-python python-docutils trac db4.3-util libapache2-svn subversion-tools</p>
</blockquote>
<p>Now create a virtual host for your SVN container.</p>
<blockquote>
<p># mkdir -p /var/local/svn/svn.yourdomain.com</p>
</blockquote>
<p>Now create a development group, and add the web user to it.</p>
<blockquote>
<p># addgroup svngroup; adduser www-data svngroup</p>
</blockquote>
<p>Now Add a user to the system and add them to that group</p>
<blockquote>
<p># adduser username<br />
# passwd username</p>
</blockquote>
<p>Now add that user to the group required for SVN</p>
<blockquote>
<p># adduser username svngroup</p>
</blockquote>
<p>Now setup the permissions for your SVN site.</p>
<blockquote>
<p># chmod 2770 /var/local/svn/svn.yourdomain.com</p>
</blockquote>
<p>Now setup the repo as you normally would</p>
<blockquote>
<p># svnadmin create /var/local/svn/svn.yourdomain.com</p>
</blockquote>
<p>Remove the current password file. We&#8217;re using HTTPS (or HTTP) instead of SVNSERVE so no need for it.</p>
<blockquote>
<p># rm /var/local/svn/svn.yourdomain.com/conf/passwd<br />
# touch /var/local/svn/svn.yourdomain.com/conf/passwd</p>
</blockquote>
<p>Allow your group to write to the repo</p>
<blockquote>
<p># chmod -R g+w www-data:svngroup /var/local/svn/svn.yourdomain.com</p>
</blockquote>
<p>Now set the repo access permissions.</p>
<blockquote>
<p># nano /var/local/svn/svn.yourdomain.com/conf/authz</p>
</blockquote>
<p>It should look something similar to the following. If in doubt, refer to the <a href="http://svnbook.red-bean.com/nightly/en/svn.serverconfig.pathbasedauthz.html">Path-Based Auth section</a> of Subversion.</p>
<blockquote>
<p>[groups]</p>
<p>svngroup = username1,username2,username2</p>
<p>[/]<br />
@svngroup = rw</p>
</blockquote>
<p>Now, create a log directory within apache for your development site.</p>
<blockquote>
<p># mkdir /var/log/apache2/svn.yourdomain.com</p>
</blockquote>
<p>Now create your virtual host.</p>
<blockquote>
<p># nano /etc/apache2/sites-available/svn.yourdomain.com</p>
</blockquote>
<p>Copy the following in, editing to suit your environment. Note we&#8217;re using a self signed certificate, you can change this to a properly signed one if you have it.</p>
<blockquote>
<p>&lt;VirtualHost [server's IP address]:443&gt;<br />
ServerName svn.yourdomain.com<br />
&lt;Location /&gt;<br />
DAV svn<br />
AuthType Basic<br />
AuthName &#8220;svn.yourdomain.com&#8221;<br />
AuthUserFile /var/local/svn/svn.yourdomain.com/conf/passwd<br />
AuthzSVNAccessFile /var/local/svn/svn.yourdomain.com/conf/authz<br />
SVNPath /var/local/svn/svn.yourdomain.com<br />
Require valid-user<br />
&lt;/Location&gt;<br />
CustomLog /var/log/apache2/svn.yourdomain.com/access.log combined<br />
ErrorLog /var/log/apache2/svn.yourdomain.com/error.log<br />
SSLEngine on<br />
SSLCertificateFile /etc/ssl/certs/selfsigned.pem<br />
# Add this once there is a real (non self-signed) certificate.<br />
# SSLCertificateKeyFile /etc/apache2/ssl/server.key<br />
&lt;/VirtualHost&gt;<br />
&lt;VirtualHost [server's IP address]:80&gt;<br />
ServerName svn.yourdomain.com<br />
Redirect / <a href="https://svn.yourdomain.com/">https://svn.yourdomain.com/</a><br />
&lt;/VirtualHost&gt;</p>
</blockquote>
<p>Now, enable the site</p>
<blockquote>
<p># a2ensite svn.yourdomain.com</p>
</blockquote>
<p>Now, create a username and password to access the svn site.</p>
<blockquote>
<p># htpasswd /var/local/svn/svn.yourdomain.com/conf/passwd username1</p>
</blockquote>
<p>Now, create your SSL certificate. <a href="http://articles.slicehost.com/2007/11/26/ubuntu-gutsy-generating-a-self-signed-ssl-certificate">Details are here if you need them</a>.</p>
<blockquote>
<p># sudo aptitude install ssl-cert</p>
</blockquote>
<p>Now, we found out that the default Ubuntu SSL cert is only for 30 days, so, we changed this to be 365 a little more sane no? <a href="http://devio.wordpress.com/2008/07/16/extending-default-validity-for-self-generated-ssl-certificates/">Thanks for the tip</a> Devio.</p>
<blockquote>
<p># which make-ssl-cert<br />
/usr/sbin/make-ssl-cert<br />
# nano /usr/sbin/make-ssl-cert</p>
</blockquote>
<p>Replace the line near the bottom that looks like this</p>
<blockquote>
<p>openssl req -config $TMPFILE -new -x509 -nodes -out $output -keyout $output</p>
</blockquote>
<p>With a line that looks like this instead</p>
<blockquote>
<p>openssl req -config $TMPFILE -new -x509 <strong>-days 365</strong> -nodes -out $output -keyout $output</p>
</blockquote>
<p>Exit and save the file. Now we&#8217;re ready to generate our final self signed SSL certificate for Apache on Ubuntu. Like this;</p>
<blockquote>
<p># make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/ssl/certs/selfsigned.pem</p>
</blockquote>
<p>Make sure to set your &#8220;common name&#8221; to your server name &#8211; ie: svn.yourdomain.com</p>
<p>Now you can go ahead and restart Apache to verify your DAV enabled SVN site functions.</p>
<blockquote>
<p># /etc/init.d/apache2 restart</p>
</blockquote>
<p>To verify, hit it&#8217;s url in a browser</p>
<blockquote>
<p><a href="https://svn.yourdomain.com/">https://svn.yourdomain.com/</a></p>
</blockquote>
<p>If everthing was successful, you now have SVN setup, with WEB-Dav support in Apache2 on Ubuntu. Continue to setup Trac.</p>
<p>First we have to create the web directory for Trac.</p>
<blockquote>
<p># mkdir -p /var/local/trac/trac.yourdomain.com</p>
</blockquote>
<p>Now we setup the permissions</p>
<blockquote>
<p># chmod 2770 /var/local/trac/trac.yourdomain.com</p>
</blockquote>
<p>Create a Trac instance for your project</p>
<blockquote>
<p># trac-admin /var/local/trac/trac.yourdomain.com initenv</p>
</blockquote>
<p>Setup the proper ownerships for the directory</p>
<blockquote>
<p># chown -R www-data:svngroup /var/local/trac/trac.yourdomain.com</p>
</blockquote>
<p>Now make sure the group is added to the repo</p>
<blockquote>
<p># chmod -R g+w /var/local/trac/trac.yourdomain.com</p>
</blockquote>
<p>Configure Trac where required</p>
<blockquote>
<p># nano /var/local/trac/trac.yourdomain.com/conf/trac.ini</p>
</blockquote>
<p>Create a directory for log files</p>
<blockquote>
<p># mkdir /var/log/apache2/trac.yourdomain.com</p>
</blockquote>
<p>Now create a virtual host for your trac instance</p>
<blockquote>
<p># nano /etc/apache2/sites-available/trac.yourdomain.com</p>
</blockquote>
<p>Now, copy the following into the virtual host configuration, changing to suit your domain and configuration</p>
<blockquote>
<p># Trac Configuration<br />
&lt;VirtualHost [server's IP address]:80&gt;<br />
ServerName trac.yourdomain.com<br />
Redirect / <a href="https://trac.yourdomain.com/">https://trac.yourdomain.com/</a><br />
&lt;/VirtualHost&gt;<br />
&lt;VirtualHost [server's IP address]:443&gt;<br />
ServerName trac.yourdomain.com<br />
DocumentRoot /var/local/trac/trac.yourdomain.com/<br />
Alias /trac/ /usr/share/trac/htdocs<br />
&lt;Directory &#8220;/usr/share/trac/htdocs/&#8221;&gt;<br />
Options Indexes MultiViews<br />
AllowOverride None<br />
Order allow,deny<br />
Allow from all<br />
&lt;/Directory&gt;<br />
&lt;Location /&gt;<br />
SetHandler mod_python<br />
PythonHandler trac.web.modpython_frontend<br />
PythonInterpreter main_interpreter<br />
PythonOption TracEnv /var/local/trac/trac.yourdomain.com/<br />
PythonOption TracUriRoot /<br />
AuthType Basic<br />
AuthName &#8220;trac.yourdomain.com&#8221;<br />
# Use the SVN password file.<br />
AuthUserFile /var/local/svn/svn.yourdomain.com/conf/passwd<br />
Require valid-user<br />
&lt;/Location&gt;<br />
CustomLog /var/log/apache2/trac.yourdomain.com/access.log combined<br />
ErrorLog /var/log/apache2/trac.yourdomain.com/error.log<br />
SSLEngine on<br />
SSLCertificateFile /etc/ssl/certs/selfsigned.pem<br />
# Add this once there is a real (non self-signed) certificate.<br />
# SSLCertificateKeyFile /etc/apache2/ssl/server.key<br />
&lt;/VirtualHost&gt;</p>
</blockquote>
<p>Now, enable this virtual host as well</p>
<blockquote>
<p># a2ensite trac.yourdomain.com</p>
</blockquote>
<p>Configure Trac Permissions for your Trac instance.</p>
<blockquote>
<p># trac-admin /var/local/trac/trac.yourdomain.com</p>
</blockquote>
<p>Use the following commands to view permissions, and set permissions.</p>
<blockquote>
<p>&#8220;help permission&#8221;</p>
</blockquote>
<p>We set the following permissions to one of our users from the command line</p>
<blockquote>
<p># trac-admin /var/local/trac/trac.yourdomain.com permission add username1 TRAC_ADMIN</p>
</blockquote>
<p>Now you&#8217;re ready to restart Apache with your new Trac VHOST.</p>
<blockquote>
<p># /etc/init.d/apache2 restart</p>
</blockquote>
<p>Now you&#8217;re ready to restart Apache and visit your Trac installation</p>
<blockquote>
<p><a href="https://trac.yourdomain.com/">https://trac.yourdomain.com/</a></p>
</blockquote>
<p>Login with your user (username1) and password you setup earlier.</p>
<p>We hope this tutorial helps others when trying to setup SVN and Trac on Ubuntu with Virtual Hosts. Let us know if you have any other handy tips!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattgibson.ca/2008/11/02/tutorial-on-how-to-install-apache-subversion-and-trac-with-virtual-hosting-suppor-in-ubuntu-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Howto Setup Emergency Queues with Separate Outbound PRI channel using FreePBX and Ring Groups.</title>
		<link>http://www.mattgibson.ca/2008/10/31/howto-setup-emergency-queues-with-separate-outbound-pri-channel-using-freepbx-and-ring-groups/</link>
		<comments>http://www.mattgibson.ca/2008/10/31/howto-setup-emergency-queues-with-separate-outbound-pri-channel-using-freepbx-and-ring-groups/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 08:04:18 +0000</pubDate>
		<dc:creator>Matt G</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.mattgibson.ca/2008/10/31/howto-setup-emergency-queues-with-separate-outbound-pri-channel-using-freepbx-and-ring-groups/</guid>
		<description><![CDATA[One of our clients recently had a question about his system using FreePBX 2.5.1 and Asterisk 1.4 regarding using specific lines to reach staff. He runs a support queue for his company. During the day he has a regular IVR with Call queues enabled to handle customer calls and direct them to the appropriate staff [...]]]></description>
			<content:encoded><![CDATA[<p>One of our clients recently had a question about his system using FreePBX 2.5.1 and Asterisk 1.4 regarding using specific lines to reach staff.</p>
<p>He runs a support queue for his company. During the day he has a regular IVR with Call queues enabled to handle customer calls and direct them to the appropriate staff member to deal with customer inquiries etc. After hours the menu functions the same way, however there are less staff to answer the phones so mainly the emergency extension is the only one being monitored, for &#8211; well, emergencies!</p>
<p>Of course, the people monitoring for emergencies don&#8217;t want to get a call asking what the company address is at 4 o&#8217;clock in the morning. So our client wanted the ability to set his system up so all calls to the emergency queue would be directed out a specific channel on his DID with a specific CallerID.</p>
<p>This enables his staff to set their cell phones to &#8220;ignore all calls except for those from this number&#8221;. Of course they set &#8220;this number&#8221; to the one being used by the outbound PRI channel on the PBX.</p>
<p>Setup of is type of scenario is detailed below.</p>
<p>1. Login to your FreePBX Control Panel.</p>
<p>2. Go to the <strong>Trunks Menu</strong> and add a new <strong>ZAP</strong> trunk. Note this is different if you&#8217;re using <strong>SIP</strong> or <strong>IAX</strong>. Here, we&#8217;re using a <strong>T1 PRI</strong>.</p>
<p>3. When you create the new trunk, put in the following configuration variables.</p>
<blockquote>
<p>Outbound Caller ID: &#8220;emer&#8221; &lt;5555551212&gt;<br />
Never Override CallerID: &lt;checked&gt;<br />
Maximum Channels: &lt;set to max cellular phones used&gt;<br />
Disable Trunk: &lt;unchecked&gt;<br />
Dial Rules: .<br />
Outbound Dial Prefix: &lt;blank&gt;<br />
Zap Identifier: g2</p>
</blockquote>
<p>4. Your new trunk is now created in Asterisk.</p>
<p>5. Click on the <strong>Outbound Routes</strong> link item on the left of the FreePBX Control Panel.</p>
<p>6. Add a new <strong>Route</strong> and put in the following information:</p>
<blockquote>
<p>Route Name: Emergency<br />
Route Password: &lt;blank&gt;<br />
PIN Set: None<br />
Emergency Dialing: &lt;unchecked&gt;<br />
Intra Company Route: &lt;unchecked&gt;<br />
Music On Hold: Default<br />
Dial Patters:</p>
<p><strong>2133|NXXXXXX<br />
2133|NXXXXXXXXX<br /></strong><br />
Trunk Sequence: g2</p>
</blockquote>
<p>Note the above and the &#8220;2133&#8243; used. This number can be anything you want, we just chose something we knew wouldn&#8217;t be used in the next step of the configuration. This number will get stripped out before getting sent out the trunk so it&#8217;s really not a big deal what you pick here. Just use something that won&#8217;t be used anywhere.</p>
<p>7. Click on Submit changes in this menu to add your new route</p>
<p>8. Click on the <strong>Ring Groups Menu</strong> on the left side of FreePBX 2.5.1 Interface</p>
<p>9. Edit, or Create a new Ring Group for the Emergency Group and ensure that it has the following settings along with your own configuration customizations if you have made them (merge these in):</p>
<blockquote>
<p>Ring Strategy: Ringall<br />
Ring Time: 50 Seconds (Time appropriately for Cell Voicemail!)<br />
Extension List:</p>
<p><strong>21335555551212#<br />
21335555551212#</strong></p>
<p>Announcement: Change to your own if you want<br />
Play MOH: Ring<br />
CID Name Prefix: CompanyName<br />
Confirm Calls: Checked<br />
Remote Announce: Same as &#8220;Announcement&#8221;</p>
<p>Destination if no answer: Hangup (or whatever you need)</p>
<p>Note that the <strong>2133</strong> prefix&#8217;s the cellular phone example numbers above. If you changed that earlier make sure to change it here when you&#8217;re changing the mobile phone number.</p>
</blockquote>
<p>10. Click on the submit button and you&#8217;re done adding your ring group to the configuration for this portion.</p>
<p>11. Click the &#8220;<strong>Queues</strong>&#8221; button on the left side of the FreePBX Management Interface and either modify or create a new queue for your Emergency staff.</p>
<p>12. When creating the new Queue use similar information to the following:</p>
<blockquote>
<p>Queue Number: A extension for queue<br />
CID Name: EMR-<br />
Wait Time: No<br />
Alert Info: Blank<br />
Static Agents:</p>
<p>
<strong>1234</strong>,0</p>
</blockquote>
<p>Note that <strong>1234</strong> in this section is the number of your Ring Group used for the Emergency Dialing feature for Outbound calls.</p>
<p>Set your Agent Timeout to something respectible.</p>
<blockquote>
<p>Agent Timeout: <strong>40 seconds</strong></p>
</blockquote>
<p>Keep scrolling down the settings and set the &#8220;fail over destination&#8221; to your Emergency Queue (to itself).</p>
<p>13. Now you should ssh to the FreePBX server and create a change in the zaptel/dahdi configuration.</p>
<p>14. Edit the file like this</p>
<blockquote>
<p># nano /etc/asterisk/zapata.conf</p>
</blockquote>
<p>15. Change it to something like this matching your system. We originally were using all 23 channels for the main line. Now we&#8217;ve separated it out into two groups (g1 and g2). G2 is the Trunk you setup earlier.</p>
<p>So, we started with:</p>
<blockquote>
<p>group = 1<br />
context=ext-did<br />
switchtype=national<br />
signalling=pri_cpe<br />
stripmsd=1<br />
channel=1-23</p>
</blockquote>
<p>We ended with:</p>
<blockquote>
<p>group = 1<br />
context=ext-did<br />
switchtype=national<br />
signalling=pri_cpe<br />
stripmsd=1<br />
channel=1-22</p>
<p>
group = 2<br />
context=ext-did<br />
switchtype=national<br />
signalling=pri_cpe<br />
stripmsd=0<br />
channel=23</p>
</blockquote>
<p>16. Exit and save the zapata.conf file.</p>
<p>17. Now you are ready to add this to your IVR menu and start testing.</p>
<p>18. Go back to FreePBX and go to the <strong>IVR</strong> menu option on the left of the Administration Panel. Find your IVR menu tree and add a new menu option to it that will dial your Emergency Queue.</p>
<p>19. You&#8217;re done. Give your menu a call, and hit the emergency queue!</p>
<p>If it doesn&#8217;t work, try the instructions again. If it still doesn&#8217;t work, leave us a comment and we&#8217;ll try to give you hand. Have you done something similar with FreePBX and Asterisk? Tell us about it below, we&#8217;d love to hear what other cool things people are doing.</p>
<p>We hope you enjoyed this howto!</p>
<p>
 </p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>
 </p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattgibson.ca/2008/10/31/howto-setup-emergency-queues-with-separate-outbound-pri-channel-using-freepbx-and-ring-groups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Habari Blog on Ubuntu Server to Replace WordPress</title>
		<link>http://www.mattgibson.ca/2008/10/29/installing-habari-blog-on-ubuntu-server-to-replace-wordpress/</link>
		<comments>http://www.mattgibson.ca/2008/10/29/installing-habari-blog-on-ubuntu-server-to-replace-wordpress/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 07:21:06 +0000</pubDate>
		<dc:creator>Matt G</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.mattgibson.ca/2008/10/29/installing-habari-blog-on-ubuntu-server-to-replace-wordpress/</guid>
		<description><![CDATA[You may have heard of Habari, you may not have. It&#8217;s yet another blogging software, written from the ground up to take advantage of all the latest technologies available. For this reason it&#8217;s not supported everywhere and probably is why you haven&#8217;t heard of it yet. I think this software could replace WordPress if done [...]]]></description>
			<content:encoded><![CDATA[<p>You may have heard of <a href="http://www.habariproject.org/en/">Habari</a>, you may not have. It&#8217;s yet another blogging software, written from the ground up to take advantage of all the latest technologies available. For this reason it&#8217;s not supported everywhere and probably is why you haven&#8217;t heard of it yet.</p>
<p>I think this software could replace <a href="http://www.wordpress.org">WordPress</a> if done correctly, it will just take some time to get a little more robust, but the guts of it is definately there.</p>
<p>We recently installed <a href="http://www.habariproject.org/en/">Habari</a> on one of our sites, and written this quick tutorial on how to get it going on your Ubuntu server using Apache.</p>
<p>We assume you&#8217;ve already got Mysql, PHP, SQLite and Apache installed on your server. If not, find some Howto&#8217;s on that because we&#8217;re not discussing it here.</p>
<p>So, first install some pre-requisite software:</p>
<blockquote>
<p># apt-get install libmysqlclient15-dev<br />
# pecl install pdo pdo_mysql pdo_sqlite<br />
# apt-get install sqlite3 libsqlite3-dev php5-sqlite3<br />
# apt-get install php5-dev subversion</p>
</blockquote>
<p>Now edit your php.ini</p>
<blockquote>
<p># nano /etc/php5/apache2/php.ini</p>
</blockquote>
<p>add this to the bottom of the file:</p>
<blockquote>
<p>extension=pdo.so<br />
extension=pdo_sqlite.so</p>
</blockquote>
<p>Now restart apache</p>
<blockquote>
<p># /etc/init.d/apache2 restart</p>
</blockquote>
<p>Now create your Apache Virtual Host as per usual for your site.</p>
<p>Now enter your sites directory</p>
<blockquote>
<p># cd /home/username/public_html/sitename.com/htdocs/</p>
</blockquote>
<p>Create the .htaccess file</p>
<blockquote>
<p># nano .htaccess</p>
</blockquote>
<p>Enter something similar to the following for the contents of the htaccess file you just created.</p>
<blockquote>
<p>### HABARI START<br />
RewriteEngine On<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteBase /<br />
RewriteRule . index.php [PT]<br />
### HABARI END</p>
<p>### HABARI SQLITE START<br />
&lt;Files &#8220;YOURSQLLITEDATABASENAME.db&#8221;&gt;<br />
Order deny,allow<br />
deny from all<br />
&lt;/Files&gt;<br />
### HABARI SQLITE END</p>
</blockquote>
<p>Now download the Habari SVN</p>
<blockquote>
<p># svn checkout <a href="http://svn.habariproject.org/habari/trunk/htdocs">http://svn.habariproject.org/habari/trunk/htdocs</a> .</p>
</blockquote>
<p>We are using the MPM-ITK module with Apache. This means that all our sites are running per user, instead of as a global user. This is much more secure for multiple user or site environments. It&#8217;s very easy to get going in Ubuntu. Just do this.</p>
<blockquote>
<p># apt-get install apache2-mpm-itk</p>
</blockquote>
<p>Then add this to whichever vhost you&#8217;re containing Habari</p>
<blockquote>
<p>&lt;IfModule mpm_itk_module&gt;<br />
AssignUserId username groupname<br />
&lt;/IfModule&gt;</p>
</blockquote>
<p>This means we don&#8217;t have to setup crazy permissions for the Habari installer to function. If you don&#8217;t want to install MPM-ITK then you can simply follow the Habari Installation Instructions.</p>
<p>Now, to complete the install visit your site through</p>
<blockquote>
<p><a href="http://www.yourhabarisite.com/">http://www.yourhabarisite.com/</a></p>
</blockquote>
<p>The settings we used are the following:</p>
<blockquote>
<p><strong>Locale:</strong><br />
Set as &#8220;En-US&#8221;</p>
<p><strong>Database Setup:</strong><br />
Database Type: sqlite<br />
Data File: yourdomain.com.db<br />
Table Prefix: habari__</p>
<p><strong>Site Configuration:</strong><br />
Site Name: Site Name<br />
Username: admin<br />
Password: Your Password<br />
Password: Your Password Repeated<br />
Admin Email: <a href="mailto:contact@yourdomain.com">contact@yourdomain.com</a></p>
<p><strong>Plugins We left Enabled:</strong><br />
- Core Dash Modules<br />
- Habari Media Silo<br />
- Pingback<br />
- Spam Checker<br />
- Undelete</p>
</blockquote>
<p><strong>*NOTE*</strong></p>
<p><strong><em>We did have an error during installation when using SQLITE3. We had to modify the default Habari database schema to remove the &#8220;IF NOT EXIST&#8221; lines. Not sure why this was needed as apparently this support was added in Sqlite 3.3 and Ubuntu comes with 3.4 but whatever, very simple fix for the problem.</em></strong></p>
<p><strong>*NOTE*</strong></p>
<p>Once this is done you should be complete the setup of <a href="http://www.habariproject.org/en/">Habari</a> and can go ahead and install some Plugins or Themes.</p>
<p>We hope you enjoyed this tutorial, let us know if you have any other interesting <a href="http://www.habariproject.org/en/">Habari</a> tips or tricks.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattgibson.ca/2008/10/29/installing-habari-blog-on-ubuntu-server-to-replace-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Howto Setup Permissions for Joomla on Plesk with Ubuntu</title>
		<link>http://www.mattgibson.ca/2008/10/25/howto-setup-permissions-for-joomla-on-plesk-with-ubuntu/</link>
		<comments>http://www.mattgibson.ca/2008/10/25/howto-setup-permissions-for-joomla-on-plesk-with-ubuntu/#comments</comments>
		<pubDate>Sat, 25 Oct 2008 21:09:05 +0000</pubDate>
		<dc:creator>Matt G</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.mattgibson.ca/2008/10/25/howto-setup-permissions-for-joomla-on-plesk-with-ubuntu/</guid>
		<description><![CDATA[Most of the howto&#8217;s or tutorials we came across about this problem all mention to install suphp and run php as a cgi through it. We weren&#8217;t happy with this solution, so we did something different. Basically the problem is: Plesk runs apache as &#8220;www-data:www-data&#8221; while the users are &#8220;username:psacln&#8221;. So, uploading via sftp or [...]]]></description>
			<content:encoded><![CDATA[<p>Most of the howto&#8217;s or tutorials we came across about this problem all mention to install suphp and run php as a cgi through it. We weren&#8217;t happy with this solution, so we did something different.</p>
<p>Basically the problem is:</p>
<p>Plesk runs apache as &#8220;www-data:www-data&#8221; while the users are &#8220;username:psacln&#8221;. So, uploading via sftp or ftp will work fine, but when you go to install something from the control panel in Joomla, it will be installed as www-data:www-data. Obviously, this is a problem since joomla won&#8217;t be able to run it properly.</p>
<p>So, our fix was this:</p>
<p>1. Install mod-itk</p>
<blockquote>
<p># apt-get install apache2-mpm-itk</p>
</blockquote>
<p>2. Enter your VHOST directory</p>
<blockquote>
<p># cd /var/www/vhosts/[DOMAIN]/conf</p>
</blockquote>
<p>3. Edit the vhosts file</p>
<blockquote>
<p># nano vhost.conf</p>
</blockquote>
<p>4. Copy the following into the file, changing the user to your domain user.</p>
<blockquote>
<p>&lt;IfModule mpm_itk_module&gt;<br />
AssignUserId DOMAINUSER psacln<br />
&lt;/IfModule&gt;</p>
</blockquote>
<p>5. Restart apache like this:</p>
<blockquote>
<p># /etc/init.d/apache2 restart</p>
</blockquote>
<p>Now you should have apache back up, and each time it runs it will be running as your domain user, not www-data. Problem solved, without the use of php-cgi. Sweet!</p>
<p>
 </p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattgibson.ca/2008/10/25/howto-setup-permissions-for-joomla-on-plesk-with-ubuntu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Remove Ubuntu Splash Screen from starting on boot</title>
		<link>http://www.mattgibson.ca/2008/10/19/remove-ubuntu-splash-screen-from-starting-on-boot/</link>
		<comments>http://www.mattgibson.ca/2008/10/19/remove-ubuntu-splash-screen-from-starting-on-boot/#comments</comments>
		<pubDate>Sun, 19 Oct 2008 23:58:57 +0000</pubDate>
		<dc:creator>Matt G</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.mattgibson.ca/2008/10/19/remove-ubuntu-splash-screen-from-starting-on-boot/</guid>
		<description><![CDATA[Here&#8217;s a simple way of changing your Ubuntu server so it won&#8217;t be using the splash screen. Great for seeing console, if you&#8217;re not using VESA or just plain being old school. first: # sudo nano /etc/grub/menu.lst look for # defoptions= quiet splash change it to &#8211; important leave the # in the line. # [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a simple way of changing your Ubuntu server so it won&#8217;t be using the splash screen. Great for seeing console, if you&#8217;re not using VESA or just plain being old school.</p>
<p>first:</p>
<blockquote>
<p># sudo nano /etc/grub/menu.lst</p>
</blockquote>
<p>look for</p>
<blockquote>
<p># defoptions= quiet splash</p>
</blockquote>
<p>change it to &#8211; important leave the # in the line.</p>
<blockquote>
<p># defoptions=</p>
</blockquote>
<p>now just run the grub updating tool and you&#8217;ll start up without the splash</p>
<blockquote>
<p># sudo update-grub</p>
</blockquote>
<p>Easy eh?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattgibson.ca/2008/10/19/remove-ubuntu-splash-screen-from-starting-on-boot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to add a &#8220;Go To Nagios&#8221; button to nagios administrator</title>
		<link>http://www.mattgibson.ca/2008/10/02/how-to-add-a-go-to-nagios-button-to-nagios-administrator/</link>
		<comments>http://www.mattgibson.ca/2008/10/02/how-to-add-a-go-to-nagios-button-to-nagios-administrator/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 23:35:24 +0000</pubDate>
		<dc:creator>Matt G</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.mattgibson.ca/2008/10/02/how-to-add-a-go-to-nagios-button-to-nagios-administrator/</guid>
		<description><![CDATA[It&#8217;s easy, once you have nagiosadministrator installed, you&#8217;ll probably notice there&#8217;s no easy way to actually reach nagios. To add a quick button to the toolbar to do this, follow these steps: &#160; 1. SSH to server running nagios/nagiosadministrator 2. Go to your nagios administrator directory, ours is /var/www/nagiosadmin 3. Now, edit the menu file [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s easy, once you have nagiosadministrator installed, you&#8217;ll probably notice there&#8217;s no easy way to actually reach nagios. To add a quick button to the toolbar to do this, follow these steps:</p>
<p>&nbsp;</p>
<p>1. SSH to server running nagios/nagiosadministrator</p>
<p>2. Go to your nagios administrator directory, ours is /var/www/nagiosadmin</p>
<p>3. Now, edit the menu file</p>
<p># nano apps/backend/lib/topMenu.class.php</p>
<p>4. Now, change the first class topMenu from this</p>
<p>class topMenu<br />
{<br />
protected static $items = array(<br />
&#8216;contact&#8217; =&gt; &#8216;Contacts&#8217;,<br />
&#8216;contactgroup&#8217; =&gt; &#8216;Contact Groups&#8217;,<br />
&#8216;os&#8217; =&gt; &#8216;Operating Systems&#8217;,<br />
&#8216;service&#8217; =&gt; &#8216;Services&#8217;,<br />
&#8216;hostgroup&#8217; =&gt; &#8216;Host Groups&#8217;,<br />
&#8216;host&#8217; =&gt; &#8216;Hosts&#8217;,<br />
&#8216;command&#8217; =&gt; &#8216;Commands&#8217;,<br />
&#8216;template&#8217; =&gt; &#8216;Templates&#8217;,<br />
&#8216;generator&#8217; =&gt; &#8216;Generator&#8217;<br />
);</p>
<p>to this</p>
<p>class topMenu<br />
{<br />
protected static $items = array(<br />
&#8216;contact&#8217; =&gt; &#8216;Contacts&#8217;,<br />
&#8216;contactgroup&#8217; =&gt; &#8216;Contact Groups&#8217;,<br />
&#8216;os&#8217; =&gt; &#8216;Operating Systems&#8217;,<br />
&#8216;service&#8217; =&gt; &#8216;Services&#8217;,<br />
&#8216;hostgroup&#8217; =&gt; &#8216;Host Groups&#8217;,<br />
&#8216;host&#8217; =&gt; &#8216;Hosts&#8217;,<br />
&#8216;command&#8217; =&gt; &#8216;Commands&#8217;,<br />
&#8216;template&#8217; =&gt; &#8216;Templates&#8217;,<br />
&#8216;generator&#8217; =&gt; &#8216;Generator&#8217;,<br />
&#8216;nagios&#8217; =&gt; &#8216;Go To Nagios&#8217;<br />
);</p>
<p>5. Refresh the Nagios Administrator web interface, and you&#8217;ll see a fancy new button you can click on to take you right to nagios.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattgibson.ca/2008/10/02/how-to-add-a-go-to-nagios-button-to-nagios-administrator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrating and Mounting VMWare Images from VMWare Server 2.x into a VMWare Server 1.x environment</title>
		<link>http://www.mattgibson.ca/2008/09/05/migrating-and-mounting-vmware-images-from-vmware-server-2x-into-a-vmware-server-1x-environment/</link>
		<comments>http://www.mattgibson.ca/2008/09/05/migrating-and-mounting-vmware-images-from-vmware-server-2x-into-a-vmware-server-1x-environment/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 07:08:32 +0000</pubDate>
		<dc:creator>Matt G</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Vmware]]></category>

		<guid isPermaLink="false">http://www.mattgibson.ca/2008/09/05/migrating-and-mounting-vmware-images-from-vmware-server-2x-into-a-vmware-server-1x-environment/</guid>
		<description><![CDATA[Tonight we decided we&#8217;d had enough of VMWare Server 2.0&#8242;s issues and shakiness. We started getting the following error, because as it turns out (we&#8217;re stupid for not thinking of this ahead of time &#8211; lesson learned) VMWare server beta&#8217;s have an expiry date, along with it&#8217;s bugs. Today we started getting this error: &#8220;VCommand [...]]]></description>
			<content:encoded><![CDATA[<p>Tonight we decided we&#8217;d had enough of VMWare Server 2.0&#8242;s issues and shakiness. We started getting the following error, because as it turns out (we&#8217;re stupid for not thinking of this ahead of time &#8211; lesson learned) VMWare server beta&#8217;s have an expiry date, along with it&#8217;s bugs. Today we started getting this error:</p>
<blockquote>
<p><strong>&#8220;VCommand error: This product has expired.&#8221;</strong></p>
</blockquote>
<p>This box holds some <a href="http://www.flewid.ca">Asterisk Development</a> stuff and some other Dev systems that we couldn&#8217;t really have go down on us. So, we downgraded our VMWare 2.x Server to the latest 1.x branch of VMWare. Then on we went to importing Virtual Machines from Server 2.0 and Workstation 6. As soon as we started to power them on, the fun started. Of course! The VM&#8217;s weren&#8217;t compatible anymore and gave us a couple errors. Here&#8217;s how we fixed it.</p>
<p>The first error we received was:</p>
<blockquote>
<p><strong>&#8220;A General System Error Occurred: Unknown Error&#8221;</strong></p>
</blockquote>
<p>This happened as soon as we tried to power on the VM. This was easily fixed. We entered the Virtual Machine&#8217;s directory, and edited the .vmx file for the virtual machine, this is just plain text. Replacing the next few lines fixed it right up for us.</p>
<blockquote>
<p><strong>config.version = &#8220;8&#8243;<br />
virtualHW.version = &#8220;6&#8243;</strong></p>
<p>became</p>
<p><strong>config.version = &#8220;4&#8243;<br />
virtualHW.version = &#8220;4&#8243;</strong></p>
</blockquote>
<p>Now we could power them up. However, we now encountered another error that we couldn&#8217;t open the virtual disk we had created. The error was something about how the Virtual Disks were created in a later version of vmware, and couldn&#8217;t be mounted. We&#8217;d have to re-create them. Obviously this wasn&#8217;t an option.</p>
<p>In some of the Virtual Machine directories, we had a file to edit with a text editor, this was simple enough.</p>
<blockquote>
<p><strong># nano virtualdiskname.vmxf</strong></p>
</blockquote>
<p>Then change this:</p>
<blockquote>
<p><strong>ddb.virtualHWVersion = &#8220;6&#8243;</strong></p>
<p>became</p>
<p><strong>ddb.virtualHWVersion = &#8220;4&#8243;</strong></p>
</blockquote>
<p>However, some of the other directories (mainly the ones created with VmWare Workstation 6) did not have a simple text file to edit, instead we had to edit the actual virtual disk using a hex editor. We chose the wonderful <a href="http://sourceforge.net/projects/heme/">heme editor</a>. <a href="http://linux.die.net/man/1/heme">Usage Instructions for Heme</a> are here.</p>
<p>Basically put, do this:</p>
<blockquote>
<p><strong># heme virtualdisk.vmdk</strong></p>
</blockquote>
<p>Now press &#8220;<strong>w</strong>&#8221; on your keyboard to search for &#8220;<strong>virtualHWVersion</strong>&#8220;. You will find it in the ascii column eventually. Hit &#8220;<strong>TAB</strong>&#8221; to enter Ascii mode, move your cursor with the arrow keys to where you need to replace the number. Replace the &#8220;<strong>8</strong>&#8221; or the &#8220;<strong>6</strong>&#8221; with a &#8220;<strong>4</strong>&#8221; and then press &#8220;<strong>s</strong>&#8221; to save the file. Answer yes to saving and then <strong>wait for it to save</strong>. Now exit the program by pressing &#8220;<strong>q</strong>&#8220;. You&#8217;ll notice it created a backup file with the &#8220;<strong>~</strong>&#8221; extension on it incase you messed up the hex editing. Leave this backup file here for now. Continue on, nothing to see here.</p>
<p>Now on the VMWare server, make sure that all the files in the virtual machine directory are chmodd&#8217;d properly.</p>
<blockquote>
<p><strong># cd /virtual machine/directory/</strong></p>
<p><strong># chown user:group *<br />
# chmod og=rwx *</strong></p>
</blockquote>
<p>Now you should be able to start your vm without any issues.</p>
<p><strong>If it all works</strong>, feel free to <strong>delete the backup .vmdk~</strong> that heme created for you.</p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattgibson.ca/2008/09/05/migrating-and-mounting-vmware-images-from-vmware-server-2x-into-a-vmware-server-1x-environment/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
