basic dev env setup recipe

installare maualment xcode, chrome, sublime, jedit

xcode-select --install
 
ruby -e "$(curl -fsSL  https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor
brew install node
 
node update
brew upgrade node
node -v
npm -v
brew install homebrew/php/php56
php -v
 
brew install git
 
npm install -g typescript
tsc -v
 
npm install -g less
lessc -v
 
gem install sass
sass -v
sudo gem update
 
npm install -g cordova
cordova -v
 
npm install -g ios-sim
npm install -g ios-deploy
 
# android
# scaricare il JDK da oracle.com
sudo /usr/libexec/java_home
#
brew install ant
brew install android-sdk
android

sublime edit nel PATH:

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

screen share

  1. On the Mac: Go to System Preferences > Sharing > enable "Screen Sharing" and set an the VNC password
  2. On Ubuntu: install GtkVNCViewer
  3. SSH: system preferences, go to Internet & Networking > there is a Sharing > Remote Login
  4. iRAPP http://www.coderebel.com

bocome root:

sudo su -

brew

brew update
brew upgrade

apache

apachectl stop
apachectl start
sudo apachectl restart
 
# you should already have apache installed in /private/etc/apache2
sudo vi /private/etc/apache2/httpd.conf
sudo vi /etc/apache2/httpd.conf
 
LoadModule php5_module libexec/apache2/libphp5.so
LoadModule deflate_module libexec/apache2/mod_deflate.so
LoadModule expires_module libexec/apache2/mod_expires.so
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
 
# aggiornare i permessi
Options FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
sudo vi /private/etc/apache2/users/taz.conf
 
# carica da /Users/taz/Sites
<Directory "/Users/taz/Sites">
    Options Indexes MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

creare i virtualhosts:

# abilitare vhosts:
sudo vi /private/etc/apache2/httpd.conf
#Include /private/etc/apache2/extra/httpd-vhosts.conf
sudo vi /etc/hosts
127.0.0.1       test.local

clear local DNS cache:

dscacheutil -flushcache
<VirtualHost *:80>
    DocumentRoot "/Users/taz/Documents/workspace/dev"
    ServerName test.local
    ErrorLog "/private/var/log/apache2/test.local-error_log"
    CustomLog "/private/var/log/apache2/test.local-access_log" common
 
    <Directory "/Users/taz/Documents/workspace/dev">
            AllowOverride All
            Order allow,deny
            Allow from all
    </Directory>
</VirtualHost>

PHP

grep DocumentRoot httpd.conf
 
echo '<?php phpinfo();' > /Library/WebServer/Documents/phpinfo.php
 
 
# se php è installato con brew
LoadModule php5_module /usr/local/Cellar/php55/5.5.13/libexec/apache2/libphp5.so

mysql

http://dev.mysql.com/downloads/mysql/

export PATH=/usr/local/mysql/bin:$PATH
brew install mysql
mysql_secure_installation
# autostart mysql
cp /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
mysql.server stop
mysql.server start
 
# test connection
mysql -u root -p