Installing CRITs on OSX:

These are some very barebones instructions for how to get CRITs installed and
running under OSX. These instructions are mainly for developers as OSX is not a
supported operating system.

1. Install XCode via App Store

2. Download command line tools for Xcode:
    https://developer.apple.com/downloads/index.action#

3. Install Homebrew:
    ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
    brew doctor

4. Install mod-wsgi
    brew install https://raw.github.com/Homebrew/homebrew-apache/master/mod_wsgi.rb

5. Install PCRE, p7zip, unrar, UPX, and python
    brew install PCRE
    brew install p7zip
    brew install unrar
    brew install upx
    brew install python

# NOTE: anything python-related after this assumes you are using the python
# install that you just did with brew (usually /usr/local/bin/python)

6. Upgrade pip
    pip install --upgrade pip

7. Install python requirements
    pip install python-dateutil
    pip install pycurl2
    pip install pydot
    pip install pyparsing
    pip install PyYAML
    pip install numpy
    pip install matplotlib

8. Download MongoDB 2.4.5 for OSX
    - copy binaries in bin directory to /usr/local/bin

9. Install PyMongo 2.5.2
    pip install pymongo

10. Install MongoEngine 0.8.3
    - Grab this from their site or from the crits_dependencies repository

11. Intall ssdeep
    - download Cython from cython.org
    - copy binaries in bin directory to /usr/local/bin/
    pip install Cython
    pip install ssdeep
    git clone git://github.com/kbandla/pydeep.git and python setup.py install

12. Install Python PE File, python magic, and pynids
    pip install pefile
    brew install libmagic
    pip install python-magic
    brew install libnids

13. Download and install other dependencies (or grab from crits_dependencies)
    - Install Yara 1.6 and yara-python 1.6 (standalone downloads from Google Code)
    - anyjson-0.3.3
    - amqp-1.0.6
    - billiard-2.7.3.19
    - kombu-2.5.4
    - celery-3.0.12
    - django-celery-3.0.11
    - requests-v1.1.0-9

14. Create database config in CRITs codebase
    cd config
    cp database_example.py database.py
    - default values should work fine, but you can modify them if needed.

15. Add an admin user to your CRITs instance using users management command
    python manage.py users -h

16. Setup MongoDB Collections
    python manage.py create_default_collections

17. Start Django Runserver
    python manage.py runserver localhost:9000
