Saturday, 13 June 2009

First Macbook - webdeveloper enviroment

Hi Readers,

This week I've got my first Macbook. I don't want to say any advertisement for the machine. Apple already has a very ugly campaign, just check www.apple.com and watch some commercial. Anyway. I love it even if it's so hard to setup.
Some quick steps, how you can setup a minimal web developer environment if you've never seen OS X.
  1. OS - by default
  2. Apache (2.2) - Enable it in System preferences / Sharing (Web) [http://www.procata.com/blog/archives/2007/10/28/working-with-php-5-in-mac-os-x-105/]
  3. Apache rewrite - overwrite appropriate line in httpd.conf to: AllowOverride All
  4. PHP - by default
  5. MySQL - download the official 5.06 version package (install both two dmg-s), and link the /tmp/mysql.sock to /var/mysql/mysql.sock
  6. MySQL - if mysql doesn't allow to get in, you have to hack an account [http://www.linuxquestions.org/linux/answers/Security/MySQL_root_password_recovey]
  7. XDebug : download macvim, xdebug plugin for vim and compile the xdebug extension [http://www.chrissearle.org/blog/technical/running_xdebug_204_osx_leopard_apachephp]
Important paths / files:
  • /etc/php.ini
  • /etc/apache2/httpd.conf
  • /etc/apache2/users/youruser.conf
  • /private/etc/... [almost the same as in /etc]
  • apachectl restart/start/stop
  • /usr/local/mysql/bin/mysql
  • /Library/StartupItems/MySQLCOM/MySQLCOM start/stop/restart
It just an overview, it's highly suggested to read some external materials. My intention was giving a small insight what you should expect. For me (as a first-time macer) was kinda hard to setup the basic stuffs. Of course there are easier ways. If you want to find some seamless solution, just check out these projects: MAMP, Fink.

I want to write about my other experiences about the mac, but for now there are tons of works to do, so back to mac.

Night!

No comments:

Post a Comment