macOS Server
{% include JB/setup %}
PHP
MySQL
Install MySQL
brew options mysql
brew install mysql --enable-debug
Let launchd Start MySQL at Login
CAUTION: mysqld takes up 500 MB memory!
ln -sfv /usr/local/Cellar/mysql/5.6.17_1/*.plist ~/Library/LaunchAgents/
Load MySQL
Option 1 (suggested)
sudo gem install lunchy
lunchy list
lunchy stop mysql
lunchy start mysql
Option 2
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
Brew’ing PHP, MySQL & Nginx on Mac OS X
Redis
brew install redis
To have launchd start redis at login:
ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
Then to load redis now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
Or, if you don't want/need launchctl, you can just run:
redis-server /usr/local/etc/redis.conf