Local AMP Setup
This document is intended to be a minimum requirement recommendation for local development software.
It is not intended to replace more robust developing environments such as Vagrant or Dev server.
Apache
-
Apache version
2.2.x
or greater.
MySQL
-
MySQL version
5.6.x
or greater.
PHP
-
PHP version
5.5.x
or greater. - Install PHP extensions: mcrypt, xdebug, gettext, gd, intl, mbstring
Instructions for Mac OS X
All of the installations on the Mac rely on Homebrew.
Any installations with brew
should never use sudo
.
1. install homebrew
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
You may be asked to install the Xcode developer tools at some point in the installation, make sure you install them and try to run Xcode in the GUI if possible afterward.
2. tap dupes (essentially register a repo)
brew tap homebrew/dupes
brew tap josegonzalez/homebrew-php
3. install PHP
brew install php55
4. install PHP extensions and dependencies
brew install autoconf icu4c libtool ossp-uuid php55-phalcon postgresql sqlite
brew install wget freetype jpeg mcrypt pcre php55-xdebug readline subversion zlib gettext libpng mysql php55-intl
5. Update bash environment paths.
- Open (create if not there) the
.profile
file in your home directory. - Add these entries to the file. Replace existing entries, if any.
export PATH=$(brew --prefix josegonzalez/php/php55)/bin:/usr/local/bin:/Users/myusername/phalcon-tools:$PATH
export PTOOLSPATH=/Users/myusername/phalcon-tools
- Replace
myusername
with your exact user name as seen on the command line inTerminal
. - Save and close the file.
6. Update php.ini
- Open
/usr/local/etc/php/5.5/php.ini
- Comment out
extension=svn.so
extension include. - Save and close the file.
7. Update php.conf
- Open
/etc/apache2/other/php5.conf
- Add line at top.
LoadModule php5_module $HOMEBREW_PREFIX/Cellar/php55/5.5.8/libexec/apache2/libphp5.so
- Save and close the file.
If you need to unsinstall Homebrew
uninstall homebrew
cd `brew --prefix`
rm -rf Cellar
brew prune
rm -rf Library .git .gitignore bin/brew README.md share/man/man1/brew
rm -rf ~/Library/Caches/Homebrew