Skip to content

Instantly share code, notes, and snippets.

@strangnet
Created September 21, 2012 09:01
Show Gist options
  • Save strangnet/3760474 to your computer and use it in GitHub Desktop.
Save strangnet/3760474 to your computer and use it in GitHub Desktop.
Setting up work computer (OS X)
Install Xcode from App Store
- install command line tools from Xcode preferences
Get homebrew: ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)
- brew doctor
brew install hg
brew install git
brew install nodejs
brew install rbenv
brew install ruby-build
brew install rbenv-vars
brew install readline
brew install ctags
brew install sqlite
brew install gdbm
brew install redis
brew install autoconf
# Ruby
rbenv install 1.9.3-p327
rbenv rehash
rbenv global 1.9.3-p327
# Python
brew install python
source .zshrc
pip install --upgrade distribute
pip install --upgrade pip
pip install virtualenv
Install oh-my-zsh: https://github.com/strangnet/oh-my-zsh
git clone git://github.com/strangnet/oh-my-zsh ~/.oh-my-zsh
Install dotfiles: https://github.com/strangnet/dotfiles
git clone git://github.com/strangnet/dotfiles ~/.dotfiles
Install iTerm2: http://www.iterm2.com/
Change shell to zsh:
chsh -s /bin/zsh
Install mercurial extensions:
hg clone https://bitbucket.org/tksoh/hgshelve
hg clone https://bitbucket.org/sjl/hg-prompt
In ~/.dotfiles, run:
rake
restart your terminal
gem update --system
gem install rdoc
gem install rails && rbenv rehash
npm install -g coffee-script
npm install -g buster
npm install -g uglify-js
Install Zend Server CE: http://www.zend.com
Finalize mysql install:
cd /usr/local/zend/mysql
sudo scripts/mysql_install_db
In Zend Controller (http://localhost:10081):
- Disable Zend Data Cache
- Disable Zend Debugger
- Disable Zend Optimizer+
- Add 'Europe/Berlin' as timezone under Server Setup > Directives > date > date.timezone
sudo ln -s /usr/local/zend/lib/libltdl.3.dylib /usr/lib/libltdl.3.dylib
Check that the directory /var/www exists
Symlink the project directory from /var/www:
ln -s ~/[path_to_project_root] /var/www/[project_name]
Symlink the vhost configuration files in application/configs:
ln -s ~/[path_to_vhost_file] /usr/local/zend/etc/sites.d/vhost_[project_name].conf
# Xdebug
Checkout xdebug source: git://github.com/derickr/xdebug.git
phpize
CC=clang CFLAGS="-arch i386 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch i386 -g -Os -pipe" CXXFLAGS="-arch i386 -g -Os -pipe" LDFLAGS="-arch i386 -bind_at_load" PHP_CONFIG="/usr/local/zend/bin/php-config" ./configure
make
sudo cp modules/xdebug.so /usr/local/zend/lib/php_extensions/.
Add the following to /usr/local/zend/etc/php.ini, before the line about ZendExtensionManager.so
[xdebug]
zend_extension=/usr/local/zend/lib/php_extensions/xdebug.so
xdebug.remote_enable=on
xdebug.remote_log="/tmp/xdebug.log"
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"
xdebug.remote_autostart=1
xdebug.remote_connect_back=1
# Installing Wso2/WSF
Download source from either
- https://github.com/wso2/wsf
- http://wso2.com/products/web-services-framework/php/
Apply the clockskew patch
MACOSX_DEPLOYMENT_TARGET=10.6 CC=clang CFLAGS="-arch i386 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch i386 -g -Os -pipe" CXXFLAGS="-arch i386 -g -Os -pipe" LDFLAGS="-arch i386 -bind_at_load" PHP_CONFIG="/usr/local/zend/bin/php-config" ./configure 'CPPFLAGS=-DHAVE_GETIFADDRS'
make
sudo make install
sudo touch /usr/local/zend/etc/conf.d/wsf.ini
Add the following to the wsf.ini:
[wsf]
extension=wsf.so
wsf.home="/usr/local/zend/lib/php_extensions/wsf_c"
wsf.log_path="/tmp/wsf_c/logs"
wsf.log_level=3
# PHPUnit
sudo pear upgrade PEAR
pear config-set auto_discover 1
sudo pear install pear.phpunit.de/PHPUnit
sudo pear install phpunit/DbUnit
sudo pear install phpunit/PHPUnit_Selenium
sudo pear install phpunit/PHPUnit_Story
# Yeoman
gem install compass && rbenv rehash
brew install phantomjs
brew install jpeg-turbo && brew link jpeg-turbo
brew install optipng
npm install -g yeoman
curl -L get.yeoman.io | sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment