Setup on OS X

jnraine edited this page Jul 19, 2012 · 22 revisions

Instructions on setting up your own munki server. This was accomplished on a 10.6 server. Probably, will work for 10.7 server or 10.7/10.6 client. Thanks to Dan Roque for the added steps!

Note: Do not use sudo when installer RVM, gems, or initializing your app — this will cause permission issues

Steps

Pre-requisites

  • Install munki tools tools (version 0.8)
  • Xcode (more details)
  • Install GIT (more details)
  • Install RVM (more detail) 1
  • Install ImageMagick
    • There are many ways to install this, compiling from source, fink, macports, hombrew, choose your favorite
    • If using HomeBrew (more detail)
      • brew install imagemagick
  • Install MySQL 2
    • brew install brew install mysql
  • Install Ruby 1.9.3-p0
    • rvm install 1.9.3-p0
    • rvm 1.9.3-p0 --default 3
    • Close and reopen your terminal
  • Install bundler
    • gem install bundler

Application setup

  • Clone munkiserver
    • cd /Library/WebServer/Documents/ (change path, if you’d like)
    • git clone git://github.com/jnraine/munkiserver.git
  • Initialize munkiserver app
    • cd /Library/WebServer/Documents/munkiserver/
    • bundle install
    • cp config/database.yml.example config/database.yml
    • rake db:migrate or rake db:migrate RAILS_ENV=production (for production)
    • rake bootstrap:all or rake bootstrap:all RAILS_ENV=production (for production)
    • rake assets:precompile
  • Fire up the server
    • rails s (development on port 3000)
    • For production server, use Apache w/ Passenger
  • Connect to server
    • http://servername:3000 (development) or http://servername:80 (production)

Notes

1 Install rvm using normal user, not root (ie. don’t use sudo). rvm installs with root are more complicated and do not provide any benefit.

2 If you’re planning to use SQLite, you can comment out the MySQL gem from the Gemfile and skip this step.

3 Only do this if you would like to use Ruby 1.9.3 by default. You can always switch back to your system default by typing rvm --system --default