<?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>Circles of Archimedes</title>
	<atom:link href="http://wiki.springsurprise.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://wiki.springsurprise.com</link>
	<description>Technical scribbles in the sand</description>
	<lastBuildDate>Sun, 31 Jan 2010 00:18:09 +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>Enable Remote Logging on Mac OS X</title>
		<link>http://wiki.springsurprise.com/2010/01/30/enable-remote-logging-on-mac-os-x/</link>
		<comments>http://wiki.springsurprise.com/2010/01/30/enable-remote-logging-on-mac-os-x/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 00:18:09 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Server Solutions]]></category>
		<category><![CDATA[Technical Tidbits]]></category>
		<category><![CDATA[daemon]]></category>
		<category><![CDATA[launchd]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[leopard server]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://wiki.springsurprise.com/?p=397</guid>
		<description><![CDATA[Background It is often desirable to collect the system logs from various devices onto a central &#8220;logging host&#8221;.  This can simplify monitoring needs considerably as tools and scripts need only work on a single host.  It also provides some security benefits as hackers will have a harder time masking their activities if they do not [...]]]></description>
			<content:encoded><![CDATA[<h3>Background</h3>
<p>It is often desirable to collect the system logs from various devices onto a central &#8220;logging host&#8221;.  This can simplify monitoring needs considerably as tools and scripts need only work on a single host.  It also provides some security benefits as hackers will have a harder time masking their activities if they do not have access to the logging host.</p>
<p>On Mac OS X, there is a logging daemon (the Unix standard <code>syslogd</code> utility) that can be used to write both local logs and receive logs from remote hosts.  Unfortunately, the ability to receive remote logs is turned off in the default installation.  However, it is a trivial task to enable this functionality.</p>
<h3>Setup</h3>
<ol>
<li>Login as administrator to the logging host</li>
<li>Open a terminal session using the Terminal utility</li>
<li>Navigate to the LaunchDaemons directory<br />
<code>cd /System/Library/LaunchDaemons</code></li>
<li>Edit the <code>com.apple.syslogd.plist</code> file<br />
<code>sudo vi com.apple.syslogd.plist</code></li>
<li>Remove the comment delimiters (<code>&lt;!--</code> and <code>--&gt;</code>) surrounding the <code>NetworkListener</code> block<br />
<blockquote>
<pre>&lt;!--
 &lt;key&gt;NetworkListener&lt;/key&gt;
 &lt;dict&gt;
 &lt;key&gt;SockServiceName&lt;/key&gt;
 &lt;string&gt;syslog&lt;/string&gt;
 &lt;key&gt;SockType&lt;/key&gt;
 &lt;string&gt;dgram&lt;/string&gt;
 &lt;/dict&gt;
--&gt;</pre>
</blockquote>
</li>
<li>Stop the currently running instance of the syslog daemon<br />
<code>sudo launchctl unload  /System/Library/LaunchDaemons/com.apple.syslogd.plist</code></li>
<li>Restart the syslog daemon to pick up the changes in the LaunchDaemon configuration<br />
<code>sudo launchctl load  /System/Library/LaunchDaemons/com.apple.syslogd.plist</code></li>
</ol>
<p>The logging facility on the log host should now be available for remote devices to use.</p>
]]></content:encoded>
			<wfw:commentRss>http://wiki.springsurprise.com/2010/01/30/enable-remote-logging-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating PHP bindings for RRDTool</title>
		<link>http://wiki.springsurprise.com/2009/10/18/creating-php-bindings-for-rrdtool/</link>
		<comments>http://wiki.springsurprise.com/2009/10/18/creating-php-bindings-for-rrdtool/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 15:00:42 +0000</pubDate>
		<dc:creator>steven</dc:creator>
				<category><![CDATA[Graphing Solutions]]></category>
		<category><![CDATA[Technical Tidbits]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rrdtool]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://wiki.springsurprise.com/?p=363</guid>
		<description><![CDATA[Background PHP is a very popular language for web development.  Providing bindings for directly calling rrdtool within PHP provides a simple and efficient means of providing a high-level scripting interface into the data management and display capabilities of rrdtool.  The stock installation of rrdtool does not provide any support for PHP so bindings must be [...]]]></description>
			<content:encoded><![CDATA[<h3>Background</h3>
<p>PHP is a very popular language for web development.  Providing bindings for directly calling rrdtool within PHP provides a simple and efficient means of providing a high-level scripting interface into the data management and display capabilities of rrdtool.  The stock installation of rrdtool does not provide any support for PHP so bindings must be created for it manually.</p>
<h3>Setup</h3>
<ol>
<li>Download the <a href="http://oss.oetiker.ch/rrdtool/pub/contrib/php_rrdtool.tar.gz">php_rrdtool</a> archive from the <a href="http://oss.oetiker.ch/rrdtool/pub/contrib/">contributions directory</a> of the RRDTool site.</li>
<li>Extract the archive contents into the <code>/usr/include/php/ext</code> directory.
<p style="padding-left: 30px;"><code>sudo tar xzvf php_rrdtool.tar.gz -C /usr/include/php/ext</code></p>
</li>
<li>Change the owner and group to &#8220;root&#8221; and &#8220;wheel&#8221;.
<p style="padding-left: 30px;"><code>sudo chown -R root:wheel /usr/include/php/ext/rrdtool</code></p>
</li>
<li>Navigate to the newly created rrdtool directory.
<p style="padding-left: 30px;"><code>cd /usr/include/php/ext/rrdtool</code></p>
</li>
<li>Generate the configuration files for the PHP bindings.
<p style="padding-left: 30px;"><code>sudo phpize</code></p>
</li>
<li>Execute the newly-generated configuration script for the PHP bindings.  Note that the <code>--with-rrdtool</code> argument takes as its value the &#8220;root&#8221; directory where the various rrdtool files are located.  If installed using the default values supplied by the MacPorts utility, the &#8220;root&#8221; directory would be <code>/opt/local</code>.
<p style="padding-left: 30px;"><code>sudo ./configure CFLAGS="-fnested-functions" --with-php-config=/usr/bin/php-config --with-rrdtool=/opt/local</code></p>
</li>
<li>Make the php rrdtool extension.
<p style="padding-left: 30px;"><code>sudo make</code></p>
</li>
<li>Install the php rrdtool extension.  Make a note of the directory into which the extension was deployed.
<p style="padding-left: 30px;"><code>sudo make install</code></p>
</li>
<li>Make a backup copy of the <code>/etc/php.ini</code> file for safety.  If the file does not yet exist, then copy the <code>/etc/php.ini.default</code> instead.
<p style="padding-left: 30px;"><code>sudo cp php.ini php.ini.orig</code></p>
<p style="padding-left: 60px;"><em>or</em></p>
<p style="padding-left: 30px;"><code>sudo cp php.ini.default php.ini</code></p>
</li>
<li>Edit the <code>/etc/php.ini</code> file and alter the value of the <code>extension_dir</code> variable to the deployment directory (noted in Step 8).
<p style="padding-left: 30px;"><code>extension_dir = "/usr/lib/php/extensions/no-debug-non-zts-20060613/"</code></p>
</li>
<li>Edit the <code>/etc/php.ini</code> file and a new variable under the Dynamic Extensions section specifying the rrdtool extension.
<p style="padding-left: 30px;"><code>extension=rrdtool.so</code></p>
</li>
<li>Restart the apache server to load the new configuration information.
<p style="padding-left: 30px;"><code>sudo apachectl restart</code></p>
</li>
<li>Verify the rrdtool extension can be loaded from within PHP.
<p style="padding-left: 30px;"><code>php -m</code></p>
</li>
</ol>
<h4><span style="color: #993300;">Special Notice for Mac OS X Users</span></h4>
<p>With the evolution from 32-bit to 64-bit architectures in progress, it may arise that the rrdtool module is accessible through some mechanisms and not through others.  For example, it has been observed on some hardware/operating systems that the module will load properly when referenced directly by the PHP interpreter (i.e. <code>php -m</code>), but is not accessible when referenced within a web page served by Apache (i.e. not listed as part of the <code>phpinfo()</code> output).  This situation is most likely due to Apache running in 64-bit mode while the PHP interpreter and associated extensions are running in 32-bit mode.  If  this situation arises, then the suggested solution is to <a href="http://wiki.springsurprise.com/2009/10/17/running-apache-in-32-bit-mode-on-leopard/">force Apache to run in 32-bit mode</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://wiki.springsurprise.com/2009/10/18/creating-php-bindings-for-rrdtool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running Apache in 32-bit mode on Leopard</title>
		<link>http://wiki.springsurprise.com/2009/10/17/running-apache-in-32-bit-mode-on-leopard/</link>
		<comments>http://wiki.springsurprise.com/2009/10/17/running-apache-in-32-bit-mode-on-leopard/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 03:35:34 +0000</pubDate>
		<dc:creator>steven</dc:creator>
				<category><![CDATA[Technical Tidbits]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[leopard server]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://wiki.springsurprise.com/?p=371</guid>
		<description><![CDATA[Background With the evolution of Apple&#8217;s hardware from 32-bit to 64-bit compatibility, there are bound to be some difficulties.  They have tried to alleviate much of the complexity of running in this environment through their use of universal binaries, but sometimes there are unforeseen difficulties that require &#8220;undoing&#8221; some of Apple&#8217;s handiwork. As an example, [...]]]></description>
			<content:encoded><![CDATA[<h3>Background</h3>
<p>With the evolution of Apple&#8217;s hardware from 32-bit to 64-bit compatibility, there are bound to be some difficulties.  They have tried to alleviate much of the complexity of running in this environment through their use of universal binaries, but sometimes there are unforeseen difficulties that require &#8220;undoing&#8221; some of Apple&#8217;s handiwork.</p>
<p>As an example, the standard Apache web server is actually made of 4 different executables:  32-bit and 64-bit versions for the PowerPC architecture, and 32-bit and 64-bit versions for the Intel (x86) architecture.  Normally, the operating system runs the &#8220;most appropriate&#8221; version depending on the nature of the hardware.  However, this may cause problems when trying to use Apache modules which may not support the &#8220;most appropriate&#8221; version.  A common occurrence of this is when using the PHP module and some of its extensions.</p>
<p>There are two possible methods of alleviating this problem:  recompile every module and extension so that it is in the supported architecture or strip the 64-bit binary from the Apache universal binary which forces the operating system to run it in 32-bit mode.  As the more expedient solution is simply to force Apache into 32-bit mode, that is the route explained below.</p>
<h4><span style="color: #993300;">Special Notice</span></h4>
<p>This procedure alters the installed Apache web server.  The changed binary may be over-written by a future update which may require this procedure to be repeated.  This procedure has been tested only on Leopard running on an Intel-based Mac Pro.  Older PowerPC-based systems or systems running Snow Leopard may not require this process.</p>
<h3>Setup</h3>
<ol>
<li>List the supported architectures in the Apache binary.
<p style="padding-left: 30px;"><code>file /usr/sbin/httpd</code></p>
</li>
<li>Verify that &#8220;Mach-O 64-bit executable x86_64&#8243; is listed as part of the universal binary.</li>
<li>Copy the original executable to a backup location for safety.
<p style="padding-left: 30px;"><code>sudo cp /usr/sbin/httpd /usr/sbin/httpd.orig</code></p>
</li>
<li>Stop the web server.
<p style="padding-left: 30px;"><code>sudo apachectl stop</code></p>
</li>
<li>Remove the 64-bit executable from the Apache universal binary.
<p style="padding-left: 30px;"><code>sudo lipo /usr/sbin/httpd -remove x86_64 -output /usr/sbin/httpd</code></p>
</li>
<li>List the supported architectures now in the Apache binary.
<p style="padding-left: 30px;"><code>file /usr/sbin/httpd</code></p>
</li>
<li>Verify the &#8220;Mach-O 64-bit executable x86_64&#8243; is no longer listed as part of the universal binary.</li>
<li>Restart the web server.
<p style="padding-left: 30px;"><code>sudo apachectl start</code></p>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://wiki.springsurprise.com/2009/10/17/running-apache-in-32-bit-mode-on-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extending Service Discovery Cabilities on ReadyNAS</title>
		<link>http://wiki.springsurprise.com/2009/10/09/extending-service-discovery-cabilities-on-readynas/</link>
		<comments>http://wiki.springsurprise.com/2009/10/09/extending-service-discovery-cabilities-on-readynas/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 19:17:22 +0000</pubDate>
		<dc:creator>steven</dc:creator>
				<category><![CDATA[Server Solutions]]></category>
		<category><![CDATA[Technical Tidbits]]></category>
		<category><![CDATA[avahi]]></category>
		<category><![CDATA[bonjour]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[readynas]]></category>
		<category><![CDATA[UPnP]]></category>

		<guid isPermaLink="false">http://wiki.springsurprise.com/?p=347</guid>
		<description><![CDATA[Background The ReadyNAS appliance can advertise the services available on their system through the Bonjour or UPnP protocols.  These service discovery protocols can greatly simplify the client connection and configuration problems.  The web administration interface provides an easy method of controlling some of the services advertised, but there may be additional services running on the [...]]]></description>
			<content:encoded><![CDATA[<h3>Background</h3>
<p>The ReadyNAS appliance can advertise the services available on their system through the Bonjour or UPnP protocols.  These service discovery protocols can greatly simplify the client connection and configuration problems.  The web administration interface provides an easy method of controlling some of the services advertised, but there may be additional services running on the ReadyNAS that do not have an administrative interface for controlling their advertisement.</p>
<p>Because the ReadyNAS uses the open-source project <a href="http://avahi.org/">avahi</a> to handle service discovery, documentation on extending the list of services to be advertised is readily available.  With this information, it is relatively easy to create new service records for additional services and simplify the user experience.</p>
<h3>Setup</h3>
<p>In order to create additional avahi service records, it is necessary to <a href="http://wiki.springsurprise.com/2009/10/01/enabling-root-ssh-access-on-a-readynas-appliance/">enable root SSH access</a> to the ReadyNAS system.</p>
<p>The service file is a simple XML file which defines a service-group record.  The service-group record contains a number of elements which may vary according to the service being advertised.  The two essential elements are the name record, which defines the displayed name for the service in question, and the service record, which defines the type, port, and any other connection-related information.</p>
<p>The name element has one possible attribute &#8211; <code>replace-wildcards</code> &#8211; which can take a value of &#8220;yes&#8221; or &#8220;no&#8221;.  If the attribute is present and the value is &#8220;yes&#8221;, then a <code>%h</code> can be used in the value which will be automatically substituted with the host name of the system.</p>
<p>The service element groups together the necessary information for service connectivity.  The two most essential elements it contains are the type element and the port element.  The type is the is the official service type as defined by <a href="http://www.dns-sd.org/ServiceTypes.html">RFC 2782</a> and the port is simply the listening port number.</p>
<p>Depending on the service, there may be additional elements or attributes that are necessary to have a properly formatted service file.  Be sure to consult the <a href="http://avahi.org/download/avahi.service.5.xml">documentation</a> to ensure the service is properly defined before making any changes.</p>
<h4>Example</h4>
<p>The following is an example configuration that enables service discovery for SSH:</p>
<blockquote><p><code><br />
&lt;?xml version="1.0" standalone='no'?&gt;<br />
&lt;service-group&gt;<br />
&lt;name replace-wildcards="yes"&gt;SSH on %h&lt;/name&gt;<br />
&lt;service&gt;<br />
&lt;type&gt;_ssh._tcp&lt;/type&gt;<br />
&lt;port&gt;22&lt;/port&gt;<br />
&lt;/service&gt;<br />
&lt;/service-group&gt;</code></p></blockquote>
<p>To activate this service, perform the following actions:</p>
<ol>
<li>Login (via ssh) as “root” to the ReadyNAS appliance.</li>
<li>Navigate to the configuration directory.
<p style="padding-left: 30px;"><code>cd /etc/avahi/services</code></p>
</li>
<li>Create a new file named <code>ssh.service</code> containing the configuration information listed above.</li>
<li>Restart the avahi service to load the new service file.
<p style="padding-left: 30px;"><code>kill -SIGHUP `ps ax | grep avahi | grep -v grep | awk '{ print $1 }'`</code></p>
</li>
</ol>
<p><center><iframe src="http://rcm.amazon.com/e/cm?t=circlesofarchimedes-20&#038;o=1&#038;p=48&#038;l=st1&#038;mode=books&#038;search=o%27reilly%20networking%20configuration&#038;nou=1&#038;fc1=000000&#038;lt1=_blank&#038;lc1=3366FF&#038;bg1=FFFFFF&#038;f=ifr" marginwidth="0" marginheight="0" width="728" height="90" border="0" frameborder="0" style="border:none;" scrolling="no"></iframe></center></p>
]]></content:encoded>
			<wfw:commentRss>http://wiki.springsurprise.com/2009/10/09/extending-service-discovery-cabilities-on-readynas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring RADIUS for Bugzilla on Mac OS X Server</title>
		<link>http://wiki.springsurprise.com/2009/10/06/configuring-radius-for-bugzilla-on-mac-os-x-server/</link>
		<comments>http://wiki.springsurprise.com/2009/10/06/configuring-radius-for-bugzilla-on-mac-os-x-server/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 21:46:19 +0000</pubDate>
		<dc:creator>steven</dc:creator>
				<category><![CDATA[Server Solutions]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Technical Tidbits]]></category>
		<category><![CDATA[bugzilla]]></category>
		<category><![CDATA[radius]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://wiki.springsurprise.com/?p=320</guid>
		<description><![CDATA[Background Bugzilla is a very popular open-source issue tracking system.  However, setting up all the user accounts can be a tedious chore, particularly for large user bases.  In addition, there are additional user-management headaches associated with maintaining another list of user names, password issues, and access changes due to staff turnover. Fortunately, Bugzilla is capable [...]]]></description>
			<content:encoded><![CDATA[<h3>Background</h3>
<p>Bugzilla is a very popular open-source issue tracking system.  However, setting up all the user accounts can be a tedious chore, particularly for large user bases.  In addition, there are additional user-management headaches associated with maintaining another list of user names, password issues, and access changes due to staff turnover.</p>
<p>Fortunately, Bugzilla is capable of integrating with the <a href="http://en.wikipedia.org/wiki/RADIUS">RADIUS</a> service available on the Mac OS X Server.  RADIUS is a remote authentication and authorization service which can handle the user authentication requests for Bugzilla and permit users to simply sign on with their standard account name and passwords.  This relieves the administrator from having to create and maintain another set of accounts and allows the users to simply use their standard account name and password.</p>
<p>It should be noted that the implementation of the RADIUS service on the Mac OS X Server is the open-source <a href="http://freeradius.org/">FreeRADIUS</a>.  More configuration information and usage can be found on the projects web site.</p>
<p>Prior <a href="http://wiki.springsurprise.com/2009/09/30/installing-bugzilla-on-mac-os-x-server/">installation</a> of Bugzilla is assumed for these directions.</p>
<h4>Enabling the RADIUS Service</h4>
<p>If the RADIUS service has not been enabled on the server, then it is necessary to activate it.  Do <em>not</em> start the service during this step.</p>
<ol>
<li>Open the <strong>Server Admin</strong> application and connect to the server hosting the RADIUS service.</li>
<li>Select the server in the &#8220;Servers&#8221; pane and then click on the &#8220;Settings&#8221; icon.</li>
<li>Click on the &#8220;Services&#8221; tab and enable the &#8220;RADIUS&#8221; service by clicking on the appropriate checkbox.</li>
<li>Save the new configuration by clicking on the &#8220;Save&#8221; button.</li>
<li>Select the &#8220;RADIUS&#8221; service now available in the &#8220;Servers&#8221; pane.</li>
<li>Select the &#8220;Settings&#8221; icon and select a security certificate to use for the service.  A self-signed certificate can easily be created using the &#8220;Manage Certificates&#8221; option in the drop-down menu.  Regardless, the certificate used for this service should <em><strong>not</strong></em> have a Private Key Passphrase set.</li>
<li>Save the new configuration by clicking on the &#8220;Save&#8221; button.</li>
</ol>
<h4>Configuring the RADIUS service</h4>
<p>The stock RADIUS service on Mac OS X (Leopard) has been configured to work only with Apple&#8217;s Airport and Airport Express WiFi systems.  In order to extend its functionality to provide service to other types of systems,  the configuration file must be edited and a special entry must be created.</p>
<ol>
<li>Open the <strong>Server Admin</strong> application and connect to the server hosting the RADIUS service.</li>
<li>Select the RADIUS service for configuration.  If the service is already running, then click on the &#8220;Stop RADIUS&#8221; button to stop it.</li>
<li>Click on the &#8220;Base Stations&#8221; icon and then the &#8220;Add&#8230;&#8221; button to create a new entry.  The most important elements to set correctly are the Type and IP Address.  Type <em>must</em> be &#8220;other&#8221; and the IP Address should be the address of the Bugzilla server.<br />
<blockquote><p>Name: <em> Bugzilla</em><br />
Type: <em> other</em><br />
IP Address: <em> 192.168.1.2</em><br />
Shared Secret: <em>********</em><br />
Verify: <em> ********</em></p></blockquote>
</li>
<li>Make a backup copy of the <code>/etc/raddb/users</code> configuration file for safety.
<p style="padding-left: 30px;"><code>sudo cp /etc/raddb/users /etc/raddb/users.orig</code></p>
</li>
<li>Edit the <code>/etc/raddb/users</code> configuration file to alter the default authentication type to use the Open Directory service instead of the local account database.  The line in question should be approximately 153 lines down in the file (as of 10.5.8).
<p style="padding-left: 30px;">Replace: <code>DEFAULT Auth-Type = System</code><br />
with: <code>DEFAULT Auth-Type = opendirectory</code></li>
<li>Return to the <strong>Server Admin</strong> application and start the RADIUS service.</li>
</ol>
<h4>Testing the RADIUS service</h4>
<p>In order to verify the RADIUS service is working properly it should be tested using the included test tool <code>radtest</code>.  The general format for testing the RADIUS service is:</p>
<p style="text-align: center;"><em>radtest user password radius-server nas-port-number shared-secret</em></p>
<p><em>user</em> is the username to be tested.</p>
<p><em>password</em> is the user&#8217;s password.  Note that this is given in cleartext and so may be considered a security risk.  It is suggested that you change the password immediately after concluding the test.</p>
<p><em>radius-server</em> is the hostname (or IP address) of the server hosting the RADIUS service.</p>
<p><em>nas-port-number</em> is the value of the NAS-Port attribute.  For testing purposes, it does not matter what value is provided as long as it is between 0 and 2^31.</p>
<p><em>shared-secret</em> is the shared secret established when the service was configured.</p>
<p>The following is an example usage showing the result of a successful test:</p>
<p style="padding-left: 30px;"><code>$ radtest groucho RufusTFirefly radius.example.com 10 SecretWord<br />
Sending Access-Request of id 203 to 192.168.1.2 port 1812<br />
User-Name = "groucho"<br />
User-Password = "RufusTFirefly"<br />
NAS-IP-Address = 255.255.255.255<br />
NAS-Port = 10<br />
rad_recv: Access-Accept packet from host 192.168.1.2:1812, id=203, length=20</code></p>
<h4>Configuring Bugzilla for RADIUS authentication</h4>
<p>RADIUS configuration requires administrative access to the Bugzilla installation.  It cannot be performed as a &#8220;normal&#8221; user of the system.  It is best practice to verify the RADIUS service is working properly before attempting to configure a dependent service.</p>
<ol>
<li>Install the Authen::Radius perl module (if not already installed as part of the initial setup).
<p style="padding-left: 30px;"><code>sudo cpan -i Authen::Radius</code></p>
</li>
<li>Login as administrator to Bugzilla.</li>
<li>Click on the &#8220;Administration&#8221; link.</li>
<li>Click on the &#8220;Parameters&#8221; link.</li>
<li>Click on the &#8220;RADIUS&#8221; link</li>
<li>Fill in the information for all the RADIUS fields.  The server is the hostname where the RADIUS service is running.  The secret it the shared secret established when the service was configured.  The NAS IP is the address where the Bugzilla service is running.  The email suffix is appended to the username to generate the appropriate email address for each user.<br />
<blockquote><p>RADIUS_server:  radius.example.com<br />
RADIUS_secret:  ********<br />
RADIUS_NAS_IP:  192.168.1.2<br />
RADIUS_email_suffix:  @example.com</p></blockquote>
</li>
<li>Click on the &#8220;Save Changes&#8221; button to save the new configuration information.</li>
<li>Click on the &#8220;User Authentication&#8221; link.</li>
<li>Navigate to the <code>user_verify_class</code> and activate RADIUS as a valid authentication mechanism.  It is strongly suggested that you leave the DB method also activated.</li>
<li>Click on the &#8220;Save Changes&#8221; button to save the new configuration information.</li>
</ol>
<p>Related Links</p>
<ul>
<li><a href="http://wiki.springsurprise.com/2009/09/30/installing-bugzilla-on-mac-os-x-server/">Installing Bugzilla on Mac OS X Server</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://wiki.springsurprise.com/2009/10/06/configuring-radius-for-bugzilla-on-mac-os-x-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Customizing the ReadyNAS Bonjour (UPnP) Names</title>
		<link>http://wiki.springsurprise.com/2009/10/05/customizing-the-readynas-bonjour-upnp-names/</link>
		<comments>http://wiki.springsurprise.com/2009/10/05/customizing-the-readynas-bonjour-upnp-names/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 18:28:52 +0000</pubDate>
		<dc:creator>steven</dc:creator>
				<category><![CDATA[Technical Tidbits]]></category>
		<category><![CDATA[avahi]]></category>
		<category><![CDATA[bonjour]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[readynas]]></category>
		<category><![CDATA[UPnP]]></category>

		<guid isPermaLink="false">http://wiki.springsurprise.com/?p=308</guid>
		<description><![CDATA[Background The ReadyNAS appliance can use the standard service discovery protocols (Bonjour, UPnP) to advertise the services it offers which can greatly simplify client configuration.  While it can easily enable/disable the discovery protocols with the web administration interface, it does not provide a means of customizing the service names. Because ReadyNAS is based on the [...]]]></description>
			<content:encoded><![CDATA[<h3>Background</h3>
<p>The ReadyNAS appliance can use the standard service discovery protocols (Bonjour, UPnP) to advertise the services it offers which can greatly simplify client configuration.  While it can easily enable/disable the discovery protocols with the web administration interface, it does not provide a means of customizing the service names.</p>
<p>Because ReadyNAS is based on the Linux operating system, it is able to use the open source solution <a href="http://avahi.org/">avahi</a> to handle the service discovery.  This service can easily be configured to display alternate names.</p>
<h3>Setup</h3>
<p>The ReadyNAS system uses a stock template for each service it is able to advertise.  When activated, the appropriate template is processed into a service record which is used by the avahi daemon to advertise the various services.  In order to effect a persistent change, the template itself must be modified with the desired service name.  Directly modifying the service record will result in the changes being lost should the template be reprocessed.</p>
<p>The template is a simple XML file which defines a service-group record.  The service-group record contains a number of elements which may vary according to the service being advertised.  The only element which is necessary to modify for customizing the displayed name is the <code>&lt;name&gt;</code> element.</p>
<p>The value of the <code>&lt;name&gt;</code> element contains the text of the service advertisement.  If the <code>replace-wildcards="yes"</code> attribute is set, the text may include a <code>%h</code> which will automatically be expanded into the hostname.  If the <code>replace-wildcards</code> attribute is absent or set to &#8220;no&#8221;, then no hostname expansion will occur.  It is suggested that the names advertise both the hostname and the service in order to avoid confusion.</p>
<p>Here is an example (stock) template for the AFP (Apple Filing Protocol) service:</p>
<blockquote><p>&lt;?xml version=&#8221;1.0&#8243; standalone=&#8217;no&#8217;?&gt;&lt;!&#8211;*-nxml-*&#8211;&gt;<br />
&lt;service-group&gt;<br />
&lt;name replace-wildcards=&#8221;yes&#8221;&gt;%h (AFP)&lt;/name&gt;<br />
&lt;service&gt;<br />
&lt;type&gt;_afpovertcp._tcp&lt;/type&gt;<br />
&lt;port&gt;548&lt;/port&gt;<br />
&lt;/service&gt;<br />
&lt;/service-group&gt;</p></blockquote>
<p>In order to access the necessary configuration files, the EnableRootSSH patch must first be successfully <a href="../2009/10/01/enabling-root-ssh-access-on-a-readynas-appliance/">installed</a>.</p>
<ol>
<li>Disable both the Bonjour and UPnP discovery services using the ReadyNAS web administration interface.</li>
<li>Login (via ssh) as &#8220;root&#8221; to the ReadyNAS appliance.</li>
<li>Navigate to the configuration directory.
<p style="padding-left: 30px;"><code>cd /etc/avahi/services</code></p>
</li>
<li>Make a backup of the original configuration file for safety.
<p style="padding-left: 30px;"><code>cp afp.template afp.template.orig</code></p>
</li>
<li>Edit the <code>&lt;name&gt;</code> element by replacing the value with the desired text.  If the <code>replace-wildcards="yes"</code> attribute is set, then the hostname will be substituted for a <code>%h</code> in the value text.
<p style="padding-left: 30px;"><code>&lt;name replace-wildcards="yes"&gt;AFP on %h&lt;/name&gt;</code></p>
</li>
<li>Re-enable the Bonjour and UPnP discovery services using the ReadyNAS web administration interface.</li>
</ol>
<p><center><iframe src="http://rcm.amazon.com/e/cm?t=circlesofarchimedes-20&#038;o=1&#038;p=48&#038;l=st1&#038;mode=pc-hardware&#038;search=Netgear%20ReadyNAS&#038;nou=1&#038;fc1=000000&#038;lt1=_blank&#038;lc1=3366FF&#038;bg1=FFFFFF&#038;f=ifr" marginwidth="0" marginheight="0" width="728" height="90" border="0" frameborder="0" style="border:none;" scrolling="no"></iframe></center></p>
]]></content:encoded>
			<wfw:commentRss>http://wiki.springsurprise.com/2009/10/05/customizing-the-readynas-bonjour-upnp-names/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multiple Media Directories with ReadyDLNA</title>
		<link>http://wiki.springsurprise.com/2009/10/03/multiple-media-directories-with-readydlna/</link>
		<comments>http://wiki.springsurprise.com/2009/10/03/multiple-media-directories-with-readydlna/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 15:00:07 +0000</pubDate>
		<dc:creator>steven</dc:creator>
				<category><![CDATA[Technical Tidbits]]></category>
		<category><![CDATA[avahi]]></category>
		<category><![CDATA[bonjour]]></category>
		<category><![CDATA[dlna]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[readynas]]></category>
		<category><![CDATA[UPnP]]></category>

		<guid isPermaLink="false">http://wiki.springsurprise.com/?p=293</guid>
		<description><![CDATA[Background With a recent upgrade of the ReadyNAS firmware, Infrant (now Netgear) introduced the streaming service “ReadyDLNA”.  This is actually an open source project (”minidlna”) initiated by a Netgear engineer.  This DLNA (”Digital Living Network Alliance”) streaming service is capable of delivering audio, video, and pictures to a number of DLNA-compliant media players. The ReadyDLNA [...]]]></description>
			<content:encoded><![CDATA[<h3>Background</h3>
<p>With a recent upgrade of the ReadyNAS firmware, Infrant (now Netgear) introduced the streaming service “ReadyDLNA”.  This is actually an open source project (”minidlna”) initiated by a Netgear engineer.  This DLNA (”Digital Living Network Alliance”) streaming service is capable of delivering audio, video, and pictures to a number of DLNA-compliant media players.</p>
<p>The ReadyDLNA service works quite well but does not provide a means of specifying multiple media directories in the ReadyNAS web administration interface.  It also does not expose the capability to assign &#8220;roles&#8221; to the different directories through the web interface.</p>
<h3>Setup</h3>
<p>In order to access the necessary configuration files, the EnableRootSSH patch must first be successfully <a href="../2009/10/01/enabling-root-ssh-access-on-a-readynas-appliance/">installed</a>.  Enhancements to the web interface to permit easier access to these “hidden” configuration options have been promised for future versions, but currently the only means of altering them is through directly editing the configuration files.</p>
<p>To add multiple media directories for the ReadyDLNA service:</p>
<ol>
<li>Login (via ssh) as “root” to the ReadyNAS appliance.</li>
<li>Navigate to the configuration directory.
<p style="padding-left: 30px;"><code>cd /etc</code></p>
</li>
<li>Make a backup of the original configuration file for safety.
<p style="padding-left: 30px;"><code>cp minidlna.conf minidlna.conf.orig</code></p>
</li>
<li>Edit the minidlna.conf file by creating additional &#8220;media_dir&#8221; entries with the appropriate path.  For the ReadyNAS appliances, all the data is typically stored on a single volume (&#8220;/c&#8221;) with the sharepoint name being the next item on the path and then the directory name(s).
<p style="padding-left: 30px;"><code>media_dir=/c/media/Music<br />
media_dir=/c/media/Videos<br />
media_dir=/c/media/Pictures<br />
media_dir=/c/torrents/BitTorrent</code></li>
<li>Restart the ReadyDLNA service.  (The easiest way to do this is to simply reboot the ReadyNAS appliance.)</li>
</ol>
<p>Another &#8220;hidden&#8221; feature of the minidlna service is the ability to assign roles to the different media directories.  This can help restrict the type of content listed for a particular playback device.  There are three roles that may be assigned:  Audio (&#8220;A&#8221;), Video (&#8220;V&#8221;), and Pictures (&#8220;P&#8221;).  If no role is assigned to a media directory, then all media types will be indexed.</p>
<p>To assign roles to the media directories:</p>
<ol>
<li>Login (via ssh) as “root” to the ReadyNAS appliance.</li>
<li>Navigate to the configuration directory.
<p style="padding-left: 30px;"><code>cd /etc</code></p>
</li>
<li>Make a backup of the original configuration file for safety.
<p style="padding-left: 30px;"><code>cp minidlna.conf minidlna.conf.orig</code></p>
</li>
<li>Edit the minidlna.conf file &#8220;media_dir&#8221; entries by specifying the role (&#8220;A&#8221;, &#8220;V&#8221;, or &#8220;P&#8221;) before the path.  The role and path should be comma-delimited.
<p style="padding-left: 30px;"><code>media_dir=A,/c/media/Music<br />
media_dir=V,/c/media/Videos<br />
media_dir=P,/c/media/Pictures<br />
media_dir=V,/c/torrents/BitTorrent</code></li>
<li>Restart the ReadyDLNA service.  (The easiest way to do this is to simply reboot the ReadyNAS appliance.)</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://wiki.springsurprise.com/2009/10/03/multiple-media-directories-with-readydlna/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Customizing the ReadyNAS DLNA Name</title>
		<link>http://wiki.springsurprise.com/2009/10/02/customizing-the-readynas-dlna-name/</link>
		<comments>http://wiki.springsurprise.com/2009/10/02/customizing-the-readynas-dlna-name/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 15:00:53 +0000</pubDate>
		<dc:creator>steven</dc:creator>
				<category><![CDATA[Technical Tidbits]]></category>
		<category><![CDATA[dlna]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[media server]]></category>
		<category><![CDATA[readynas]]></category>

		<guid isPermaLink="false">http://wiki.springsurprise.com/?p=282</guid>
		<description><![CDATA[Background With a recent upgrade of the ReadyNAS firmware, Infrant (now Netgear) introduced the streaming service &#8220;ReadyDLNA&#8221;.  This is actually an open source project (&#8220;minidlna&#8221;) initiated by a Netgear engineer.  This DLNA (&#8220;Digital Living Network Alliance&#8221;) streaming service is capable of delivering audio, video, and pictures to a number of DLNA-compliant media players. The ReadyDLNA [...]]]></description>
			<content:encoded><![CDATA[<h3>Background</h3>
<p>With a recent upgrade of the ReadyNAS firmware, Infrant (now Netgear) introduced the streaming service &#8220;ReadyDLNA&#8221;.  This is actually an open source project (&#8220;minidlna&#8221;) initiated by a Netgear engineer.  This DLNA (&#8220;Digital Living Network Alliance&#8221;) streaming service is capable of delivering audio, video, and pictures to a number of DLNA-compliant media players.</p>
<p>The ReadyDLNA service works quite well but does not provide a means to alter the displayed service name in the ReadyNAS web administration interface.  In order to customize the service name, it is necessary to update the service&#8217;s configuration files directly.</p>
<h3>Setup</h3>
<p>In order to access the necessary configuration files, the EnableRootSSH patch must first be successfully <a href="http://wiki.springsurprise.com/2009/10/01/enabling-root-ssh-access-on-a-readynas-appliance/">installed</a>.  Enhancements to the web interface to permit easier access to these &#8220;hidden&#8221; configuration options have been promised for future versions, but currently the only means of altering them is through directly editing the configuration files.</p>
<ol>
<li>Login (via ssh) as &#8220;root&#8221; to the ReadyNAS appliance.</li>
<li>Navigate to the configuration directory.
<p style="padding-left: 30px;"><code>cd /etc</code></p>
</li>
<li>Make a backup of the original configuration file for safety.
<p style="padding-left: 30px;"><code>cp minidlna.conf minidlna.conf.orig</code></p>
</li>
<li>Edit the minidlna.conf file by replacing the value of &#8220;friendly_name&#8221; with the desired alternate text.  In addition, the variable must be uncommented by removing the leading &#8220;#&#8221;.
<p style="padding-left: 30px;"><code>friendly_name=Movies, Music, and More</code></p>
</li>
<li>Restart the ReadyDLNA service.  (The easiest way to do this is to simply reboot the ReadyNAS appliance.)</li>
</ol>
<p><br/><br/></p>
<p><center><iframe src="http://rcm.amazon.com/e/cm?t=circlesofarchimedes-20&#038;o=1&#038;p=48&#038;l=st1&#038;mode=electronics&#038;search=Netgear%20ReadyNAS&#038;nou=1&#038;fc1=000000&#038;lt1=_blank&#038;lc1=3366FF&#038;bg1=FFFFFF&#038;f=ifr" marginwidth="0" marginheight="0" width="728" height="90" border="0" frameborder="0" style="border:none;" scrolling="no"></iframe></center></p>
]]></content:encoded>
			<wfw:commentRss>http://wiki.springsurprise.com/2009/10/02/customizing-the-readynas-dlna-name/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enabling Root SSH Access on a ReadyNAS appliance</title>
		<link>http://wiki.springsurprise.com/2009/10/01/enabling-root-ssh-access-on-a-readynas-appliance/</link>
		<comments>http://wiki.springsurprise.com/2009/10/01/enabling-root-ssh-access-on-a-readynas-appliance/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 19:02:19 +0000</pubDate>
		<dc:creator>steven</dc:creator>
				<category><![CDATA[Technical Tidbits]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[readynas]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://wiki.springsurprise.com/?p=276</guid>
		<description><![CDATA[Background Infrant (recently purchased by Netgear) makes a number of Network Attached Storage (NAS) appliances that are well suited for home or small business use.  These appliances run a variant of Linux and so are easily enhanced or altered beyond their original configurations.  While the web interface provides a great deal of functionality, there may [...]]]></description>
			<content:encoded><![CDATA[<h3>Background</h3>
<p>Infrant (recently purchased by Netgear) makes a number of Network Attached Storage (NAS) appliances that are well suited for home or small business use.  These appliances run a variant of Linux and so are easily enhanced or altered beyond their original configurations.  While the web interface provides a great deal of functionality, there may be a desire for deeper levels of customization than the web interface can provide.  Enabling root access to the system is the first step in exploring these customization opportunities.</p>
<p><strong><span style="color: #993300;">Special Note</span></strong></p>
<p>With root access, it is possible to cause serious damage to both the appliance&#8217;s operating system as well as any data stored on the appliance.  Be extra careful when making any changes.  <em>If root access is enabled, Netgear holds the right to deny support!</em></p>
<h3>Setup</h3>
<p>There are several types of NAS appliances made by Infrant, but these general guidelines should be applicable to all of them.  They have been tested only on the ReadyNAS NV+ appliance, so other systems may have slight variations.</p>
<p>The ReadyNAS support pages have a list of all available <a href="http://www.readynas.com/?page_id=93">add-on downloads</a> (including some contributed by the community).  As there are several different architectures and operating system versions, please pick the appropriate configuration when downloading the patch.</p>
<ol>
<li><a href="http://www.readynas.com/?page_id=93">Download</a> the appropriate version of the EnableRootSSH shell access patch.</li>
<li>Navigate to your ReadyNAS administrative page and login as administrator.</li>
<li>Click the &#8220;System&#8221; link (in the left-hand navigation area).</li>
<li>Click on the &#8220;Update&#8221; link (under the &#8220;System&#8221; heading).</li>
<li>Click on the &#8220;Local&#8221; tab to be presented with the option of uploading a locally available patch.</li>
<li>Click on the &#8220;Browse&#8221; button and select the EnableRootSSH file.  It is probably named something along the lines of <code>EnableRootSSH_1.0.bin</code>.</li>
<li>Click on the &#8220;Upload and Verify&#8221; button.</li>
<li>After the patch has been uploaded successfully, a dialog should be presented with the option to actually apply the patch.  Click on the &#8220;Perform System Update&#8221; button to apply the patch.</li>
<li>Upon successful application, the system should present a dialog requesting to reboot the system in order to activate the patch.  Reboot the system as directed.</li>
<li>When the system has rebooted, root SSH access should be enabled.  The password will initially be the same as that used for the administrative web interface.</li>
</ol>
<p><center><iframe src="http://rcm.amazon.com/e/cm?t=circlesofarchimedes-20&#038;o=1&#038;p=48&#038;l=st1&#038;mode=electronics&#038;search=Netgear%20ReadyNAS&#038;nou=1&#038;fc1=000000&#038;lt1=_blank&#038;lc1=3366FF&#038;bg1=FFFFFF&#038;f=ifr" marginwidth="0" marginheight="0" width="728" height="90" border="0" frameborder="0" style="border:none;" scrolling="no"></iframe></center></p>
]]></content:encoded>
			<wfw:commentRss>http://wiki.springsurprise.com/2009/10/01/enabling-root-ssh-access-on-a-readynas-appliance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Bugzilla on Mac OS X Server</title>
		<link>http://wiki.springsurprise.com/2009/09/30/installing-bugzilla-on-mac-os-x-server/</link>
		<comments>http://wiki.springsurprise.com/2009/09/30/installing-bugzilla-on-mac-os-x-server/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 23:48:09 +0000</pubDate>
		<dc:creator>steven</dc:creator>
				<category><![CDATA[Server Solutions]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://wiki.springsurprise.com/?p=237</guid>
		<description><![CDATA[Background Bugzilla is a very popular open-source bug-tracking system.  It is used by many companies (large and small) to not only track defects and their remediation, but also to track various other development tasks, including new feature work, enhancement requests, etc.  It can even be used as part of a change-control process (e.g. SAS-70, SOx, [...]]]></description>
			<content:encoded><![CDATA[<h3>Background</h3>
<p>Bugzilla is a very popular open-source bug-tracking system.  It is used by many companies (large and small) to not only track defects and their remediation, but also to track various other development tasks, including new feature work, enhancement requests, etc.  It can even be used as part of a change-control process (e.g. SAS-70, SOx, etc.).</p>
<p>Because Bugzilla is an open-source project, it is actively enhanced and can be installed on a number of different systems.  It is easily customized in both appearance and functionality which provides it with the flexibility to fit into the existing development process of almost any team.</p>
<p>The project&#8217;s site (<a href="http://www.bugzilla.org">http://www.bugzilla.org</a>) has a plethora of documentation, example usages, forums, as well as the latest releases.  The latest stable release can be found on their <a href="http://www.bugzilla.org/download/">download</a> page.  This post contains specific instructions for installing Bugzilla on a system running Mac OS X Server (Leopard).</p>
<h3>Preliminary Preparations</h3>
<h4>Perl</h4>
<p>An appropriate version of perl should already be available as part of the normal operating system installation.  Bugzilla requires a minimum of version 5.8.1 and version 5.8.8 should already be installed (as of OS X 10.5.8).  The version of perl can be verified with the following command:</p>
<p style="padding-left: 30px;"><code>/usr/bin/perl --version</code></p>
<h4>MySQL</h4>
<p>Bugzilla can utilize several different databases to store its data, but Mac OS X Server already has MySQL included in its normal installation so it makes sense to use that option.  However, the MySQL installed by default with Mac OS X Server does <em>not</em> include the necessary files to build a MySQL application so these must be installed manually.</p>
<p>To install the MySQL build files:</p>
<ol>
<li>Go to the Apple <a href="http://www.opensource.apple.com/">open source download page</a> and select the appropriate version of the operating system the installation is running.</li>
<li>Download the binary version of the MySQL package (for 10.5.8, the correct package is MySQL-45).</li>
<li>Decompress the packaged binary.
<p style="padding-left: 30px;"><code>tar xzf MySQL-45.binaries.tar.gz</code></p>
</li>
<li>Navigate to the uncompressed package directory.
<p style="padding-left: 30px;"><code>cd MySQL-45.binaries</code></p>
</li>
<li>Decompress the <em>internal</em> package into the destination directory.
<p style="padding-left: 30px;"><code>sudo tar -xzvf MySQL-45.root.tar.gz -C /</code></p>
</li>
</ol>
<p>To enable the MySQL service:</p>
<ol>
<li>Open the <strong>Server Admin</strong> application and connect to the server.</li>
<li>Select the server name and click on the &#8220;Settings&#8221; icon and then the &#8220;Services&#8221; tab.</li>
<li>Enable the MySQL service by clicking on the appropriate checkbox.</li>
<li>Click on the &#8220;Save&#8221; button to save the new configuration.</li>
</ol>
<p>To start the MySQL service:</p>
<ol>
<li>Open the <strong>Server Admin</strong> application and connect to the server.</li>
<li>Select the <strong>MySQL</strong> service from the list of available services.</li>
<li>Click on the &#8220;Settings&#8221; tab.</li>
<li>If necessary, set the root password for the MySQL service.  The default database location of <code>/var/mysql</code> may also be overridden if desired.</li>
<li>Click on the &#8220;Save&#8221; button to save the new configuration.</li>
<li>Click on the &#8220;Start MySQL&#8221; to startup the new service.</li>
</ol>
<h4>Apache</h4>
<p>Bugzilla can utilize a wide variety of web servers, but Apache is already installed with Mac OS X Server so it makes sense to use that option.  For this installation, Bugzilla will be configured in its own subdomain (e.g. bugzilla.example.com) and not as a directory of another domain (e.g. www.example.com/bugzilla).</p>
<p>To setup the bugzilla domain:</p>
<ol>
<li>Open the <strong>Server Admin</strong> application and connect to the server hosting DNS services.</li>
<li>Select the <strong>DNS</strong> service from the list of available services.</li>
<li>Select the &#8220;Zones&#8221; icon.</li>
<li>Select the Primary Zone for the site (e.g. example.com).</li>
<li>Click on the &#8220;Add Record&#8221; drop-down and select the &#8220;Add Alias (CNAME)&#8221; item.</li>
<li>Enter the Alias Name for the bugzilla subdomain.  The alias name should be <em>fully qualified</em>. This means the full domain name should be given and terminated with a period.
<p style="padding-left: 30px;"><code>bugzilla.example.com.</code></p>
</li>
<li>Enter the Destination for the bugzilla alias.  (i.e. the name of the server running Apache).  The domain name should be <em>fully qualified</em>. This means the full domain name should be given and terminated with a period.
<p style="padding-left: 30px;"><code>www.example.com.</code></p>
</li>
<li>Click on the &#8220;Save&#8221; button to save the new configuration.</li>
<li>Restart the DNS service to activate the new domain name.</li>
</ol>
<p>To setup the bugzilla web site:</p>
<ol>
<li>Open the <strong>Server Admin</strong> application and connect to the server hosting the web server.</li>
<li>Select the <strong>Web</strong> service from the list of available services.</li>
<li>Select the &#8220;Sites&#8221; icon.</li>
<li>Click on the &#8220;+&#8221; button to create a new site entry.</li>
<li>Click on the &#8220;General&#8221; tab and fill out the information for the new site entry:<br />
<blockquote><p>Domain Name: <em> bugzilla.example.com</em><br />
Host Description: <em>Bugzilla</em><br />
IP Address: <em>any</em><br />
Port: <em>80</em><br />
Web Folder:<em> /opt/local/www/bugzilla</em><br />
Default Index Files: <em> index.cgi</em><br />
Error Document: <em>/error.html</em><br />
Administrator Email: <em> admin@example.com</em></p></blockquote>
</li>
<li>Select the &#8220;Options&#8221; tab and enable the &#8220;CGI Execution&#8221; and &#8220;Allow All Overrides&#8221; options.</li>
<li>Select the &#8220;Logging&#8221; tab and setup the logging information:<br />
<blockquote><p>Enable Access Log: <em>enabled</em><br />
Archive every: <em>7 days</em><br />
Location: <em>/var/log/apache2/bugzilla_access_log</em><br />
Error Log Archive every: <em>7 days</em><br />
Error Log Location: <em>/var/log/apache2/bugzilla_error_log</em><br />
Error Log Level: <em>Warnings</em></p></blockquote>
</li>
<li>Select the &#8220;Web Services&#8221; tab and disable any additional services selected.</li>
<li>Enable the new site by clicking the &#8220;Enabled&#8221; checkbox next to the site entry.</li>
<li>Click on the &#8220;Save&#8221; button to save the new configuration.</li>
<li>Restart the Web service to activate the new site.</li>
</ol>
<h4>Bugzilla</h4>
<p>In this installation, Bugzilla is installed in the <code>/opt/local/src</code> directory so as to keep it isolated from the &#8220;stock&#8221; operating system tools and utilities.  This makes upgrading either the operating system or Bugzilla easier and less likely to result in conflicts.  In order to further simplify future upgrades, a symbolic link (<code>/opt/local/www/bugzilla</code>) is used as the root web folder instead of directly utilizing the actual Bugzilla source directory.</p>
<ol>
<li>Download the latest Bugzilla source tarball.</li>
<li>Copy the tarball to source directory.
<p style="padding-left: 30px;"><code>sudo cp bugzilla-3.4.2.tar.gz /opt/local/src</code></p>
</li>
<li>Unpack the source tarball.
<p style="padding-left: 30px;"><code>cd /opt/local/src<br />
sudo tar xzf bugzilla-3.4.2.tar.gz</code></li>
<li>Change the owner and group to the default web server user.
<p style="padding-left: 30px;"><code>sudo chown -R _www:_www bugzilla-3.4.2</code></p>
</li>
<li>Create an alias in the web folder to the active Bugzilla source.
<p style="padding-left: 30px;"><code>sudo ln -s /opt/local/src/bugzilla-3.4.2 /opt/local/www/bugzilla</code></p>
</li>
</ol>
<h4>Perl Modules</h4>
<p>There are a number of perl modules (both required and optional) that Bugzilla requires for operating.  Fortunately, there are several utilities included in the Bugzilla directory that can be used to determine what needs installation as well as actually installing the necessary modules.  For these installations, it is strongly suggested that you run the commands in a root shell.</p>
<p>To install the perl modules:</p>
<ol>
<li>Create a root shell.
<p style="padding-left: 30px;"><code>sudo bash</code></p>
</li>
<li>Execute the check-modules.pl script.
<p style="padding-left: 30px;"><code>/opt/local/src/bugzilla-3.4.2/checksetup.pl --check_modules</code></p>
</li>
<li>Install all the <em>required</em> perl modules identified by the check-modules.pl script.</li>
<li>Install the appropriate database binding module (DBD:mysql)
<p style="padding-left: 30px;"><code>/usr/bin/perl install-module.pl DBD::mysql</code></p>
</li>
<li>Install any <em>optional</em> modules desired.</li>
<li>Exit from the root shell.
<p style="padding-left: 30px;"><code>exit</code></p>
</li>
</ol>
<h4>Mail</h4>
<p>Mac OS X Server already comes with a compatible mail transfer agent (Postfix) so no additional installation is necessary.  A working mail service is necessary for Bugzilla to issue event alerts and notifications.</p>
<h3>Configuration</h3>
<h4>localconfig</h4>
<p>The <code>localconfig</code> file is an auto-generated file that contains many of the core Bugzilla configuration variables.  Generation of the file is done by running the <code>checksetup.pl</code> script (with no additional parameters).  The resulting file is <em>not</em> immediately usable as it requires a couple quick updates to properly configure the database access.</p>
<ol>
<li>Execute the <code>checksetup.pl</code> script to generate the <code>localconfig</code> file.
<p style="padding-left: 30px;"><code>cd /opt/local/src/bugzilla-3.4.2<br />
./checksetup.pl</code></li>
<li>Change the $db_driver variable in the <code>localconfig</code> file.
<p style="padding-left: 30px;"><code>$db_driver = 'mysql'</code></p>
</li>
<li>Change the $db_pass variable in the <code>localconfig</code> file to the password for &#8216;bugs&#8217; user of the database.  (The &#8216;bugs&#8217; user will be created shortly.)
<p style="padding-left: 30px;"><code>$db_pass = '********'</code></p>
</li>
<li>Change the $webservergroup variable in the <code>localconfig</code> file.
<p style="padding-left: 30px;"><code>$webservergroup = '_www'</code></p>
</li>
</ol>
<h4>MySQL</h4>
<p>In order to provide a better working experience with Bugzilla, it is necessary to update some of the MySQL configuration variables.  In addition, a new database user must be created.</p>
<ol>
<li>Edit the /etc/my.cnf file to permit large attachments and many comments
<p style="padding-left: 30px;"><code>max_allowed_packet=4M</code></p>
</li>
<li>Edit the /etc/my.cnf file to allow small words in full-text indexes
<p style="padding-left: 30px;"><code>ft_min_word_len=2</code></p>
</li>
<li>Add the &#8216;bugs&#8217; database user with associated privileges.  Be sure to specify the same password for the &#8216;bugs&#8217; users as in the configuration of the <code>localconfig</code> file.
<p style="padding-left: 30px;"><code>mysql -u root -p<br />
mysql&gt; GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES, CREATE TEMPORARY TABLES, DROP, REFERENCES on bugs.* to bugs@localhost IDENTIFIED BY '********';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
mysql&gt; commit;<br />
mysql&gt; exit;</code></li>
<li>Run the checksetup.pl script again to create the database tables, groups, users, and indexes.  Be sure to note the created administrator account and password for future reference.</li>
</ol>
<h4>Bugzilla</h4>
<p>Bugzilla should now be accessible to a web browser at the domain specified earlier.  (http://bugzilla.example.com)  While it is usable in this state, there are some additional configuration settings that should be made with the administrator&#8217;s account.</p>
<ol>
<li>Login as the administrator using the bugzilla administrator&#8217;s email address and password previously set.</li>
<li>Click on the &#8220;Administration&#8221; link.</li>
<li>Click on the &#8220;Parameters&#8221; link.</li>
<li>Set the email address of the maintainer.
<p style="padding-left: 30px;"><code>bugadmin@example.com</code></p>
</li>
<li>Set the URL base of the installation.
<p style="padding-left: 30px;"><code>http://bugzilla.example.com/</code></p>
</li>
<li>Set the cookie domain for the service.
<p style="padding-left: 30px;"><code>bugzilla.example.com</code></p>
</li>
<li>Click on the &#8220;Save Changes&#8221; button to save the new parameters.</li>
</ol>
<h3>Related Links</h3>
<ul>
<li><a href="http://wiki.springsurprise.com/2009/10/06/configuring-radius-for-bugzilla-on-mac-os-x-server/">Configuring RADIUS support for Bugzilla</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://wiki.springsurprise.com/2009/09/30/installing-bugzilla-on-mac-os-x-server/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
