Skip to content

Instantly share code, notes, and snippets.

@rgazelot
Last active December 18, 2019 09:36
Show Gist options
  • Save rgazelot/8744373 to your computer and use it in GitHub Desktop.
Save rgazelot/8744373 to your computer and use it in GitHub Desktop.
Install Mac OS X

PHP/Apache MAC OS X

Install php

  1. Liip
  2. In ~/.bash_profile define wich php the system will use :
PATH=/usr/local/php5/bin:$PATH

Configure apache

Create vhosts

In /etc/apache2/extra/httpd-vhosts.conf use this structure:

<VirtualHost *:80>
    DocumentRoot "/Users/remygazelot/Sites"
    ServerName localhost
    <Directory "/Users/remygazelot/Sites">
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

Add the new virtual host in /etc/hosts:

127.0.0.1 localhost

Enable the vhosts in /etc/apache2/httpd.conf:

  1. User remygazelot
  2. Group staff
  3. Uncomment Include /etc/apache2/extra/httpd-vhosts.conf
  4. Uncomment LoadModule userdir_module libexec/apache2/mod_userdir.so in /etc/apache2/httpd.conf
  5. Uncomment Include /private/etc/apache2/extra/httpd-userdir.conf in /etc/apache2/httpd.conf

configuration

  1. Create a file in /etc/apache2/users/remygazelot.conf
  2. Enter this structure:
<Directory "/Users/remygazelot/Sites/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
  1. Uncomment Include /private/etc/apache2/users/*.conf in /etc/apache2/extra/httpd-userdir.conf

Restart apache sudo apachectl restart

MySQL

  • Install Homebrew
  • Install MySQL brew install mysql
  • Check brew info mysql
  • Install LaunchAgents:
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist

For Balloon5: ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'root';

Git

RabbitMQ

ln -sfv /usr/local/opt/rabbitmq/*.plist ~/Library/LaunchAgents
sudo launchctl load ~/Library/LaunchAgents/homebrew.mxcl.rabbitmq.plist

composer

https://getcomposer.org/doc/00-intro.md#globally

node

http://nodejs.org/

redis

local : http://redis.io/download global (recommended) :

brew install redis

http://naleid.com/blog/2011/03/05/running-redis-as-a-user-daemon-on-osx-with-launchd

Install grunt-cli

sudo npm install -g grunt-cli

Ngrok

Si 403 Forbidden sur ngrok essayer : https://ngrok.com/docs#virtual-hosts

[color]
branch = auto
diff = auto
status = auto
interactive = auto
status = auto
[alias]
st = status
ci = commit
co = checkout
br = branch
p = push
logg = log --decorate --graph
lg = log --graph --pretty=tformat:'%Cred%h%Creset -%C(yellow)%d%Creset%s %Cgreen(%an %cr)%Creset' --abbrev-commit --date=relative
lga = "!sh -c 'git log --author=\"$1\" -p $2' -"
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
lint = "!sh -c 'git status | awk \"/modified/ {print \\$3}\" | xargs -L 1 php -l'"
logfull = log --pretty=fuller --graph --stat -p
cat = cat-file -p
unstage = reset HEAD
uncommit = update-ref HEAD HEAD^
uncommithard = reset --hard HEAD^
undomerge = reset --hard ORIG_HEAD
oups = commit -a --amend -C HEAD
[branch "master"]
remote = origin
merge = refs/heads/master
rebase = true
[core]
autocrlf = input
excludesfile = ~/.gitignore
eol = lf
[mergetool]
keepBackup = true
<VirtualHost *:80>
DocumentRoot "/Users/remygazelot/Sites"
ServerName localhost
<Directory "/Users/remygazelot/Sites">
AllowOverride All
Allow from All
</Directory>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment