Skip to content

Instantly share code, notes, and snippets.

@gjuric
Created January 9, 2015 17:52
Show Gist options
  • Save gjuric/4fcb2425fc1cfd484d1b to your computer and use it in GitHub Desktop.
Save gjuric/4fcb2425fc1cfd484d1b to your computer and use it in GitHub Desktop.
OSX dev install
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"
brew install mysql nginx mongodb redis rabbitmq
brew install php55 --with-fpm --with-imap --with-homebrew-openssl php55-imagick php55-mongo php55-pcntl php55-pspell php55-redis php55-xdebug php55-apcu
sudo chown root /usr/local/opt/nginx/homebrew.mxcl.nginx.plist
sudo gem install --no-ri --no-rdoc capistrano -v 2.15.5
PHP:
php-fpm.conf (display-errors)
/usr/local/etc/php/5.5/conf.d/99-custom.ini:
> date.timezone = Europe/Zagreb
> sendmail_path = sudo -u gog /Users/gog/Development/tools/mail/mail.php
> opcache.enable = 1
Install Sublime and then:
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
/usr/local/bin/dev
```bash
#!/bin/bash
case "$1" in
start)
sudo launchctl load /usr/local/opt/nginx/homebrew.mxcl.nginx.plist
launchctl load -w /usr/local/Cellar/php55/5.5.17/homebrew.mxcl.php55.plist
launchctl load /usr/local/opt/mongodb/homebrew.mxcl.mongodb.plist
launchctl load /usr/local/opt/redis/homebrew.mxcl.redis.plist
launchctl load /usr/local/opt/rabbitmq/homebrew.mxcl.rabbitmq.plist
/usr/local/bin/mysql.server start
;;
stop)
sudo launchctl unload /usr/local/opt/nginx/homebrew.mxcl.nginx.plist
launchctl unload -w /usr/local/Cellar/php55/5.5.17/homebrew.mxcl.php55.plist
launchctl unload /usr/local/opt/mongodb/homebrew.mxcl.mongodb.plist
launchctl unload /usr/local/opt/redis/homebrew.mxcl.redis.plist
launchctl unload /usr/local/opt/rabbitmq/homebrew.mxcl.rabbitmq.plist
/usr/local/bin/mysql.server stop
;;
restart)
sudo launchctl unload /usr/local/opt/nginx/homebrew.mxcl.nginx.plist
sudo launchctl load /usr/local/opt/nginx/homebrew.mxcl.nginx.plist
launchctl unload -w /usr/local/Cellar/php55/5.5.17/homebrew.mxcl.php55.plist
launchctl load -w /usr/local/Cellar/php55/5.5.17/homebrew.mxcl.php55.plist
launchctl unload /usr/local/opt/mongodb/homebrew.mxcl.mongodb.plist
launchctl load /usr/local/opt/mongodb/homebrew.mxcl.mongodb.plist
launchctl unload /usr/local/opt/redis/homebrew.mxcl.redis.plist
launchctl load /usr/local/opt/redis/homebrew.mxcl.redis.plist
launchctl unload /usr/local/opt/rabbitmq/homebrew.mxcl.rabbitmq.plist
launchctl load /usr/local/opt/rabbitmq/homebrew.mxcl.rabbitmq.plist
/usr/local/bin/mysql.server restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment