Install php, ruby, rbenv, mysql, nginx, postgres all this on mac

Install Homebrew, Php, Ruby, Rbenv, Ngix, MySql, PostGres


$ brew install readline
$ git clone ~/.rbenv
$ git clone ~/.rbenv/plugins/ruby-build
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile

Dont forget run ‘$ rbenv rehash’ if you install any gem not using Gemfile Ex. ‘$ gem install foo’


$ rbenv install [ruby-version]

After you install ruby set your global version

$ rbenv global [ruby-version]
$ gem install bundler
$ rbenv rehash

For more options use: ‘$ rbenv’


$ brew ruby -e "$(curl -fsSL"
$ brew doctor

PHP (with fpm, without apache mod and with pgsql):

$ brew tap josegonzalez/php
$ brew tap homebrew/dupes
$ brew options php54
$ brew install --without-apache --with-fpm --with-mysql --with-pgsql --with-debug php55
$ brew install php55-mcrypt
$ cp /usr/local/Cellar/php55/5.5.12/homebrew.mxcl.php55.plist ~/Library/LaunchAgents/
$ launchctl load -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php54.plist (Start)
$ launchctl unload -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php54.plist (Stop)


$ brew install postgresql


$ brew install mysql --enable-debug
$ mysql_secure_installation
$ mysql.server {start|stop|restart|reload|force-reload|status}


$ ln -s /usr/local/Cellar/mysql/5.6.10 /usr/local/mysql
$ sudo ln -s /usr/local/Cellar/mysql/5.6.10/my.cnf /etc/my.cnf


$ brew install nginx
$ cp /usr/local/Cellar/nginx/1.4.1/homebrew.mxcl.nginx.plist ~/Library/LaunchAgents/
$ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist (Start)
$ launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist (Stop)
$ vim /usr/local/etc/nginx/nginx.conf

Put line “include sites-enabled/*.conf;” on block http{}


$ brew install tmux
$ brew install tig
$ brew isntall htop
$ brew install wget
$ brew install node
$ brew install vim
$ brew install openssl
$ brew install git
$ brew install autoconf
$ gem install tmuxinator && rbenv rehash