$ brew update
$ brew tap homebrew/dupes
$ brew tap homebrew/versions
$ brew tap homebrew/homebrew-php
$ brew options php56
$ brew install php56

Dans le fichier /etc/apache2/httpd.conf :
Commenter la ligne
LoadModule php5_module libexec/apache2/libphp5.so

Rajouter la ligne
LoadModule php5_module /usr/local/opt/php56/libexec/apache2/libphp5.so

Relancer Apache :
sudo vi /etc/apache2/httpd.conf

Lister les modules installés :
$ php -m

!TEST ONLY (Http non sécurisé + données de tests)

Installer éventuellement le module curl :
# apt-get install php5-curl

Et le module mcrypt :
# apt-get install php5-mcrypt

Créer un répertoire de travail :
# mkdir -p MAGENTO && cd MAGENTO

Télécharger Magento :
# wget http://www.magentocommerce.com/downloads/assets/1.9.0.0/magento-1.9.0.0.tar.gz
# wget http://www.magentocommerce.com/downloads/assets/1.9.0.0/magento-sample-data-1.9.0.0.tar.gz

Aménager :
# tar -zxvf magento-1.9.0.0.tar.gz
# tar -zxvf magento-sample-data-1.9.0.0.tar.gz
# mv magento-sample-data-1.9.0.0/media/* magento/media/
# mv magento-sample-data-1.9.0.0/magento_sample_data_for_1.9.0.0.sql magento/data.sql
# mv magento/* magento/.htaccess* .

Créer la base et l’impacter avec les données de test :
# mysql -uroot -p
mysql> create database BASE;
mysql> grant all privileges on BASE.* to USER@localhost identified by 'PASS';
mysql> flush privileges;
mysql> quit;
# mysql -hlocalhost -uUSER -pPASS BASE < data.sql

Nettoyer et déplacer :
# rm -rf magento/ magento-sample-data-1.9.0.0/ magento-1.9.0.0.tar.gz magento-sample-data-1.9.0.0.tar.gz data.sql
# cd..
# mv MAGENTO/ /var/www/magento

Attribuer les droits sur les fichiers :
# chown -R www-data:www-data /var/www/magento
# find /var/www/magento -type f -exec chmod 644 {} \;
# find /var/www/magento -type d -exec chmod 755 {} \;

Créer le virtualhost :
# vi /etc/apache2/sites-available/magento.conf

<VirtualHost *:80>

ServerAdmin webmaster@localhost
ServerName magento.lan
DocumentRoot /var/www/magento
DirectoryIndex index.php

<Directory /var/www/magento/>
  Options FollowSymLinks
  AllowOverride All
</Directory>

LogLevel warn
ErrorLog ${APACHE_LOG_DIR}/magento.error.log
CustomLog ${APACHE_LOG_DIR}/magento.access.log combined

</VirtualHost>

 
Activer le virtualhost :
# a2ensite magento.conf
# /etc/init.d/apache2 restart

Renseigner le DNS
Have fun \o/

Télécharger vlc-x.tar.xz sur le site officiel https://www.videolan.org/vlc/download-sources.html

Extraire le fichier :
# tar -xf vlc-x.tar.xz

Installer dépendances supplémentaires :
# apt-get install lua5.2 liblua5.2-dev libdbus-1-dev liblivemedia-dev libdc1394-22-dev libavc1394-dev libzvbi-dev libdvdread-dev libbluray-dev libopencv-dev libsmbclient-dev libssh2-1-dev libcddb2-dev libsidplay2-dev libvncserver-dev libfreerdp-dev libmad0-dev liba52-0.7.4-dev libfaad-dev libtwolame-dev libxcb-composite0-dev libkate-dev libxcb-xv0-dev libfluidsynth-dev libchromaprint-dev libdca-dev libxcb-randr0-dev libfribidi-dev libupnp-dev libcaca-dev libva-dev libmpeg2-4-dev libudev-dev libmtp-dev libxml2-dev libass-dev libsamplerate0-dev libxcb-keysyms1-dev librsvg2-dev libpostproc-dev libspeex-dev libopusfile-dev libtheora-dev libdirac-dev libschroedinger-dev

Configurer l’installation :
# ./configure
Permettre l’utilisation de Vlc en tant que root :
# ./configure --enable-run-as-root

Installer :
# make
# make install

Installer Apache :
# apt-get install apache2

Installer Mysql :
# apt-get install mysql-server

Installer PHP :
# apt-get install php5 php5-mysql

Créer une base :
# mysql -uroot -p
mysql> create database BASE;
mysql> grant select,insert,update,delete,create,drop,alter on BASE.* to USER@localhost identified by 'PASS';
mysql> flush privileges;

Télécharger et installer WordPress :
$ cd /var/www
$ curl -O wordpress.org/latest.tar.gz
$ tar -xvzf latest.tar.gz
$ mv wordpress/ monsite/
$ cd

Mettre à jour le fichier wp-config :
$ vi /var/www/monsite/wp-config.php

define('WP_HOME','http://monsite.lan/');
define('WP_SITEURL','http://monsite.lan/');
define('DB_NAME', 'BASE');
define('DB_USER', 'USER');
define('DB_PASSWORD', 'PASS');
define('DB_HOST', 'localhost');
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', 'utf8_general_ci');
define('WPLANG', 'fr_FR');

 
Configurer Apache :
# vi /etc/apache2/sites-available/monsite.conf

<VirtualHost *:80>

    ServerAdmin webmaster@localhost
    ServerName monsite.lan
    DocumentRoot /var/www/monsite
    DirectoryIndex index.php
    
    <Directory /var/www/monsite/>
        Options FollowSymLinks
        AllowOverride All
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/monsite.error.log
    CustomLog ${APACHE_LOG_DIR}/monsite.access.log combined

</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

 
Activer le virtualhost :
# a2ensite monsite.conf
# a2enmod rewrite.load
# a2enmod headers.load
# /etc/init.d/apache2 restart

Renseigner le DNS local :
# vi /etc/hosts
127.0.0.1 monsite.lan

Préparer un clef USB :
– Télécharger une image ISO Debian “Netinstall” sur le site Debian
– Copier l’ISO sur la clef :
# dd if=<image-debian.iso> of=/dev/<usb>; sync

Pour un DualBoot :
– Démarrer le MacBook avec OsX
– Utilitaires + Utilitaire disque + Diminuer la partition principale
avec la souris
– Télécharger Refit (ou Refind) + Installer

Installer Debian :
– Reboot avec la touche “alt” enfoncée, choisir la clef USB
– Installer Debian

Permettre sudo pour l’utilisateur principal (optionnel) :
# adduser fred sudo

Paramétrer le clavier :
Pour info le symbole “-” se trouve sur la touche “6”
$ sudo dpkg-reconfigure keyboard-configuration
Choisir “Macintosh” + “Français” + “Touche alt de droite” + “pas de touche compose”
Les caractère spéciaux (pipe tilde etc.) se font dorénavant avec shift + alt droit
Redémarrer l’ordinateur pour prise en compte

Mettre à jour Vi :
$ sudo apt-get install vim

Upgrade en Sid (optionnel) :
$ sudo vi /etc/apt/sources.list
Remplacer “wheezy” (ou autre distrib) par “sid”
$ sudo apt-get update
$ sudo apt-get dist-upgrade

Connaitre le type de Mac :
$ sudo dmidecode -s system-product-name

Installer quelques compléments :
$ sudo apt-get install curl ssh bash-completion psmisc

Activer les touches interactives :
$ sudo apt-get install pommed

Installer environnement graphique :
$ sudo apt-get install xorg i3

Allumer les touches du clavier (plus besoin depuis dernières version de Debian) :
# echo 100 > /sys/class/leds/smc\:\:kbd_backlight/brightness

Vérifier qu’on a bien toutes les couleurs :
$ (x=`tput op` y=`printf %76s`;for i in {0..256};do o=00$i;echo -e ${o:${#o}-3:3} `tput setaf $i;tput setab $i`${y// /=}$x;done) | more

Activer la wifi :
$ sudo apt-get install wireless-tools
Identifier la carte wifi :
$ lspci -nn | grep Network
Se rendre compte qu’il faut télécharger un firmware propriétaire de merde et le compiler soi-même…
OU
Brancher une carte wifi usb externe directement reconnue 😉

Lien utile : http://research.naumachiarius.com/articles/macbook-debian.html