To work on a website development, the easiest way is to have a local installation of your CMS —WordPress on my case.
Whenever I have to activate one of these, I always have trouble remembering all the steps or wether this OS X version has or hasn’t this or that. So this is my checklist for MAMP installation based on Mavericks. Ok, if you’re new to this and that sounded unfamiliar, just know that MAMP stand for:
- M: Mac OSX — Operating System,
- A: Apache — the Web server,
- M: MySQL — the database management system (or database server),
- P: PHP, Perl, or Python… — programming languages used for web development (PHP in my case)
Firstly, activate PHP Module for Apache. Both are preinstalled in Mavericks but not active. So edit the
$sudo nano /etc/apache2/httpd.conf
to uncomment the line:
LoadModule php5_module libexec/apache2/libphp5.so
$sudo apachectl restart
Having activated PHP, you now need to install mysql. You can choose to install it from your package management system of choice, directly from http://dev.mysql.com/downloads/mysql/ OR choose to check out this link: http://www.macminivault.com/mysql-mavericks/ (this is the script it uses to download mysql from Oracle, together with a bunch of things for a graphic interface on you System Preferences). To download the macminivault mysql script run:
bash <(curl -Ls http://git.io/eUx7rg)
It will also automatically create a root user and password and activate mysql, so look out for
... Starting MySQL . SUCCESS! Setting MySQL root Password to xxxxxxxx Placing password on desktop... ...
Apache is already installed in Mavericks, although it does no longer appear under sharing in the System Preferences. So open a Terminal and simply type:
$sudo apachectl start
Create, if you don’t have one already, a Sites directory in your user’s home and access it from your web browser as:
localhost/~userName. All your web files will go in here.