- Alfred (http://www.alfredapp.com/)
- Dropbox (http://db.tt/rUwqOa8)
- Codebox (http://www.codeboxapp.com/)
- Sublime Text 2 (http://www.sublimetext.com/2)
- Sequel Pro (http://www.sequelpro.com/)
- Chrome (http://www.google.com/chrome)
- Firefox (http://getfirefox.com)
- firebug
- YSlow
- Firecookies
- IntelliJ IDEA
- 1Password
The following guide will help you set-up your new machine for PHP development:
- Apache Web Server 2.2.x with mod rewrite enabled
- MySQL 5.5.x
- PHP 5.3.x
Note the following guide was created on Mac OS X and with a user named "nhidalgo".
Make sure your OS X version is up to date. Download Xcode (https://developer.apple.com/xcode/) and install the "Command Line Tools".
MySQL (http://www.mysql.com/downloads/mysql/)
Go to http://mxcl.github.com/homebrew/.
$ brew tap homebrew/dupes
$ brew update
$ brew install wget
$ brew install autoconf
Common PHP modules for DEV: apc, bcmath, bz2, calendar, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, intl, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mhash, mongo, mysql, mysqli, mysqlnd, OAuth, odbc, openssl, pcntl, pcre, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, Reflection, session, shmop, SimpleXML, soap, sockets, solr, SPL, SQLite, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tokenizer, uploadprogress, wddx, xhprof, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib.
$ brew tap josegonzalez/homebrew-php
$ brew options php53
$ brew install php53
$ brew install php53-apc
$ brew install php53-mcrypt
$ brew install php53-memcache
$ brew install php53-memcached
$ brew install php53-mongo
$ brew install php53-redis
# PATH sample
PATH=/usr/local/bin:/usr/local/php5/bin:/usr/local/mysql/bin:$PATH
# Load bashrc
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" General
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set nocompatible " Must come first because it changes other options.
set showcmd " Display incomplete commands.
set showmode " Display the mode you're in.
syntax enable " Turn on syntax highlighting.
filetype plugin indent on " Turn on file type detection.
set backspace=indent,eol,start " Intuitive backspacing.
set hidden " Handle multiple buffers better.
set wildmenu " Enhanced command line completion.
set wildmode=list:longest " Complete files like a shell.
set ignorecase " Case-insensitive searching.
set smartcase " But case-sensitive if expression contains a capital letter.
set number " Show line numbers.
set ruler " Show cursor position.
set incsearch " Highlight matches as you type.
set hlsearch " Highlight matches.
set wrap " Turn on line wrapping.
set scrolloff=3 " Show 3 lines of context around the cursor.
set title " Set the terminal's title
set visualbell " No beeping.
set nobackup " Don't make a backup before overwriting a file.
set nowritebackup " And again.
set backupdir=~/tmp " Set backup directory.
set noswapfile " Don't make swap files.
set directory=$HOME/.vim/tmp//,. " Keep swap files in one location.
set laststatus=2 " Show the status line all the time
Set Apache Server's configuration file (/etc/apache2/httpd.conf). We will do the follow:
- Change DocumentRoot to ~/Sites (http://localhost)
- Enable virtual hosts
- Add default and a new vhost (*optional)
$ sudo vi /etc/apache2/httpd.conf
...
# User home directories
Include /private/etc/apache2/extra/httpd-userdir.conf
# Virtual hosts
Include /private/etc/apache2/extra/httpd-vhosts.conf
...
$ sudo vi /etc/apache2/users/nhidalgo.conf
# Override Default DocumentRoot
DocumentRoot "/Users/nhidalgo/Sites"
<Directory "/Users/nhidalgo/Sites">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
$ sudo vi /etc/apache2/extra/httpd-vhosts.conf
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
NameVirtualHost *:443
#
# Virtual hosts (Custom)
#
Include /etc/apache2/vhosts.d/*.conf
$ sudo mkdir /etc/apache2/vhosts.d $ sudo vi /etc/apache2/vhosts.d/_default_.conf
<VirtualHost _default_:80 _default_:443>
DocumentRoot "/Users/nhidalgo/Sites"
ServerName localhost
</VirtualHost>
$ sudo vi /etc/apache2/vhosts.d/creovel.dev.conf
<VirtualHost *:80>
DocumentRoot "/Users/nhidalgo/Sites/creovel.dev/public"
ServerName creovel.dev
ServerAlias www.creovel.dev
ErrorLog "/etc/apache2/creovel.dev-error.log"
CustomLog "/etc/apache2/creovel.dev-access.log" common
</VirtualHost>
$ sudo vi /etc/hosts ; add a host for each new vhost
127.0.0.1 creovel.dev