<?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>Musings of an Apple Systems Administrator &#187; solution</title>
	<atom:link href="http://www.jonsblog.org/tag/solution/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jonsblog.org</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 11 Jan 2012 19:33:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>10.7 Server Web Administration: Missing Manual</title>
		<link>http://www.jonsblog.org/2011/12/09/10-7-server-web-administration-missing-manual/</link>
		<comments>http://www.jonsblog.org/2011/12/09/10-7-server-web-administration-missing-manual/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 00:44:04 +0000</pubDate>
		<dc:creator>Jon Brown</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[10.7]]></category>
		<category><![CDATA[manual]]></category>
		<category><![CDATA[OSX Lion]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[solution]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=474</guid>
		<description><![CDATA[I just started using 10.7 Lion Server at my organization and I have to admit it is nice in some ways and infuriating in others. Apple has certainly fixed and introduced quite a few new features such as Profile Manager but have removed features like Mobile Access. The hardest hit service in my opinion when it comes to 10.7 server administration is the Web service. Apple has stripped this service completely out of the Server Admin app and has added a dumbed down version of the service to the Server app. If your unfamiliar the Server app is a program called "Server" that has the worst possible GUI interface and the least possible settings for all services that run through it which is a shame.]]></description>
			<content:encoded><![CDATA[<p>I just started using 10.7 Lion Server at my organization and I have to admit it is nice in some ways and infuriating in others. Apple has certainly fixed and introduced quite a few new features such as Profile Manager but have removed features like Mobile Access. The hardest hit service in my opinion when it comes to 10.7 server administration is the Web service. Apple has stripped this service completely out of the Server Admin app and has added a dumbed down version of the service to the Server app. If your unfamiliar the Server app is a program called &#8220;Server&#8221; that has the worst possible GUI interface and the least possible settings for all services that run through it which is a shame.</p>
<p>The purpose of this entry is to talk about 10.7 server and show you how to accomplish everything that you could accomplish from the Server Admin application through commands using terminal or edits to system files in the operating system. Everything below requires that you be logged in as the root user on the server in order to avoid permission issues.</p>
<p><strong>How to enable PHP </strong><br />
Run this command to check if PHP is enabled on 10.7 server.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>httpd.conf<span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> libphp5.so</pre></td></tr></table></div>

<p>If the output is</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">LoadModule php5_module libexec<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>libphp5.so</pre></td></tr></table></div>

<p>and not</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#LoadModule php5_module libexec/apache2/libphp5.so</span></pre></td></tr></table></div>

<p>then PHP is enabled. If it is the other way around with a # in the beginning of the line you can just edit the httpd.conf file manually with <span id="more-474"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> pico <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>httpd.conf</pre></td></tr></table></div>

<p>and remove the bracket manually and then restart the web server with</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> apachectl restart</pre></td></tr></table></div>

<p>Alternatively you can also enable this via a checkbox in the terrible server.app in 10.7.</p>
<p><strong>How to change the default file type </strong><br />
By default the landing page on all new sites is index.html if you would like to change this or the order in which a webpage searches for the index page then you need to change the default file type.</p>
<p>To do this edit the configuration file appropriate to your site name. Meaning you have to have already configured a site in the 10.7 server.app program once you have a site then you need to edit the site configuration file. If your site was called apple.com then your site configuration would be in /etc/apache2/sites/apple.com.conf or something like that.</p>
<p>You need to edit that file</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">pico <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>sites<span style="color: #000000; font-weight: bold;">/</span>nameofyoursite.conf</pre></td></tr></table></div>

<p>look for the following in the file</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>IfModule mod_dir.c<span style="color: #000000; font-weight: bold;">&gt;</span>
    DirectoryIndex index.html
<span style="color: #000000; font-weight: bold;">&lt;/</span>IfModule<span style="color: #000000; font-weight: bold;">&gt;</span></pre></td></tr></table></div>

<p>If you want to change the main page to index.php instead of index.html then replace index.html with index.php. If you want to add it as a secondary load page then you can change it to this.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>IfModule mod_dir.c<span style="color: #000000; font-weight: bold;">&gt;</span>
    DirectoryIndex index.html index.php
<span style="color: #000000; font-weight: bold;">&lt;/</span>IfModule<span style="color: #000000; font-weight: bold;">&gt;</span></pre></td></tr></table></div>

<p>once done save and restart apache.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> apachectl restart</pre></td></tr></table></div>

<p><strong>How to enable .htaccess </strong><br />
If you are going to be using mod_rewwrite at all for redirects or pretty permalinks (which is very common now) then you need to have this enabled. Again as stated before you have to have a site setup on the server through the server.app program. Once done locate your configuration file as outlined above and make the following changes.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">pico <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>sites<span style="color: #000000; font-weight: bold;">/</span>nameofyoursite.conf</pre></td></tr></table></div>

<p>Once your in the file look for something that looks similar to the following.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>Directory <span style="color: #ff0000;">&quot;/Users/yourname/Sites/&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
     Options Indexes +MultiViews
     AllowOverride All
     Order allow,deny
     Allow from All
<span style="color: #000000; font-weight: bold;">&lt;/</span>Directory<span style="color: #000000; font-weight: bold;">&gt;</span></pre></td></tr></table></div>

<p>It won&#8217;t look exactly the same but what you want to do is replace it with what you see above that will enable the .htaccess or mod_rewrite the line of code that actually does this is the &#8220;AllowOverride All&#8221; command. </p>
<p><strong>How to enable WebDav</strong><br />
To configure WebDAV Sharing for such users, follow these instructions before enabling any WebDAV share points.</p>
<p>Note: The instructions in this article include editing configuration files. You must have root access to edit these files. You should make a backup copy of each file prior to editing it.</p>
<p>This step is optional but highly recommended: Acquire and install a trusted SSL certificate, and use Server App to configure Web Service to use the certificate. You can use the server&#8217;s default, self-signed certificate for WebDAV Sharing, but iWork and other applications may warn that the certificate is &#8220;invalid&#8221;.</p>
<p>You need to edit the following configuration file</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">pico <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>httpd_webdavsharing.conf</pre></td></tr></table></div>

<p>Find the line &#8220;AuthType Digest&#8221; change Digest to Basic. This makes WebDAV Sharing use Basic authentication, which is required for Active Directory users.</p>
<p>Now edit this configuration file</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">pico <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>webapps<span style="color: #000000; font-weight: bold;">/</span>com.apple.webapp.webdavsharing.plist</pre></td></tr></table></div>

<p>find these lines</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>sslPolicy<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>integer<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">&lt;/</span>integer<span style="color: #000000; font-weight: bold;">&gt;</span></pre></td></tr></table></div>

<p>Change the 0 to 1. This makes WebDAV Sharing require SSL, which is the only secure way to use Basic authentication. Advise users to configure the iWork clients on their iOS devices with an &#8220;https&#8221; WebDAV URL, like: https://example.com/webdav</p>
<p><strong>How to enable the directory listing </strong><br />
Again as stated before you have to have a site setup on the server through the server.app program. Once done locate your configuration file as outlined above and make the following changes. </p>
<p>You need to edit that file</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">pico <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>sites<span style="color: #000000; font-weight: bold;">/</span>nameofyoursite.conf</pre></td></tr></table></div>

<p>find the words &#8220;AllowOverride&#8221; in that block where these words are you need to add this line. This line may already be in your file but it may be different simply update it to reflect these changes</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">Options <span style="color: #660033;">-Indexes</span> FollowSymLinks</pre></td></tr></table></div>

<p><strong>How to enable SSI</strong><br />
If you need to use Server Side Includes in your scripts or website files then do the following to enable it.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> pico <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #000000; font-weight: bold;">/</span>httpd.conf</pre></td></tr></table></div>

<p>look for these lines</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># AddType text/html .shtml</span>
<span style="color: #666666; font-style: italic;"># AddHandler server-parsed .shtml</span></pre></td></tr></table></div>

<p>Uncomment those 2 lines (remove the # in front of each of them). Now look in the same file for the following</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">Options FollowSymLinks</pre></td></tr></table></div>

<p>Add &#8220;Includes&#8221; to the 2nd line so it looks like</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">Options FollowSymLinks Includes</pre></td></tr></table></div>

<p>save the file and restart apache</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> apachectl restart</pre></td></tr></table></div>

<p><strong>How to enable VHOSTS</strong><br />
VHOSTS or Virtual Hosts enable you to have multiple domain names mapped to the same site or IP address. To enable this edit the httpd.conf file</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> pico <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>httpd.conf</pre></td></tr></table></div>

<p>find this line</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#Include /private/etc/apache2/extra/httpd-vhosts.conf</span></pre></td></tr></table></div>

<p>change it to</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">Include <span style="color: #000000; font-weight: bold;">/</span>private<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>extra<span style="color: #000000; font-weight: bold;">/</span>httpd-vhosts.conf</pre></td></tr></table></div>

<p>this will effectively enable VHOSTS. Now you should restart apache.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> apachectl restart</pre></td></tr></table></div>

<p><strong>How to enable CGI</strong><br />
Again as stated before you have to have a site setup on the server through the server.app program. Once done locate your configuration file as outlined above and make the following changes.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">pico <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>sites<span style="color: #000000; font-weight: bold;">/</span>nameofyoursite.conf</pre></td></tr></table></div>

<p>Once your in the file look for something that looks similar to the following.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">     Options Indexes +MultiViews</pre></td></tr></table></div>

<p>It won&#8217;t look exactly the same but what need to do is add &#8220;-ExecCGI&#8221; after &#8220;+MultiViews&#8221; it should look something like this.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">     Options Indexes +MultiViews <span style="color: #660033;">-ExecCGI</span></pre></td></tr></table></div>

<p>This will enable CGI and allow you to run CGI scripts in Apache. Now you should restart apache.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> apachectl restart</pre></td></tr></table></div>

<p><strong>How to enable Logging</strong><br />
This one boggled my mind, by default website logging is not enabled and again there is no way to enable it in the GUI. You will want to have this enabled to catch errors and fix faulty code. To enable this again we are assuming you already have a site configured with the server.app program. Once done locate your configuration file as outlined above and make the following changes.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">pico <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>sites<span style="color: #000000; font-weight: bold;">/</span>nameofyoursite.conf</pre></td></tr></table></div>

<p>find the line &#8220;DocumentRoot&#8221;, Under that line paste the following</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">CustomLog <span style="color: #ff0000;">&quot;/var/log/apache2/access_log&quot;</span> combinedvhost
ErrorLog <span style="color: #ff0000;">&quot;/var/log/apache2/error_log&quot;</span></pre></td></tr></table></div>

<p>it should now look like this</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">DocumentRoot <span style="color: #ff0000;">&quot;/path/to/your/website/&quot;</span>
CustomLog <span style="color: #ff0000;">&quot;/var/log/apache2/access_log&quot;</span> combinedvhost
ErrorLog <span style="color: #ff0000;">&quot;/var/log/apache2/error_log&quot;</span></pre></td></tr></table></div>

<p>Now you should restart apache.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> apachectl restart</pre></td></tr></table></div>

<p><strong>How to add a domain alias</strong><br />
This is a common thing that most web admins do to map domains to a single site. This again has been removed from the functionality of the server.app on 10.7 server but is a pretty easy to add. To enable this again we are assuming you already have a site configured with the server.app program. Once done locate your configuration file as outlined above and make the following changes.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">pico <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>sites<span style="color: #000000; font-weight: bold;">/</span>nameofyoursite.conf</pre></td></tr></table></div>

<p>in the site definition file, look for a line that says</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">ServerName example.com
ServerAlias www.example.com</pre></td></tr></table></div>

<p>where example.com is the domain of your site. You can have more than one alias, just separate them by a spaces on the same line like so.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">ServerName example.com
ServerAlias www.example.com alias2.example.com alias3.example.com</pre></td></tr></table></div>

<p>Now you should restart apache.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> apachectl restart</pre></td></tr></table></div>

<p><strong>How to restore factory settings to 10.7 Web Service</strong><br />
This one is important. As stated above you should be backing up these config files before you edit them and then making your changes. In the event that something went wrong you can always reset them back to the original settings. </p>
<p>Run this command</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> serveradmin <span style="color: #7a0874; font-weight: bold;">command</span> web:<span style="color: #007800;">command</span>=restoreFactorySettings</pre></td></tr></table></div>

<p>I got this command by calling Apple directly they also suggested restarting the machine after the restore command, once the computer is back up turn off and then turn on web service to ensure it is working propperly.</p>
<p><strong>Conclusion</strong><br />
All of these commands allow you to leverage Apache and accomplish the tasks that were once easy to accomplish with the Server Admin tool in 10.6 server. There are two options here, learn to love the command line or do not upgrade to 10.7 Lion. Apple is streamlining their GUI interfaces for their tools however there is still power under the hood. Do not be afraid to re-configure these systems Apache, PHP and MYSQL can be installed, modified and improved all from the command line and in some cases they work better after you do. Its not time to quit in my opinion its time to roll up our sleeves and start learning the core of what makes an OSX server truly great and that starts with understanding the open source software that comes bundled with them.</p>
<p>I hope that you all found this article and walkthrough educational, as always please feel free to interact with me by posting questions and comments and I will answer them as best as I can. If you feel like any of this is wrong or could be improved upon also please leave a comment below, thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2011/12/09/10-7-server-web-administration-missing-manual/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing MYSQL on OSX Lion Server</title>
		<link>http://www.jonsblog.org/2011/11/28/installing-mysql-on-osx-lion-server/</link>
		<comments>http://www.jonsblog.org/2011/11/28/installing-mysql-on-osx-lion-server/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 20:40:19 +0000</pubDate>
		<dc:creator>Jon Brown</dc:creator>
				<category><![CDATA[Bug Fixes]]></category>
		<category><![CDATA[OSX Server Configuration]]></category>
		<category><![CDATA[OSX System Administration]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[OSX Lion]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[solution]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=448</guid>
		<description><![CDATA[It is a fact that Apple has migrated itself away from MYSQL. It is also a fact that most people who continue to buy Apple Servers have been using MYSQL for some time and have websites or other content that sill relies on this technology. Just because it is not endorsed or pre-configured by Apple however does not mean that it can not be used. On the contrary installing and configuring MYSQL to run on an OSX Lion server is moderately easy and gives greater insight as to how MYSQL works (If your a novice to intermediate MYSQL user like me). Lets get started with a brief walkthrough of how to install MYSQL on an OSX Lion Server.]]></description>
			<content:encoded><![CDATA[<p>It is a fact that Apple has migrated itself away from MYSQL. It is also a fact that most people who continue to buy Apple Servers have been using MYSQL for some time and have websites or other content that sill relies on this technology. Just because it is not endorsed or pre-configured by Apple however does not mean that it can not be used. On the contrary installing and configuring MYSQL to run on an OSX Lion server is moderately easy and gives greater insight as to how MYSQL works (If your a novice to intermediate MYSQL user like me). Lets get started with a brief walkthrough of how to install MYSQL on an OSX Lion Server.</p>
<p><strong>Installation &#038; Configuration</strong></p>
<p>1. Download and install the 64-bit 10.6+ version of MYSQL installer package together with the startup files <a href="http://mysql.he.net/Downloads/MySQL-5.5/mysql-5.5.14-osx10.6-x86_64.dmg">here</a>.</p>
<p>http://dev.mysql.com/downloads/mysql/</p>
<p>2. Mount the Disk Image (I mean open/double-click the DMG file) and install MySQL server by double-clicking the PKG file (in my case mysql-5.5.14-osx10.6-x86_64.pkg) and follow onscreen instructions. ( It will ask for Master password, as it installs MySQL server in /usr/local )</p>
<p>Current latest version is 5.5.14 which I’ll be using to install on my server.</p>
<p>Open the DMG and you will see that the first item is the MySQL software, the 2nd item allows MySQL to start when the Mac is booted and the third is a System Preference that allows start/stop operation and a preference to enable it to start on boot. Run all of these.</p>
<p>Once the installs are done you can start the mysql server right from the System Preferences which has a new preference in the “Other” category called “MySQL” click start and now it is running. <span id="more-448"></span></p>
<p>To find the MySQL version from the terminal, type at the prompt <!--more--></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mysql <span style="color: #660033;">-v</span></pre></td></tr></table></div>

<p>If you got the error: ERROR 2002 (HY000): Can&#8217;t connect to local MySQL server through socket &#8216;/tmp/mysql.sock&#8217; </p>
<p>then mysql was not started, go back to the System Preference and start the database.</p>
<p>3. Run the following commands</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mysql
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>support-files<span style="color: #000000; font-weight: bold;">/</span>my-small.cnf <span style="color: #000000; font-weight: bold;">/</span>private<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>my.cnf
open <span style="color: #660033;">-e</span> <span style="color: #000000; font-weight: bold;">/</span>private<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>my.cnf</pre></td></tr></table></div>

<p>replace &#8220;/tmp/mysql.sock&#8221; with &#8220;/var/mysql/mysql.sock&#8221; at two places near the top.<br />
Create a folder called &#8220;mysql&#8221; (if you don&#8217;t already have one) in the /var directory with the right permissions:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>var
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> mysql
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> mysql mysql 
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">775</span> mysql</pre></td></tr></table></div>

<p>This command will circumvent the dreaded mysql 2002 socket error.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>mysql
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>mysql.sock <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>mysql.sock</pre></td></tr></table></div>

<p>4. Create your alias, this is important so that you can run MYSQL queries through the terminal.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">alias</span> mysql <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mysql
<span style="color: #7a0874; font-weight: bold;">alias</span> mysqladmin <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mysqladmin</pre></td></tr></table></div>

<p>optionally you can edit the ~/.profile file to make your aliases (This should be done as root)</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">pico ~<span style="color: #000000; font-weight: bold;">/</span>.profile</pre></td></tr></table></div>

<p>then add this line below</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #007800;">$PATH</span></pre></td></tr></table></div>

<p>*Please note /usr/local/mysql is only symlink to /usr/local/mysql-5.5.14-osx10.6-x86_64 which means when you upgrade to new version symlink will be changed to point to new version but won’t be deleting the older version. However you need to copy your data directory to new location to make sure your existing databases are intact post upgrade.</p>
<p>5. Set the master MYSQL password, there are 2 ways to do this one is a regular way and the other provides additional security and disables all other access</p>
<p><b>Regular Way</b></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">mysqladmin <span style="color: #660033;">-u</span> root password <span style="color: #ff0000;">'yourpasswordhere'</span></pre></td></tr></table></div>

<p>** use the single quotes. Then when login to mysql to test your password</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">mysql <span style="color: #660033;">-u</span> root <span style="color: #660033;">-pyourpasswordhere</span></pre></td></tr></table></div>

<p><b>Secure Way</b></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> mysql_secure_installation
&nbsp;
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE<span style="color: #000000; font-weight: bold;">!</span> PLEASE READ EACH STEP CAREFULLY<span style="color: #000000; font-weight: bold;">!</span>
In order to log into MySQL to secure it, we<span style="color: #ff0000;">'ll need the current
password for the root user. If you'</span>ve just installed MySQL, and
you haven<span style="color: #ff0000;">'t set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):</span></pre></td></tr></table></div>

<p>Go ahead and just hit enter if this is a new installation and no password currently exists, follow the prompts to set up a new root password – this is a root password just for mysql separate from the root password of OS X you should set this.</p>
<p>You also get asked about:</p>
<ul>
<li> Removing anonymous users?
<li> Disallow root login remotely?
<li> Remove test database and access to it?
<li> Reload privilege tables now?
<li> If this is a new installation you can just answer yes to  the questions.
</ul>
<p>Once the root user and password is set, you have to interact with mysql with the username and password, so access via command line is (note that there is no space between -p and the password)</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">mysql <span style="color: #660033;">-u</span> root -p<span style="color: #7a0874; font-weight: bold;">&#91;</span>password<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></td></tr></table></div>

<p>Now that you have MYSQL running you need to start an instance or a main profile for MYSQL to run. I have found the easiest way to do this is to install PHPMYADMIN and since most people in my opinion (Again novice to intermediate MYSQL user here) use this great tool to navigate around MYSQL on a daily basis. Here is a brief walkthrough on how to install and configure PHPMYADMIN on 10.7 Lion Server</p>
<p><strong>Installation &#038; Configuration</strong></p>
<p>1. Change the socket location in your PHP configuration by editing the php.ini file. You need to do a search and replace here. Search and replace all instances of </p>
<p>/var/mysql/mysql.sock</p>
<p>with </p>
<p>/tmp/mysql.sock</p>
<p>Once done you should be able to run the following command and it should reflect the new updated values you just applied.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">grep</span> .default_socket <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php.ini</pre></td></tr></table></div>

<p>while editing the php.ini file you need to comment out or enable the following extensions.</p>
<p>extension=php_mysql.dll<br />
extension=php_mysqli.dll</p>
<p>To check your work again you can run this command to ensure they are enabled.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">grep</span> mysql <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php.ini<span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> ext</pre></td></tr></table></div>

<p>Once done restart Apache</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> apachectl restart</pre></td></tr></table></div>

<p>2. Download PHPMYADMIN to the default web directory in Lion</p>
<p>http://www.phpmyadmin.net/home_page/index.php</p>
<p>The full path is</p>
<p>/Library/Server/Web/Data/Sites/Default</p>
<p>I put my PHPMYADMIN in a folder called PHP so</p>
<p>/Library/Server/Web/Data/Sites/Default/PHP</p>
<p>and I could then browse to it by going to</p>
<p>http://server.domain.name/PHP/</p>
<p>this is assuming that you have already configured or turned on web services which I will not go into here since it is a very basic step. I will write a more in depth article and how to on the complexities of running an 10.7 web server in the future however.</p>
<p>Run this command on the PHP Config folder</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> o+<span style="color: #c20cb9; font-weight: bold;">w</span> <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Server<span style="color: #000000; font-weight: bold;">/</span>Web<span style="color: #000000; font-weight: bold;">/</span>Data<span style="color: #000000; font-weight: bold;">/</span>Sites<span style="color: #000000; font-weight: bold;">/</span>Default<span style="color: #000000; font-weight: bold;">/</span>PHP<span style="color: #000000; font-weight: bold;">/</span>config</pre></td></tr></table></div>

<p>3. Now we are ready to run the set up by going to</p>
<p>http://localhost/PHP/setup</p>
<p>The new server to be configured is the localhost, click new server and then the only other configurations are the local mysql user and the password.</p>
<p>Add in the username, by default “root” is assumed, add in the password, click on save and you are returned to the previous screen.</p>
<p>Make sure you click on save, then a config.inc.php is now in the /config directory, move this file to the root level of /phpmyadmin and then remove the empty /config directory.</p>
<p>Now going to http://localhost/PHP/ will now allow you to interact with your mysql databases.</p>
<p>I hope that you all found this article and walkthrough educational, as always please feel free to interact with me by posting questions and comments and I will answer them as best as I can. If you feel like any of this is wrong or could be improved upon also please leave a comment below, thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2011/11/28/installing-mysql-on-osx-lion-server/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Deploy Studio Server to the Rescue</title>
		<link>http://www.jonsblog.org/2011/07/30/deploy-studio-server-to-the-rescue/</link>
		<comments>http://www.jonsblog.org/2011/07/30/deploy-studio-server-to-the-rescue/#comments</comments>
		<pubDate>Sat, 30 Jul 2011 04:02:48 +0000</pubDate>
		<dc:creator>Jon Brown</dc:creator>
				<category><![CDATA[Product Reviews]]></category>
		<category><![CDATA[deploy]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[solution]]></category>
		<category><![CDATA[studio]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=385</guid>
		<description><![CDATA[As a Mac System Admin working in the Private sector, I must confess I find myself like a kid in the candy store looking, and trying out new products created by third party vendors that make my life, job and the user experience for my clients easier and more productive. I must stress that most [...]]]></description>
			<content:encoded><![CDATA[<p>As a Mac System Admin working in the Private sector, I must confess I find myself like a kid in the candy store looking, and trying out new products created by third party vendors that make my life, job and the user experience for my clients easier and more productive. I must stress that most admins can not fully share in my joy due to job or security restrictions. Admins in the Government sector for example can only use sanctioned tools and or methods for dealing with common Server Admin problems. These often lead to long, lenghtly solutions that could be eased with the use of third party software solutions. The restrictions are in place to keep security measures tight and ensure that proper procedures are followed.</p>
<p>Again, since I do not have any looming restrictions in my workplace I have found a piece of software that would never be allowed in larger Government facilities but works nicely for what I need. The problem, from time to time I need to re-image or re-core a massive amount of computers, sometimes hundreds of computers. I have a team of two, me and a Helpdesk Technician. This is a daunting task and since I do not like to work weekends, I find that Deploy Studio Server helps me keep my sanity in such situations.</p>
<p>This freeware tool can be used to create deployment files using Netboot, external USB or FireWire drives, or any AFP, SMB, or NFS sharepoint on the network. DeployStudio works with Mac OS X 10.4.11 to 10.6.8 at this point, and is updated regularly to include new OS versions. The package consists of DeployStudio Server, DeployStudio Assistant, DeployStudio Admin, and diffPackageMaker.</p>
<p>DeployStudio Server creates a network based deployment server containing the images. Assistant is used to configure the server and to create the NetInstall sets, while Admin is used to monitor deployments, manage disk images and scripts, enter configurations, and more. diffPackageMaker can look at the difference between two file system snapshots and create installation packages based on what has been changed or added. <span id="more-385"></span></p>
<p><center>
<div class="lyte" id="WYL_YIV6Bt3L1ks" style="width:480px;height:360px;"><noscript><a href="http://youtu.be/YIV6Bt3L1ks"><img src="http://img.youtube.com/vi/YIV6Bt3L1ks/0.jpg" alt="" width="480" height="340" /><br />Watch this video on YouTube</a> Embedded with WP YouTube Lyte.</noscript><script type="text/javascript"><!-- 
 (function(){var d=document;var w=window;if(w.addEventListener){w.addEventListener('load', insert, false)}else{w.onload=insert};setTimeout(insert, 1000);function insert(){if(!d.getElementById('lytescr')){lytescr=d.createElement('script');lytescr.async=true;lytescr.id='lytescr';lytescr.src='http://www.jonsblog.org/wp-content/plugins/wp-youtube-lyte/lyte/lyte-min.js?wylver=1.0.0';h=d.getElementsByTagName('script')[0];h.parentNode.insertBefore(lytescr, h)}};}()) 
 --></script></div>
<div class="lL"></div>
<p></center></p>
<p>I highly recommend using this fine product if you are in the fortunate position as myself and you are not under any pressure or regulations. This requires the use of an in-house server and it installs itself as a service on it. You configure the service to deploy images that you create, and the best part is that it can perform common tasks that will save you time after the re-imaging process is completed. Tasks like setting the computer name, setting up local accounts, binding the computer to a directory server and much more. I describe it as Apple Netboot + Apple Automater = Deploy Studio Server. This is a useful tool that I highly recommend. Check out this instructional video that goes over how to set it up and use it.</p>
<p>I use Deploy Studio Server in my workplace and can field any questions you may have regarding its functionality, setup and configuration and ease of use. Write me a comment below and I will be happy to help!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2011/07/30/deploy-studio-server-to-the-rescue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10.6.8 Installing SSL Certificates Correctly</title>
		<link>http://www.jonsblog.org/2011/07/16/10-6-8-installing-ssl-certificates-correctly/</link>
		<comments>http://www.jonsblog.org/2011/07/16/10-6-8-installing-ssl-certificates-correctly/#comments</comments>
		<pubDate>Sat, 16 Jul 2011 02:46:57 +0000</pubDate>
		<dc:creator>Jon Brown</dc:creator>
				<category><![CDATA[OSX Server Configuration]]></category>
		<category><![CDATA[SSL Encryption]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[solution]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=367</guid>
		<description><![CDATA[I am well aware of how to install and setup SSL certificates in OSX Server but that was not always the case. I am writing this how to for those less experienced who may find this article helpful. There are two types of SSL certificates, that you can use on your OSX Server. Self Signed [...]]]></description>
			<content:encoded><![CDATA[<p>I am well aware of how to install and setup SSL certificates in OSX Server but that was not always the case. I am writing this how to for those less experienced who may find this article helpful. There are two types of SSL certificates, that you can use on your OSX Server. Self Signed Certificates are ones that are created on the server and are not digitally verified by a third party service. You can use these certificates to encrypt or secure your servers services but you will ultimately confuse users due to the never ending string of warnings about untrusted certificates. The second type of certificate requires a self signed certificate as the base but then gets verified by a third party service. We use <a href="https://www.godaddy.com/ssl/ssl-certificates.aspx">GoDaddy</a> for our certificates and they work pretty well, there are many other services out there that offer moderately priced certificate verification services that will offer a trusted connection. This type of certificate is transparent to the user and simply encrypts the data without any warning message. </p>
<p>What I struggled with for a while as a System Administrator with little experience in the SSL realm was that no matter how many ways I tried to install the certificate for use on my server users would still get warnings saying that the certificate was not trusted. Through some trial and error and luck I figured out the proper steps to making sure that all of your services and your users can use SSL without the heartache of untrusted warning messages. The steps to follow are simple:</p>
<ol>
1. Create your Self Signed certificate in Server Admin.<br />
2. Generate a CSR request.<br />
3. Import the CSR into the SSL Certificate authority.<br />
4. Import the returned signed certificate into your server.<br />
5. Import the returned intermediary certificate into your server.<br />
6. Configure Apache to work with your certificate.<br />
7. Restart and re-assign certificates to your services.</ol>
<p><span id="more-367"></span><br />
<strong>Step 1:</strong><br />
Launch Server Admin and select the hostname of the server that you are configuring. Chose the Certificate icon to display the &#8220;Default&#8221; self-signed certificate. You&#8217;ll need to edit this to something appropriate for your server. It&#8217;s important that you set the &#8220;Common Name&#8221; field to the fully qualified domain A-name of your server. Once you&#8217;ve edited your self-signed Default certificate, you next need to generate the CSR.</p>
<p><strong>Step 2:</strong></p>
<p>In the same pane in Server Admin is the little sprocket pull-down with the option to &#8220;Generate a Certificate Signing Request (CSR)&#8230;&#8221;. A window will pull down with a field to enter an email address. Don&#8217;t bother with this. Just drag the certificate icon to your desktop. Sitting on on your desktop is a text clipping that looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #660033;">-----BEGIN</span> CERTIFICATE REQUEST-----
MIIBnTCCAQYCAQAwXTELMAkGA1UEBhMCU0cxETAPBgNVBAoTCE0yQ3J5cHRvMRIw
EAYDVQQDEwlsb2NhbGhvc3QxJzAlBgkqhkiG9w0BCQEWGGFkbWluQHNlcnZlci5l
eGFtcGxlLmRvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAr1nYY1Qrll1r
uB<span style="color: #000000; font-weight: bold;">/</span>FqlCRrr5nvupdIN+3wF7q915tvEQoc74bnu6b8IbbGRMhzdzmvQ4SzFfVEAuM
MuTHeybPq5th7YDrTNizKKxOBnqE2KYuX9X22A1Kh49soJJFg6kPb9MUgiZBiMlv
tb7K3CHfgw5WagWnLl8Lb+ccvKZZl+8CAwEAAaAAMA0GCSqGSIb3DQEBBAUAA4GB
AHpoRp5YS55CZpy+wdigQEwjL<span style="color: #000000; font-weight: bold;">/</span>wSluvo+WjtpvP0YoBMJu4VMKeZi405R7o8oEwi
PdlrrliKNknFmHKIaCKTLRcU59ScA6ADEIWUzqmUzP5Cs6jrSRo3NKfg1bd09D1K
9rsQkRc9Urv9mRBIsredGnYECNeRaK5R1yzpOowninXC
<span style="color: #660033;">-----END</span> CERTIFICATE REQUEST-----</pre></div></div>

<p><strong>Step 3:</strong><br />
Here is where you will actually purchase the certificate. Head over to <a href="https://www.godaddy.com/ssl/ssl-certificates.aspx">GoDaddy</a> or any other vendor that sells SSL certificates and enter your information. When it asks you for your CSR enter the text in your text clipping. Be sure to include the &#8220;&#8212;BEGIN CERTIFICATE REQUEST&#8230;&#8212;&#8221; and &#8220;&#8212;END&#8230;&#8212;&#8221; lines! Once your certificate request has been verified you will be ready to proceed to the next step.</p>
<p><strong>Step 4:</strong><br />
Usually within a couple hours, you should get an email with your new SSL certificate. The email will come with instructions, but if you have a stock Snow Leopard Server, it might be better to do it &#8220;the Mac way&#8221; instead of using their generic Apache instructions.</p>
<p>Back in Server Admin, select that self-signed certificate you edited earlier in Step 1, go to that little sprocket thing again, and this time choose &#8220;Add Signed or Renewed Certificate from Certificate Authority&#8230;&#8221;. You&#8217;ll have a window drop down&#8211;drag and drop all of the .crt files you got from your SSL provider here. That&#8217;s your signed certificate. Server Admin will put all the parts where they belong.</p>
<p><strong>Step 5:</strong><br />
Here is where most inexperienced Server Admins stop, this is not the last step. The certificate is valid in Server Admin however, it relies on the Keychain in the OSX Server to validate requests. Open Keychain Access, you&#8217;ll see that it says (in red letters) &#8220;This certificate was signed by an unknown authority.&#8221; You need add the intermediary certificate to your server. To do so double click on the gd_intermediate.crt file and it should automatically update that certificate to a nice green color and render it as valid.</p>
<p><strong>Step 6:</strong><br />
Now that you have Server Admin configured and the Keychain is happy, you need to add the gd_bundle.crt file and configure Apache. This is less daunting then you might think. You should get a gd_bundle.crt file when you purchase your certificate. If you have a .crt file that has the word &#8220;Bundle&#8221; somewhere in it then this is the file you need to use. Copy this file to the /etc/apache2/ folder on your server. You will need to copy it as root! If your file is named gd_bundle.crt then copy and replace the one that exists on your server. Once done your finished with this step.</p>
<p>If your file is not named this way then copy the file into your /etc/apache2/ folder and modify the http.conf file located there and update this path, see below:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>IfModule mod_ssl.c<span style="color: #000000; font-weight: bold;">&gt;</span>
    SetEnvIf User-Agent <span style="color: #ff0000;">&quot;.*MSIE.*&quot;</span> nokeepalive ssl-unclean-shutdown
    SSLPassPhraseDialog <span style="color: #7a0874; font-weight: bold;">exec</span>:<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>getsslpassphrase
    SSLSessionCache shmcb:<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>ssl_scache<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">512000</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
    SSLSessionCacheTimeout <span style="color: #000000;">300</span>
    SSLMutex <span style="color: #c20cb9; font-weight: bold;">file</span>:<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>ssl_mutex
    SSLRandomSeed startup <span style="color: #7a0874; font-weight: bold;">builtin</span>
    SSLRandomSeed connect <span style="color: #7a0874; font-weight: bold;">builtin</span>
    AddType application<span style="color: #000000; font-weight: bold;">/</span>x-x509-ca-cert crt
    AddType application<span style="color: #000000; font-weight: bold;">/</span>x-pkcs7-crl crl
    SSLCertificateChainFile <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>the_name_of_your_ssl_bundle_file.crt
<span style="color: #000000; font-weight: bold;">&lt;/</span>IfModule<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>After saving httpd.conf, test out your Apache 2.2 configuration file by invoking this command.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">bash-<span style="color: #000000;">3.2</span><span style="color: #666666; font-style: italic;"># apachectl -t</span>
Syntax OK</pre></div></div>

<p><strong>Step 7:</strong><br />
This last step is the one that had me banging my head against a wall for the longest time. You must restart your server once done, you must go through all of the services running on your server and un-assign, save and then re-assign and save the SSL certificates you need. This is the only way that I was able to get my Mail service and Web services (web sites) working with SSL consistently. Once done another restart does not hurt. Test and verify that everything is working. </p>
<p>I really hope that you find this walkthrough useful. If you did please leave a comment below, post a question or suggest a better, easier or different way to manage and install SSL certificates on an OSX Server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2011/07/16/10-6-8-installing-ssl-certificates-correctly/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>10.6.8 Server high CPU usage, hwmond culprit</title>
		<link>http://www.jonsblog.org/2011/07/10/10-6-8-server-high-cpu-usage-hwmond-culprit/</link>
		<comments>http://www.jonsblog.org/2011/07/10/10-6-8-server-high-cpu-usage-hwmond-culprit/#comments</comments>
		<pubDate>Sun, 10 Jul 2011 15:13:35 +0000</pubDate>
		<dc:creator>Jon Brown</dc:creator>
				<category><![CDATA[Mail Server]]></category>
		<category><![CDATA[OSX System Administration]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[cpu]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[solution]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[usage]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=359</guid>
		<description><![CDATA[It seems no matter how careful Apple is each OS update (especially server updates) reveals its own challenges for the user, that leaves them wishing that they had not left their stable platform for the bug fixes that made that update so desirable. the 10.6.8 server update was no different it claimed to fix such [...]]]></description>
			<content:encoded><![CDATA[<p>It seems no matter how careful Apple is each OS update (especially server updates) reveals its own challenges for the user, that leaves them wishing that they had not left their stable platform for the bug fixes that made that update so desirable. the 10.6.8 server update was no different it claimed to fix such long time bugs as Server Side Rules which has been a thorn in the side of OSX Server Administrators everywhere who use OSX Servers as their primary email server. So many of us including myself, downloaded the update and wished for the best. Once done, we all noticed the same bug, extremely high CPU usage on XServes running the new 10.6.8 software and the culprit, hwmond. Hey, hwmond, you are supposed to monitor the hard drives in the XServe and not hog all the resources what gives? Was my initial reaction so I started Googling I found that the hwmond was a service that Apple launches to monitor hardware, it can not be unloaded easily like other launch daemons I ran </p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> launchctl unload <span style="color: #000000; font-weight: bold;">/</span>System<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>LaunchDaemons<span style="color: #000000; font-weight: bold;">/</span>com.apple.hwmond.plist</pre></div></div>

<p> which initially threw an odd error, looked at the list of loaded items by running launchctl list on the server and noticed that it was gone. I restarted my XServe and sure enough it had loaded itself. Figuring that there must be something in the OS automatically loading this on each reboot I started searching ways to modify or disable hwmond on my server. In my case I needed to stop the high CPU usage so badly that I was willing to make the tradeoff, of not having hardware monitoring enabled on my system for a modicum of stability for my users, and since this was an email server it seemed like a fair tradeoff. Especially since it looked like the hwmond process could be the process that would cause the most damage to my system if it was allowed to continue and then would be the thing to notify me that the hardware had failed due to extremely high CPU usage over a long period of time. I ran across a post made by Apple <a title="http://support.apple.com/kb/TS2066" href="http://support.apple.com/kb/TS2066">http://support.apple.com/kb/TS2066</a> and decided to take a read, basically the issue that this resolves is hwmond not working and having a tag in the plist file that disables hwmond. Since this was my goal I did the opposite of what the knowledge base suggested, instead of removing the said code from the plist, I put the code into the plist and then rebooted my XServe.<span id="more-359"></span></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>?xml <span style="color: #007800;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #007800;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span>?<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;!</span>DOCTYPE plist PUBLIC <span style="color: #ff0000;">&quot;-//Apple//DTD PLIST 1.0//EN&quot;</span> <span style="color: #ff0000;">&quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>plist <span style="color: #007800;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>dict<span style="color: #000000; font-weight: bold;">&gt;</span>
          <span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>Label<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
          <span style="color: #000000; font-weight: bold;">&lt;</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>com.apple.hwmond<span style="color: #000000; font-weight: bold;">&lt;/</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>
          <span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>OnDemand<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
          <span style="color: #000000; font-weight: bold;">&lt;</span>false<span style="color: #000000; font-weight: bold;">/&gt;</span>
          <span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>Program<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
          <span style="color: #000000; font-weight: bold;">&lt;</span>string<span style="color: #000000; font-weight: bold;">&gt;/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>hwmond<span style="color: #000000; font-weight: bold;">&lt;/</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>
          <span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>ProgramArguments<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
          <span style="color: #000000; font-weight: bold;">&lt;</span>array<span style="color: #000000; font-weight: bold;">&gt;</span>
                    <span style="color: #000000; font-weight: bold;">&lt;</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>hwmond<span style="color: #000000; font-weight: bold;">&lt;/</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>
                    <span style="color: #000000; font-weight: bold;">&lt;</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>-s255<span style="color: #000000; font-weight: bold;">&lt;/</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>
          <span style="color: #000000; font-weight: bold;">&lt;/</span>array<span style="color: #000000; font-weight: bold;">&gt;</span>
          <span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>ServiceIPC<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
          <span style="color: #000000; font-weight: bold;">&lt;</span>false<span style="color: #000000; font-weight: bold;">/&gt;</span>
          <span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>Disabled<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
          <span style="color: #000000; font-weight: bold;">&lt;</span>true<span style="color: #000000; font-weight: bold;">/&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;/</span>dict<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;/</span>plist<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>Once the server rebooted I was back in business. My server&#8217;s CPU usage was back to normal and life was grand. Three days later, I restarted my server for an update to Virusbarrier the software I use to help block unwanted attacks on my server, and the high CPU issue returned. I looked at the hwmond.plist file and sure enough it had been re-enabled. I applied the fix above and restarted and it seemed to take. Well this is by no means a permanent fix but then I found this forum post <a href="https://discussions.apple.com/thread/3138473?start=0&#038;tstart=0">https://discussions.apple.com/thread/3138473?start=0&#038;tstart=0</a> It seems as though Apple has been informed of the issue and they are working on a fix. But as an update sceptic I find myself chuckling inside, the 10.6.9 update will claim to fix the hwomond cpu issue but what new issues will lie lurking in the wings to terrorize my system? Only Apple knows or maybe they just don&#8217;t have a clue. Hopefully they will come up with a fix, until then I have learned my lesson, I will not update my system so cavalierly in the future. I welcome your feedback and let me know what you have done to combat this issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2011/07/10/10-6-8-server-high-cpu-usage-hwmond-culprit/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Solr, WordPress &amp; OSX Server</title>
		<link>http://www.jonsblog.org/2011/06/28/solr-wordpress-osx-server/</link>
		<comments>http://www.jonsblog.org/2011/06/28/solr-wordpress-osx-server/#comments</comments>
		<pubDate>Tue, 28 Jun 2011 14:17:46 +0000</pubDate>
		<dc:creator>Jon Brown</dc:creator>
				<category><![CDATA[OSX Server Configuration]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[Solr]]></category>
		<category><![CDATA[solution]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=262</guid>
		<description><![CDATA[I have long been a fan of WordPress and not so much a fan of the search engine functionality that comes boxed with it. As an Apple Systems Admin I have several WordPress websites running on several OSX Servers. One of the sites that I administer finally got to the size to where the search [...]]]></description>
			<content:encoded><![CDATA[<p>I have long been a fan of WordPress and not so much a fan of the search engine functionality that comes boxed with it. As an Apple Systems Admin I have several WordPress websites running on several OSX Servers. One of the sites that I administer finally got to the size to where the search capabilities of WordPress fell short of the clients desire and I was forced to look into other avenues for searching. I came across, solar. Solr is an open source enterprise search server based on the Lucene Java search library, with XML/HTTP and JSON APIs, hit highlighting, faceted search, caching, replication, and a web administration interface. This looked extremely promising however getting all of the information that I needed in order to get this running on my servers proved to be a cumbersome process, so I am now writing this to consolidate all of the steps and information that I learned while installing and getting Solr to run on our servers.</p>
<p>The first step is to download all of the needed files, download the most recent version of <a href="http://drupal.org/project/apachesolr">Solr</a>, and the <a href="http://wordpress.org/extend/plugins/solr-for-wordpress/">Solr for WordPress plugin</a>. The first part of the documentation here will be on how to install and get Solr running and then the second portion will focus on configuring the Solr for WordPress plugin. For this walkthrough I will be using the example application that comes with Solr. ** Before we proceed you need to open the port 8983 in your servers firewall and or hardware firewall appliance for public access.</p>
<p>1. Expand the Solr archive into a folder in the Applications folder called Solr (/Applications/Solr)</p>
<p>2. For testing and development we can use the example application coming with Solr. This application is found at /Applications/Solr/example.</p>
<p>3. Move the schema.xml that comes with the Solr for WordPress in the folder* /Applications/Solr/example/solr/conf/* (add &#8220;.backup&#8221; to the original file).</p>
<p>Now start the solr application by opening the Terminal and executing the command:<br />
<span id="more-262"></span></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>Applications<span style="color: #000000; font-weight: bold;">/</span>Solr<span style="color: #000000; font-weight: bold;">/</span>example<span style="color: #000000; font-weight: bold;">/</span>
java <span style="color: #660033;">-jar</span> start.jar</pre></div></div>

<p>Test that your solr server is now available by visiting http://localhost:8983/solr/admin/</p>
<p>now that you have Solr running on your osx server, you need to make sure that it will run in the background even when you logout of the computer. At the moment it is running through Java and when you logout it will stop running. In order to accomplish this you need to create a LaunchD item, this item needs to be placed in the /Library/LaunchDaemons/ folder.</p>
<p>1. Create a new text file name it org.apache.solr.plist</p>
<p>2. Enter the following information into the file</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">    Label
    org.apache.solr
&nbsp;
    WorkingDirectory
	<span style="color: #000000; font-weight: bold;">/</span>Applications<span style="color: #000000; font-weight: bold;">/</span>Solr<span style="color: #000000; font-weight: bold;">/</span>example
&nbsp;
	ProgramArguments
&nbsp;
	<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>java
	<span style="color: #660033;">-Dezfind</span>
	<span style="color: #660033;">-jar</span>
	<span style="color: #000000; font-weight: bold;">/</span>Applications<span style="color: #000000; font-weight: bold;">/</span>Solr<span style="color: #000000; font-weight: bold;">/</span>example<span style="color: #000000; font-weight: bold;">/</span>start.jar
&nbsp;
    RunAtLoad</pre></div></div>

<p>Once done, place this file in the /Library/LaunchDaemons/ folder and then run this command in terminal</p>
<p>sudo launchctl load /Library/LaunchDaemons/org.apache.solr.plist</p>
<p>this will load the Launch Daemon when the computer restarts, the next step is to restart your server and then make sure that Solr is running by going to the Solr admin URL http://localhost:8983/solr/admin/ or http://server.domain.name:8983/solr/admin/</p>
<p>Now that you have Solr running on the server, and the schema file loaded then you need to make sure that the Solr for WordPress plugin is installed. Note: Solr, does not need to run on the same server as your wordpress install, we have a dedicated Mac Mini server running Solr and it works great. To install Solr for WordPress follow these steps.</p>
<p>1. Upload the solr-for-wordpress folder to the /wp-content/plugins/ directory</p>
<p>2. Activate the plugin through the &#8216;Plugins&#8217; menu in WordPress</p>
<p>3. Configure the plugin with the hostname, port, and URI path to your Solr installation.</p>
<p>4. Load all your posts and/or pages via the &#8220;Load All Posts&#8221; button in the settings page</p>
<p>Note that this plugin requires you to have an instance of Solr using a schema with the following fields: id, permalink, title, content, numcomments, categories, categoriessrch, tags, tagssrch, author, type, and text. The facet fields (categories, tags, author, and type) should be string fields. You can make tagssrch and categoriessrch of any type you want as they are used for general searching. The plugin is distributed with a Solr schema you can use at solr-for-wordpress/schema.xml.</p>
<p>Now that the plugin is installed and active, login to the administrative area of your WordPress website and go to the &#8220;Settings &#8211;&gt; Solr Options&#8221; area. Once here enter the IP address or Fully Qualified Domain that is running solar. Enter the Port, which in this document is 8983 and enter /solr for the path. Once done, press &#8220;Save Changes&#8221; it will test the connection to the server and will let you know if it can connect or not.</p>
<p>Once you have gotten the plugin to connect you can &#8220;Load All Pages&#8221; and &#8220;Load All Posts&#8221; to build your initial Solr database. Your almost complete now you need to integrate the search results that you get from the Solr server into your WordPress website.</p>
<p>Custom Theme Integration</p>
<p>1. Create a new theme file called &#8220;s4w_search.php&#8221;.</p>
<p>2. Insert your markup, use template methods s4w_search_form() and s4w_search_results() to insert the search box and results respectively.</p>
<p>3. Add result styling to your theme css file, see solr-for-wordpress/template/search.css for an example.</p>
<p>4. You can use the search widget in your sidebar for search, or use a custom search box that submits the query in the parameter &#8220;s&#8221;.</p>
<p>For more information about integrating Solr into your WordPress website you can go to http://wordpress.org/extend/plugins/solr-for-wordpress/</p>
<p>I certainly welcome your feedback so if you have an questions or comments feel free to post them below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2011/06/28/solr-wordpress-osx-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>10.6.4 Group Calendars in iCal officially supported</title>
		<link>http://www.jonsblog.org/2010/07/24/10-6-4-group-calendars-in-ical-officially-supported/</link>
		<comments>http://www.jonsblog.org/2010/07/24/10-6-4-group-calendars-in-ical-officially-supported/#comments</comments>
		<pubDate>Sat, 24 Jul 2010 22:07:44 +0000</pubDate>
		<dc:creator>Jon Brown</dc:creator>
				<category><![CDATA[Wiki Server]]></category>
		<category><![CDATA[group calendars]]></category>
		<category><![CDATA[iCal]]></category>
		<category><![CDATA[musings]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[solution]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=182</guid>
		<description><![CDATA[Group calendars in Apples Wiki Server has been an uncomfortable conversation piece among 10.4, 10.5 and 10.6 Apple Systems Administrators. Ever since Apple has given us the ability to use web based group calendars its been a cat and mouse game to get some level of support in iCal. In 10.4 when these calendars first [...]]]></description>
			<content:encoded><![CDATA[<p>Group calendars in Apples Wiki Server has been an uncomfortable conversation piece among 10.4, 10.5 and 10.6 Apple Systems Administrators. Ever since Apple has given us the ability to use web based group calendars its been a cat and mouse game to get some level of support in iCal. In 10.4 when these calendars first came out it was a very cool idea give users their own calendars and give them a web interface to use it. Allow them to subscribe to their calendars in iCal which allowed the user read only access to their calendar.</p>
<p>When 10.5 server came out not only were there personal calendars but group calendars. The difference was that the personal calendars allowed the user to fully manage their calendar both on the web and in iCal however Apple still maintained that group calendars would be only subscribe-able in iCal. The difference here was that many users found workarounds that allowed the fully managed solution of group calendars in iCal by using the following methods.</p>
<p>Method A: Creating a user account and changing the server path with the &#8220;groups&#8221; variable. (<a href="http://www.macosxhints.com/article.php?story=20080410162942908">Solution</a>)</p>
<p>Method B: Creating a user account and changing the server path with the &#8220;wikis&#8221; variable. (<a href="http://discussions.apple.com/message.jspa?messageID=10132577#10132577">Solution</a>)</p>
<p>This worked but much needed security updates broke both of these solutions causing unnecessary stress on the Apple user and the Apple systems administrator. The most <a href="http://lists.apple.com/archives/rockies-edu/2010/Jun/msg00039.html">recant update</a> to 10.6.4 caused the group calendars in iCal to stop working entirely and cause an almost never-ending string </p>
<p>of login failed errors on the users computer. This made it very frustrating for Administrators who are trying to sell the idea of a wiki server as being a great web based and iCal based interface for users. In Apples defense they never officially claimed to support group calendaring in iCal.<br />
<span id="more-182"></span><br />
One of the reasons for this was probably because of the volatile nature of the group account. In 10.5 server group calendars were maintained and created using workgroup manager in 10.6 server they were separated entirely and now the administration of group wikis is all done through their web interface. Due to the separation groups that once had a unique UID, username and password were demoted to the basic functionality of a web folder and directory for the purpose of internet data organization.</p>
<p>With this in mind I was very pleased when Apple released its <a href="http://support.apple.com/kb/DL1062">10.6.4 Wiki Server update</a>. The thing that really made me happy was the fact that now they have officially come out and are supporting group calendars in iCal. This is awesome finally what we have been waiting for. The best thing is that in true Apple fashion their update offers an elegant and much faster solution.</p>
<p>So how do you setup group calendars in 10.6.4? The answer is not really surprising as it takes some of the steps used in previous solutions.</p>
<div id="_mcePaste">In order to view the group calendars, open iCal, open its Preferences, and click on the Accounts tab.</div>
<div id="_mcePaste">
<ol>
<li>There you will create an account by hitting the &#8220;+&#8221; sign.</li>
<li>Choose automatic enter the full account name and or email address that has access to the group calendar in question. Enter the users password.</li>
</ol>
</div>
<div>iCal will contact the server and if the user is found an account will be setup. Once it is setup follow these steps.</div>
<div id="_mcePaste">
<ol>
<li>Click on the server settings tab. The server path URL here is what needs to be modified.</li>
<li>By default the path will look like this /principals/__uids__/USERID/ change the path to this /principals/__uids__/wiki-nameofgroupcalendarhere/</li>
<li>Go back to the account information tab and re-enter the users password.</li>
<li>Change the calendar description.</li>
<li>Close the preferences window, once done the calendar will refresh itself it may take some time. You can speed up the process by quitting iCal and re-launching.</li>
</ol>
</div>
<p>Oddly enough this solution was and should be credited to a <a href="http://discussions.apple.com/thread.jspa?threadID=2140008&amp;tstart=0">user on this post </a>who had originally tried to get group calendars in iCal working in 2009! Looks like Apple took some much needed advice in this arena and I am very happy that they have officially started supporting this much needed feature.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2010/07/24/10-6-4-group-calendars-in-ical-officially-supported/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>10.6.2 Split Horizon DNS</title>
		<link>http://www.jonsblog.org/2010/01/23/10-6-2-split-horizon-dns/</link>
		<comments>http://www.jonsblog.org/2010/01/23/10-6-2-split-horizon-dns/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 23:50:20 +0000</pubDate>
		<dc:creator>Jon Brown</dc:creator>
				<category><![CDATA[DNS Settings]]></category>
		<category><![CDATA[OSX Server Configuration]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[solution]]></category>
		<category><![CDATA[split horizon]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=28</guid>
		<description><![CDATA[The DNS interface in Server Admin.app is not suitable for doing a split-horizon DNS configuration. It simply doesn&#8217;t expose all of the flexibility of bind that you need to pull off such a configuration. If you poke around the bind config files on your OS X Server, you&#8217;ll be able to see how apple has [...]]]></description>
			<content:encoded><![CDATA[<p>The DNS interface in Server Admin.app is not suitable for doing a split-horizon DNS configuration. It simply doesn&#8217;t expose all of the flexibility of bind that you need to pull off such a configuration.</p>
<p>If you poke around the bind config files on your OS X Server, you&#8217;ll be able to see how apple has set them up so that you can edit them directly without confusing the GUI. /var/named contains zone files that you may edit, and they include corresponding files in /var/named/zones which you should not edit. They&#8217;ve done something similar for /etc/named.conf and the files in /etc/dns/.</p>
<p>Having said that, I recommend not doing both internal and external resolving for split-horizon DNS on your server, mainly because:</p>
<ol>
<li>It&#8217;s kind of complicated, and you lose any convenience you had when you were able to use the GUI exclusively</li>
<li>You have NAT, which makes it even more complicated</li>
<li>There are solutions available from third parties that are better-performing, cheap/free, and more robust</li>
</ol>
<p>In my organization, we use DNS in Mac OS X Server extensively for the internal part of a split-horizon setup. We use the &#8220;Advanced DNS&#8221; part of a network solutions account for the external part. It comes free with the domains we&#8217;ve purchased, and has redundancy and speed far greater than what I could justify for hosting a handful or externally-resolving names myself.</p>
<p>You need to reconfigure BIND to use &#8220;views&#8221; with two different versions of your zone file, such that access from inside your network gives the 192.168.1/24 (internal) addresses, but requests forwarded from outside (via your 2-Wire router) give out your static public IP.<span id="more-28"></span></p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">acl internal <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    127.0.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">8</span>;
    192.168.1.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">24</span>;
<span style="color: #7a0874; font-weight: bold;">&#125;</span>;
&nbsp;
view <span style="color: #ff0000;">&quot;internal&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    match-clients <span style="color: #7a0874; font-weight: bold;">&#123;</span> internal; <span style="color: #7a0874; font-weight: bold;">&#125;</span>;
    zone <span style="color: #ff0000;">&quot;mydomain.com&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        <span style="color: #7a0874; font-weight: bold;">type</span> master;
        <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #ff0000;">&quot;/etc/bind/internal/db.mydomain.com&quot;</span>;
     <span style="color: #7a0874; font-weight: bold;">&#125;</span>;
<span style="color: #7a0874; font-weight: bold;">&#125;</span>;
&nbsp;
view <span style="color: #ff0000;">&quot;external&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    match-clients <span style="color: #7a0874; font-weight: bold;">&#123;</span> any; <span style="color: #7a0874; font-weight: bold;">&#125;</span>;
    zone <span style="color: #ff0000;">&quot;mydomain.com&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        <span style="color: #7a0874; font-weight: bold;">type</span> master;
        <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #ff0000;">&quot;/etc/bind/external/db.mydomain.com&quot;</span>;
    <span style="color: #7a0874; font-weight: bold;">&#125;</span>;
<span style="color: #7a0874; font-weight: bold;">&#125;</span>;</pre></td></tr></table></div>

<p>For more information check this out it is a <a href="http://www.howtoforge.com/two%5Fin%5Fone%5Fdns%5Fbind9%5Fviews">How To with more detailed instruction</a>s for Split Horizon DNS configuration.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2010/01/23/10-6-2-split-horizon-dns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

