| Applies to | MindTouch 1.9 or later | License | All versions |
|---|---|---|---|
| Operating System | Mac | Documentation Types | Setup |
| Community Documentation | |||
1.9.0 Itasca Source Code Install on OS X 10.4 and 10.5
1. Fresh Install:
1.1. Prerequisites
1.2. Download Itasca Bits
1.3. Configure Apache
1.4. Configure Apache for deki-api
1.5. Configure deki-api
1.6. Install using the web-installer
1.7. Troubleshooting
1.8. Verification
1. Fresh Install:
1.1. Prerequisites
Discussion
Considering the incredible capabilities of modern software, sometimes I forget about the smaller pieces of which it is composed. Itasca is no exception. In order to get it running properly as a wiki on the web, we need to get all of the support pieces in place. To manage the prerequisites of the DekiWiki I propose that we use Ports, it is a package manager for OS X that I have been using for some time now with positive results. Ports creates the /opt directory path and installs all of its software there. So when we are finished we will find our stuff in /opt/local/apache2.
The prerequisites for Itasca are simple. Getting them installed and working properly can be a bit tricky. I propose using Mac Ports to do this task. To do this you will need to download MacPorts and Apple's X code. Lets get started.
MacPorts can be found here: http://www.macports.org/
Apple's X Code can be found here: https://connect.apple.com/cgi-bin/We...bundleID=19897
Once Ports is installed we are ready to get going. The first step is to update and sync ports, the commands are as follows:
sudo port selfupdate
sudo port sync
You may need to modify your path to include /opt/local/bin and /opt/local/apache2/bin. I have included everything in my path, even the kitchen sink:
PATH=/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/opt/local/bin:/opt/local/sbin:/opt/local/lib/mysql5/bin/:/opt/local/apache2/bin:/usr/X11R6/bin:/usr/libexec/:/opt/local/share/mysql5/mysql/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
Depending upon your environment you can edit this by adding this line to either .bash_profile or .profile. I have 10.5 now and I don't have a .profile
Next we will install Mono, ImageMagick and Lucene
sudo port install mono
sudo port install ImageMagick
sudo port install clucene
Next we need to get html2ps, for which there is no port package, we can use ports to install some of its prerequisites.
sudo port install p5-libwww-perl
sudo port install texlive
<this installs ghostscript and tex which are needed for html2ps>
sudo port install netpbm
Next we can use wget (oh you may need to sudo port install wget first) to grab the html2ps package
wget http://user.it.uu.se/~jan/html2ps-1.0b5.tar.gz
tar -xzf html2ps-1.0b5.tar.gz
sudo html2ps-1.0b5/install
The installer script for html2ps will ask where to install this I chose /opt/local
If you all ready don't have MAMP (Mac, Apache, Mysql, and PHP) installed, we can use Ports to do that! I also recommend installing pear (why not, while were at it!) So the command is:
sudo port install php5 +apache2 +mysql5 +server +pear
For configuring PHP5 Apache2 MySQL5 with Ports, Chad at 2tbsp.com seems to be knowing what is going on, thanks for your great guides. Please see these references for more details:
http://2tbsp.com/content/install_apa...php_5_macports
http://2tbsp.com/content/install_and...sql_5_macports
1.2. Download Itasca Bits
cd ~
wget http://downloads.sourceforge.net/dek...3&big_mirror=0
tar xfvz Deki_Wiki_1.9.0_Itasca_source.tar.gz
cd Deki_Wiki_1.9.0_Itasca_source
cp -r web/* /opt/local/apache2/htdocs/
or to the appropriate subdomain
chown -R www /opt/local/apache2/htdocs/
1.3. Configure Apache
Please refer to: http://2tbsp.com/content/install_apa...php_5_macports for details.
1.3.5 configure MYSQL
please refer to: http://2tbsp.com/content/install_and...sql_5_macports for details.
1.4. Configure Apache for deki-api
add this to your vhost.conf or httpd.conf note the CAPITAL LETTERS where you should enter your information.
<VirtualHost YOUR-IP:80>
ServerName "YOUR.SERVER.NAME.COM"
DocumentRoot "/opt/local/apache2/vhosts/YOUR-DOMAIN"
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^/$ /index.php?title= [L,NE]
RewriteCond %{REQUEST_URI} ^/@gui/[^.]+$
RewriteRule ^/@gui/(.*)$ /proxy.php?path=$1 [L,QSA,NE]
RewriteCond %{REQUEST_URI} !^/(@api|editor|skins|config|@gui)/
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{REQUEST_URI} !^/favicon\.ico$
RewriteCond %{REQUEST_URI} !^/robots\.txt$
RewriteCond %{QUERY_STRING} ^$ [OR] %{REQUEST_URI} ^/Special:Search
RewriteRule ^/(.*)$ /index.php?title=$1 [L,QSA,NE]
# deki-api uses encoded slashes in query parameters so AllowEncodedSlashes must be On
AllowEncodedSlashes On
<Proxy *>
AddDefaultCharset off
Order deny,allow
Deny from all
Allow from all
</Proxy>
# mod_proxy rules
ProxyPass /@api http://localhost:8081 retry=1
ProxyPassReverse /@api http://localhost:8081
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
## Logging ##
# Possible values: debug, info, notice, warn, error, crit, alert, emerg
LogLevel error
CustomLog "/opt/local/apache2/logs/YOURDOMAIN.access.log" combined
ErrorLog "/opt/local/apache2/logs/YOURDOMAIN.error.log"
</VirtualHost>
1.5. Configure deki-api
1.6. Install using the web-installer
Go to your server via a web browser.
1.6.5 Set the launchd Startup item
Create a plist file for launchd. Launchd is the the process of all processes in OS X. It uses plist files which are essentially XML to store information.
Edit that start up item
nano /Library/LaunchDaemons/com.mindtouch.dekiwiki.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.mindtouch.dekiwiki.itasca</string>
<key>ProgramArguments</key>
<array>
<string>sudo</string>
<string>/opt/local/bin/mono</string>
<string>/opt/local/apache2/htdocs/bin/mindtouch.host.exe</string>
<string>apikey</string>
<string>ENTER API KEY</string>
<string>script</string>
<string>/etc/dekiwiki/mindtouch.deki.startup.xml</string>
<string>path-prefix</string>
<string>@api</string>
<string>http-port</string>
<string>8081</string>
<string>ip</string>
<string>localhost</string>
<string>notty</string>
<string>connect-limit</string>
<string>-5</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
*Note you will need to enter your API key in the XML and also verify that the paths are correct.
Note on the following lines from above file, you will need to make these lines match your instance of the respective files.
<string>/opt/local/apache2/htdocs/bin/mindtouch.host.exe</string>
<string>/etc/dekiwiki/mindtouch.deki.startup.xml</string>
To find your api key you can enter this command:
cat /opt/local/apache2/vhosts/<YOUR-DOMAIN>/LocalSettings.php |grep wgDekiApiKey|awk -F\" '{print $2}'
to launch your deki wiki using launchd/launchctl you can issue the following command.
sudo launchctl load /Library/LaunchDaemons/<your plist file>
1.7. Troubleshooting
1.8. Verification
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |
Copyright © 2011 MindTouch, Inc. Powered by