You can install command line without install XCode
$ xcode-select --install
https://github.com/robbyrussell/oh-my-zsh
$ curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
Edit ~/.zshrc
plugins=(git osx node npm nvm bower python pep8 django fabric virtualenvwrapper pip brew)
export PATH="/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew doctor
Updat path in ~/.zshrc.
export PATH='/usr/local/sbin:$PATH'
Install useful libraries:
$ brew install libtiff libjpeg webp little-cms2 libmagic wget
We can install node or the version manager
$ brew install node
Install nvm (In the future we will use n) Last version in https://github.com/creationix/nvm
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash
Add to ~/.zshrc
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
Install last version node
$ nvm install node
$ brew install python python3
Reload terminal. Pip and setuptools have been installed. To update them
$ pip install --upgrade pip setuptools
$ pip install virtualenvwrapper
$ pip install ipython
$ brew install mysql
To connect: mysql -uroot mysql -uroot -p To reload mysql after an upgrade: launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist Or, if you don't want/need launchctl, you can just run: mysql.server start
Change root password
$ mysqladmin -u root password 'yourpasswordhere'
$ brew install postgresql
#
When installing the postgres gem, including ARCHFLAGS is recommended:
$ ARCHFLAGS="-arch x86_64" gem install pg
#
To have launchd start postgresql at login:
$ ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
#
Then to load postgresql now:
$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
GeoDjango
$ brew install postgis
$ brew install gdal
$ brew install libgeoip
$ createdb <db name>
$ psql <db name>
> CREATE EXTENSION postgis;
> CREATE EXTENSION postgis_topology;
$ brew install geoip
$ mkdir /usr/local/share/GeoIP/
$ wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
$ gunzip GeoIP.dat.gz
$ mv GeoIP.dat /usr/local/share/GeoIP/
$ wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
$ gunzip GeoLiteCity.dat.gz
$ mv GeoLiteCity.dat /usr/local/share/GeoIP/
Geometry Engine, Open Source
$ brew install geos
$ brew install gdal
$ brew install spatialite-tools
$ sudo npm install -g less bower yuglify less-plugin-clean-css
$ brew install rabbitmq
#
Management Plugin enabled by default at http://localhost:15672#
To have launchd start rabbitmq at login: $ ln -sfv /usr/local/opt/rabbitmq/*.plist ~/Library/LaunchAgents#
Then to load rabbitmq now: $ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.rabbitmq.plist#
Or, if you don't want/need launchctl, you can just run: $ rabbitmq-server#
in background $ rabbitmq-server -detached
$ brew install memcached
..
ln -sfv /usr/local/opt/memcached/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.memcached.plist
/usr/local/opt/memcached/bin/memcached
$ 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
Install brew services by tapping homebrew/services
$ brew tap homebrew/services
Launch services
$ brew services start mysql
$ brew services start rabbitmq
$ brew services start redis
$ brew services start memcached
$ brew install gettext
Add gettext to path:
export PATH=$PATH":/usr/local/opt/gettext/bin"
or you can (show warning in brew doctor):
$ brew link gettext --force
download from: https://www.docker.com/products/docker#/mac