Skip to content


Subversion checkout URL

You can clone with
Download ZIP
tree: 349d510f03
Fetching contributors…

Cannot retrieve contributors at this time

313 lines (223 sloc) 11.139 kb
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>Installing SMART on OS X</title>
<meta name="author" content="SMART Platforms">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src=""></script>
<link href="/assets/themes/twitter-2.0/css/pygments.css" rel="stylesheet">
<link href="/assets/themes/twitter-2.0/css/bootstrap.min.css" rel="stylesheet">
<link href="/assets/themes/twitter-2.0/css/bootstrap-responsive.min.css" rel="stylesheet">
<link href="/assets/themes/twitter-2.0/css/style.css" rel="stylesheet">
<div class="container">
<div class="content">
<section id="jekyll-page">
<div class="row">
<div class="span4">
<a href="/">
<img id='smart_top_logo' src="/images/smart.png"/>
<div id="left_nav">
<ul class="nav nav-list">
<li class="nav-header">Tutorials</li>
<li><a href="/howto/build_a_smart_app">Build a SMART App</a></li>
<li><a href="/howto/build_a_rest_app">Build a SMART REST App</a></li>
<li><a href="/howto/background_and_helper_apps">Background + Helper Apps</a></li>
<li><a href="/howto/build_smart_frame_ui_apps">Frame UI Apps</a></li>
<li><a href="/howto/got_statins">Got Statins? App</a></li>
<li><a href="/howto/rx_reminder">RxReminder App</a></li>
<li class="nav-header">Using SMART Data</li>
<li><a href="/howto/intro_to_rdf">Intro to RDF and SPARQL</a></li>
<li><a href="/howto/sparql_examples">SPARQL Examples for SMART</a></li>
<li><a href="/howto/intro_to_jsonld">Intro to the JSON-LD API</a></li>
<li><a href="/howto/filters">Query Filtering and Pagination</a></li>
<li><a href="/howto/deferred">$.Deferred for Parallel Queries</a></li>
<li><a href="/howto/smart_data">SMART Data: Best Practices</a></li>
<li class="nav-header">Reference</li>
<li><a href="/reference/data_model">Data Model</a></li>
<li><a href="/reference/rest_api">REST API</a></li>
<li><a href="/reference/filters">Query Filters</a></li>
<li><a href="/reference/app_manifest">App Manifest</a></li>
<li class="nav-header">Client Libraries</li>
<li><a href="/libraries/javascript">Javascript (SMART Connect)</a></li>
<li><a href="/libraries/python">Python</a></li>
<li><a href="/libraries/java">Java</a></li>
<li><a href="/libraries/dotnet">.NET</a></li>
<li><a href="/libraries/container_javascript">Container-side Javascript</a></li>
<li class="nav-header">SMART Update Guides</li>
<li><a href="/updates/smart_0.4/app">0.4 Apps</a></li>
<li><a href="/updates/smart_0.5/container">0.4 Containers</a></li>
<li><a href="/updates/smart_0.5/">0.5 Apps + Containers</a></li>
<li class="nav-header">Reference EMR Installation</li>
<li><a href="/install/linux">Ubuntu Linux</a></li>
<li><a href="/install/os_x">OS X</a></li>
<li class="nav-header">Presentations</li>
<li><a href="">Architecture (2010-08)</a></li>
<li><a href="">Governance (2010-08)</a></li>
<li><a href="">Demo</a></li>
<li class="nav-header">Downloads</li>
<li><a href="/downloads/">Download Source + VM</a></li>
<div class="span8" id="jekyll-page-content">
<div class="page-header">
<h1>Installing SMART on OS X <small></small></h1>
<div class='simple_small_box'>Help us improve! You can correct errors or add to this page by clicking
<a class='githublink' href=''>here</a> to edit this page on Github.
<p>This walks you through installing an <em>insecure SMART testing environment</em> on
Mac OS X. We will be installing everything needed for SMART into the directory
<code>/Library/SMART</code>, all the instructions assume that you are running a Terminal
open from this location. Of course you can use your own location, just remember
to return to your <code>SMART</code> directory. Tested on OS X Lion and Mountain Lion.</p>
<h1>Install Homebrew</h1>
<p>We use <a href="">Homebrew</a> as package manager to install a few Linux tools. Since this
needs some extra command line tools to compile code, you first have to do
<em>one</em> of the following:</p>
<li><p>Install <a href="">Xcode</a> from the App Store (it's free, if large), then open
<code>Xcode &gt; Preferences &gt; Downloads &gt; Components</code> and install the <code>Command Line
<li><p>Download only the <a href="">Command Line Tools</a> (search for the correct version) from
the Apple Developer Center (you will need a free developer account for this)</p></li>
<p><a href="">Homebrew</a> is a superb replacement for the old managers Fink and MacPorts and
you will love it! Here's a one-line installer for it:</p>
<pre><code>$ /usr/bin/ruby -e &quot;$(/usr/bin/curl -fsSL;
<p>If you had Homebrew installed before, make sure to update it:</p>
<pre><code>$ brew update
<h1>Install Python Tools</h1>
<h2><code>lxml</code> - an pythonic xml library</h2>
<p>Download <a href="">lxml</a> version 2.3.4 or later (via source tarball), double-click to
unarchive, then build and install:</p>
<pre><code>$ cd lxml-2.3.4
$ python build --static-deps
$ sudo python install
<h2><code>psycopg2</code> - an advanced PostgreSQL driver for Python</h2>
<p>Download the <a href="">latest stable release</a>, unarchive, build and install:</p>
<pre><code>$ cd psycopg2-2.4.5
$ python build
$ sudo python install
<h2>RDF packages</h2>
<pre><code>$ sudo easy_install -U &quot;rdflib&gt;=3.0.0&quot; rdfextras
<h1>Install Django</h1>
<p>You have to use <a href="">Django 1.3</a> for now. Download, unarchive and install:</p>
<pre><code>$ cd Django-1.3.1
$ sudo python install
<p>It's easiest to use the <a href="">Mac installer</a> because it also sets up
the <code>postgres</code> user which is needed.</p>
<li><p>Download the latest installer (I used 9.1.4) and run it. You can keep most
default settings:</p>
<li>Install into <code>/Library/PostgreSQL/9.1</code></li>
<li>Port <code>5432</code></li>
<li>Remember your password!</li>
<li>Locale <code>en_US.UTF-8</code> (any <code>.UTF-8</code> will do)</li>
<li><p>Create a PostgreSQL user for your SMART service. We will be using <em>smart</em>,
use your own password:</p>
<pre><code>$ sudo su - postgres
$ createuser --superuser smart
$ psql postgres
$ postgres=# \password smart
$ postgres=# \q
<p><em>Caveat</em>: When using Postgres &lt; 9.1 see the <a href="">instructions</a> on how to change
the Postgres config to use md5 passwords. Also, if you haven't configured
postgres to use UTF-8, you seemingly need to use <code>pg_createcluster</code> which does
not ship on the Mac. You're on your own.</p>
<h1>Tomcat and openrdf-sesame</h1>
<li><p>Install Tomcat</p>
<p>$ brew install tomcat</p></li>
<li><p>Configure Tomcat: The environment variable <em>$CATALINA_HOME</em> needs to point
to the tomcat base directory. So in your Bash <code>.profile</code> add:</p>
<p>$ export CATALINA_HOME=/usr/local/Cellar/tomcat/7.0.28/libexec</p></li>
<p>If you don't use Bash adjust accordingly. Reload your profile file with:</p>
<pre><code> $ source ~/.profile
<li><p>Install openrdf-sesame</p>
<pre><code>$ curl -O
$ tar -xzvf openrdf-sesame-2.6.5-sdk.tar.gz
$ mkdir $CATALINA_HOME/.aduna
$ cp -r openrdf-sesame-2.6.5/war/* $CATALINA_HOME/webapps/
<li><p>Launch Tomcat and check its availability</p>
<pre><code>$ CATALINA_HOME/bin/
<p>You should now be able to access <code>http://localhost:8080/openrdf-workbench/</code>.</p>
<h1>Automated SMART install</h1>
<p>We're now ready to get the latest and greatest from SMART.</p>
<li><p>Download the SMART manager</p>
<pre><code>$ curl -O
<li><p>Run the manager. This will install the current <code>master</code> branch of all SMART
repositories that we need. If you want the bleeding edge <code>dev</code> version, add a
<code>-d</code> switch to the following command</p>
<pre><code>$ python -a
<p>This will fetch all needed repositories, run an installer that asks you for some
configurations, generate patient sample data and in the end run the server.</p>
<h1>Running SMART</h1>
<p>If you've just run the automated install, you only need to start Tomcat via
<code>$CATALINA_HOME/bin/</code>, in the future:</p>
<h2>To start SMART (and Tomcat):</h2>
<pre><code>$ CATALINA_HOME/bin/
$ python -v -w
<h2>To stop SMART (and Tomcat):</h2>
<pre><code>$ python -k
<p>Nobody is stopping you from putting these two commands in a start- and/or stop
script, of course. :)</p>
<a href=''>SMART Platforms</a> &copy; 2012
<script src="//"></script>
<script>window.jQuery || document.write('<script src="/assets/themes/twitter-2.0/js/jquery.min.js"><\/script>')</script>
<script src="/assets/themes/twitter-2.0/js/bootstrap_aks.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-33617191-1']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
<script src="/assets/app.js?v=0.1"></script>
<script>Toc.init($("#jekyll-page-content"), $("#toc"));</script>
Jump to Line
Something went wrong with that request. Please try again.