Skip to content

Instantly share code, notes, and snippets.

@JulianeAlbuquerque
Last active January 11, 2017 11:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JulianeAlbuquerque/f92eb36e354dbd123cfdfbfc33b6712a to your computer and use it in GitHub Desktop.
Save JulianeAlbuquerque/f92eb36e354dbd123cfdfbfc33b6712a to your computer and use it in GitHub Desktop.

Xcode

  • Download xcode
  • When download is finished, open Xcode.app in your /Applications folder and agree to the licence
  • Install the Xcode command line tools: xcode-select --install

Homebrew

  • Download Homebrew ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Check for any conflicts or problems brew doctor

PHP-FPM

  • brew tap homebrew/dupes
  • brew tap homebrew/php
  • brew install --without-apache --with-fpm --with-mysql php56

PHP CLI

  • Update the $PATH environment variable of your shell profile. Bash Shell echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.bash_profile && . ~/.bash_profile

Setup auto start

  • mkdir -p ~/Library/LaunchAgents
  • ln -sfv /usr/local/opt/php56/homebrew.mxcl.php56.plist ~/Library/LaunchAgents/
  • launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php56.plist
  • Check if PHP-FPM is running lsof -Pni4 | grep LISTEN | grep php

MySQL

  • brew install mysql
  • ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
  • launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
  • Test connection mysql -uroot

phpMyAdmin

  • brew install autoconf
  • echo 'PHP_AUTOCONF="'$(which autoconf)'"' >> ~/.bash_profile && . ~/.bash_profile
  • brew install phpmyadmin

Nginx

  • brew install nginx

Setup auto start

  • sudo cp -v /usr/local/opt/nginx/*.plist /Library/LaunchDaemons/
  • sudo chown root:wheel /Library/LaunchDaemons/homebrew.mxcl.nginx.plist

Test web server

  • sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.nginx.plist

nginx.conf

  • mkdir -p /usr/local/etc/nginx/logs
  • mkdir -p /usr/local/etc/nginx/sites-available
  • mkdir -p /usr/local/etc/nginx/sites-enabled 
  • mkdir -p /usr/local/etc/nginx/conf.d
  • mkdir -p /usr/local/etc/nginx/ssl
  • sudo mkdir -p /var/www
  • sudo chown :staff /var/www
  • sudo chmod 775 /var/www

Composer

  • brew install composer

Cache

  • brew install memcached
  • brew install php56-memcached
  • brew install php56-memcache

Capifony

  • gem install capifony

Ressalvas

Set the timezone, in your php.ini

  • php -i | grep php.ini
  • Find to date.timezone = "America/Sao_Paulo"

Set the memory_limit in your php.ini

  • php -i | grep php.ini
  • memory_limit = 1G

Frontend

Node

  • brew install npm

Sass

  • sudo gem install compass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment