Add an install guide for OSX, a=chris

Chris Pollett [2012-10-06 19:Oct:th]
Add an install guide for OSX, a=chris
Filename
en-US/pages/downloads.thtml
en-US/pages/install.thtml
diff --git a/en-US/pages/downloads.thtml b/en-US/pages/downloads.thtml
index 083e9c9..4c2edf5 100755
--- a/en-US/pages/downloads.thtml
+++ b/en-US/pages/downloads.thtml
@@ -13,9 +13,8 @@
 ?c=main&p=documentation#requirements">requirements</a> of and
 <a href="http://localhost/git/seek_quarry/<?php ?>
 ?c=main&p=documentation#installation">installation procedure</a> for
-Yioop!. These sections have what you need for a typical Mac and Linux
-home user. The <a href="?c=main&amp;p=install">Install Guides</a> page
-explains how to get Yioop work in some other common settings.</p>
+Yioop!. The <a href="?c=main&amp;p=install">Install Guides</a> page
+explains how to get Yioop work in some common settings.</p>
 <h2>Git Repository / Contributing</h2>
 <p>The Yioop! git repository allows anonymous read-only access. If you would to
 contribute to Yioop!, just do a clone of the most recent code,
diff --git a/en-US/pages/install.thtml b/en-US/pages/install.thtml
index 5f3fedb..fae9350 100755
--- a/en-US/pages/install.thtml
+++ b/en-US/pages/install.thtml
@@ -3,6 +3,7 @@
         <li><a href="#xampp">XAMPP on Windows</a></li>
         <li><a href="#wamp">WAMP</a></li>
         <li><a href="#linux">Ubuntu Linux</a></li>
+        <li><a href="#osx">Mac OSX / Mac OSX Server</a></li>
         <li><a href="#cpanel">CPanel</a></li>
         <li><a href="#multiple">System with Multiple Queue Servers</a></li>
     </ul>
@@ -307,6 +308,132 @@ crawls list. Set it as the default crawl. You should be
 able to search using this index.
 </li>
 </ol>
+<h2 id="osx">Mac OSX / Mac OSX Server</h2>
+<p>The instructions given here are for OSX Mountain Lion, Apple changes
+the positions with which files can be found slightly between
+versions, so you might have to do a little exploration to find things
+for earlier OSX versions. </p>
+<ol>
+<li>Turn on Apache with PHP enabled.
+<ul>
+<li><b>Not OSX Server:</b> Traditionally, (pre-Mountain Lion) OSX, one
+could go to Control Panel =&gt; Sharing, and turn on Web Sharing to
+get the web server running. This option was removed in Mountain Lion, however,
+from the command line (Terminal), one can type:
+<pre>
+sudo apachectl start
+</pre>
+to start the Web server, and similarly,
+<pre>
+sudo apachectl stop
+</pre>
+to stop it. Alternatively, to make it so the WebServer starts each time the
+machine is turned on one can type:
+<pre>
+sudo defaults write /System/Library/LaunchDaemons/org.apache.httpd Disabled -bool false
+</pre>
+By default, document root is
+/Library/WebServer/Documents. The configuration files for Apache in
+this setting are located in /etc/apache2. If you want to tweak document
+root or other apache settings, look in the folder /etc/apache2/other and
+edit appropriate files such as httpd-vhosts.conf or httpd-ssl.conf .
+Before turning on Web Sharing / the
+web server, you would want to edit the file /etc/apache/httpd.conf, replace
+<pre>
+#LoadModule php5_module libexec/apache2/libphp5.so
+</pre>
+with
+<pre>
+LoadModule php5_module libexec/apache2/libphp5.so
+</pre>
+</li>
+<li><b>OSX Server:</b> Pre-mountain lion, OSX Server used /etc/apache2
+to store its configuration files, since Mountain Lion these files are in
+/Library/Server/Web/Config/apache2 . Within this folder, the sites folder
+holds Apache directives for specific virtual hosts. OSX Server comes
+with Server.app which will actively fight any direct tweaking to configuration
+files. From Server.app to get the web server running click on Websites.
+Make sure "Enable PHP web applications" is checked and Websites is On.
+The default web site is /Library/Server/Web/Data/Sites/Default , you
+probably want to click on + under websites and specify document root to
+be as you like.
+</li>
+</ul>
+</li>
+<li>
+Modify the php.ini file, this is likely in the file /private/etc/php.ini.
+You want to change
+<pre>
+post_max_size = 8M
+to
+post_max_size = 32M
+</pre>
+Restart the web server after making this change.
+</li>
+<li>
+We are going to configure Yioop so that fetchers and queue_servers
+can be started from the GUI interface. On an OSX machine, Yioop makes
+use of the Unix "at" command. On OSX to enable  "at" jobs, you might need to
+type:
+<pre>
+sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.atrun.plist
+</pre>
+</li>
+<li>For the remainder of this guide, we assume document root for
+the web server is: /Library/WebServer/Documents.
+<a href="http://www.seekquarry.com/viewgit/?a=summary&p=yioop"
+>Download Yioop</a>, unpack it into /Library/WebServer/Documents and rename
+the Yioop folder to yioop.</li>
+<li>Make a folder for your crawl data:
+<pre>
+sudo mkdir /Library/WebServer/Documents/yioop_data
+sudo chmod 777 /Library/WebServer/Documents/yioop_data
+</pre>
+</li>
+<li>In a browser, go to the page http://localhost/yioop/ .
+You should see a configure screen
+where you can enter /Library/WebServer/Documents/yioop_data for the
+Work Directory. It will ask you to re-login. Use the login: root and no password.
+Now go to Yioop =&gt;
+Configure and input the following settings:
+<pre>
+Search Engine Work Directory: /Library/WebServer/Documents/yioop_data
+Default Language: English
+Debug Display: (all checked)
+Search access: (all checked)
+Database Set-up: (left unchanged)
+Search Auxiliary Links Displayed: (all checked)
+Name Server Set-up
+Server Key: 0
+Name Server Url: http://localhost/yioop/
+Caral Robot Name: TestBot
+Robot Instance: A
+Robot Description: TestBot should be disallowed from everywhere because
+the installer of Yioop did not customize this to his system.
+Please block this ip.
+</pre>
+</li>
+<li>Go to Manage Machines. Add a single machine under Add Machine using the
+settings:
+<pre>
+Machine Name: Local
+Machine Url: http://localhost/yioop/
+Is Mirror: (uncheck)
+Has Queue Server: (check)
+Number of Fetchers 1
+Submit
+</pre>
+</li>
+<li>Under Machine Information turn the Queue Server and Fetcher On.</li>
+<li>Go to Manage Crawls. Click on the options to set up where you want to crawl.
+Type in a name for the crawl and click start crawl.</li>
+<li>Let it crawl for a while, till you see the Total URls Seen &gt; 1.</li>
+<li>Then click Stop Crawl and wait for the crawl to appear in the previous
+crawls list. Set it as the default crawl. You should be
+able to search using this index.
+</li>
+</ol>
+
 <h2 id="cpanel">CPanel</h2>
 <p>
 Generally, it is not practical to do your crawling in a cPanel hosted website.
ViewGit