Thursday, May 10, 2012

How to set environment variables in Mac OS X Lion (For PHPunit purpose)

In my recent web application development, I need PHPUnit to run in my Macbook Pro Mac OS Lion X Lion. In my previous post I installed PHPUnit using PHP pear on XAMPP. 

Now I need to run it without evoking all the the path to the XAMPP bin files located at /Applications/XAMPP/xamppfiles/bin

So I need to set the environment variabel setting location in my Mac OS X Lion. We can do this with two easy steps.  

First: Open /etc/path files with terminal:

$ sudo vim /etc/path 

Second: Add /Applications/XAMPP/xamppfiles/bin to the bottom of the file. In my Mac, it look like this: 
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
/Applications/XAMPP/xamppfiles/bin
~                                  

That's All

1 comment:

harada57 said...
This comment has been removed by the author.