Created
May 9, 2012 16:35
-
-
Save rhelmer/2646357 to your computer and use it in GitHub Desktop.
Socorro Mac install instructions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Installing a Socorro dev environment on Mac OS X 10.6 (Snow Leopard) | |
| # | |
| # Note that this installs DB, UI and Middleware only - collection and processing are not supported. | |
| # | |
| ----------------- PostgreSQL 9.0 ----------------- | |
| Install PostgreSQL from: http://get.enterprisedb.com/postgresql/postgresql-9.0.7-1-osx.dmg | |
| sudo su - postgres | |
| export PGDATA=`pwd`/data | |
| # PostgreSQL timezone must be UTC | |
| vi data/postgresql.conf | |
| """ | |
| timezone = 'UTC' | |
| """ | |
| # you'll use the password you set here below as ${PASSWORD} | |
| ./bin/createuser -P -S ${USER} | |
| ./bin/pg_ctl restart | |
| exit | |
| ----------------- Socorro Middelware ----------------- | |
| git clone https://github.com/${USER}/socorro | |
| # FIXME comment out phpunit for the moment | |
| make test DB_HOST=localhost DB_PASSWORD=${PASSWORD} CITEXT=/Library/PostgreSQL//9.0/share/postgresql/contrib/citext.sql | |
| # create breakpad DB and populate with fake data | |
| export PYTHONPATH=. | |
| . socorro-virtualenv/bin/activate | |
| ./socorro/external/postgresql/setupdb_app.py --database_name=breakpad --database_password=${PASSWORD} | |
| pushd tools/dataload/ | |
| export PATH=$PATH:/Library/PostgreSQL/9.0/bin/ | |
| export PGPASSWORD=${PASSWORD} | |
| bash import.sh | |
| popd | |
| # configure socorro | |
| pushd scripts/config | |
| for file in *.py.dist; do cp $file `basename $file .dist`; done | |
| edit webapiconfig.py | |
| """ | |
| wsgiInstallation.default = False | |
| """ | |
| popd | |
| . socorro-virtualenv/bin/activate | |
| export PYTHONPATH=. | |
| # run mware | |
| python scripts/webservices.py | |
| # test mware | |
| curl 'http://localhost:8080/current/versions/' | |
| ----------------- Apache + PHP ----------------- | |
| # it's a massive pain to get mod_php working with pgsql on snow leopard's Apache install - just let | |
| # macports install Apache and mod_php instead. | |
| # | |
| # Turn off "Web Sharing" in "System Preferences -> Sharing" ! | |
| # | |
| Install MacPorts from http://www.macports.org/ | |
| sudo port install php5-postgresql php5-iconv php5-curl | |
| # activate PHP module | |
| cd /opt/local/apache2/modules | |
| /opt/local/apache2/bin/apxs -a -e -n "php5" libphp5.so | |
| # configure Apache | |
| sudo vi conf/httpd.conf | |
| """ | |
| Include conf/extra/httpd-vhosts.conf | |
| Include conf/extra/mod_php.conf | |
| """ | |
| # (re)start Apache | |
| sudo bin/apachectl restart | |
| # configure PHP | |
| sudo cp /opt/local/etc/php5/php.ini-development /opt/local/etc/php5/php.ini | |
| sudo vi /opt/local/etc/php5/php.ini | |
| """ | |
| short_open_tag = On | |
| """ | |
| # copy php kohana configs | |
| pushd webapp-php/applications/configs | |
| for file in *.php-dist; do cp $file `basename $file -dist`; done | |
| # enable "file" driver, comment out "memcache" driver | |
| vi cache.php | |
| # replace "http://socorro-api/bpapi" with "http://localhost:8080" | |
| vi webserviceclient.php | |
| popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment