Skip to content

Instantly share code, notes, and snippets.

@hvan021
Last active August 29, 2015 14:25
Show Gist options
  • Save hvan021/fb1e7f37e3126327738f to your computer and use it in GitHub Desktop.
Save hvan021/fb1e7f37e3126327738f to your computer and use it in GitHub Desktop.
Setup MAMP

In terminal:

  • sudo apachectl start

  • sudo vim /etc/apache2/httpd.conf uncomment "LoadModule php5_module libexec/apache2/libphp5.so"

  • sudo apachectl restart

  • cd to Dev folder

  • ln -s /Library/WebServer/Documents ./WebDocs

then sudo chown -R :admin /Library/WebServer/Documents

sudo chmod -R g=rw,+X /Library/WebServer/Documents
  • Now download mysql then install it

  • Update path for mysql. In terminal:

    export PATH=/usr/local/mysql/bin:$PATH

start mysql

service mysql start

secure mysql installation

mysql_secure_installation
  • Update path to mysql.sock for PHP

    cd /var

    mkdir mysql

    cd mysql

    ln -s /tmp/mysql.sock mysql.sock

    (or ln -s /var/mysql/mysql.sock mysql.sock --if mysql.sock is in /var/mysql )

  • Enable apache mod_rewrite and other useful mods sudo vim /etc/apache2/httpd.conf

  • Uncomment LoadModule deflate_module libexec/apache2/mod_deflate.so

    LoadModule expires_module libexec/apache2/mod_expires.so

    LoadModule rewrite_module libexec/apache2/mod_rewrite.so

  • Download phpmyadmin then extract it to WebDocs folder

  • create config file mv config.sample.inc.php config.inc.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment