Having a localhost environment for development purposes is an excellent idea. With such a "stack" as it's called on your computer, you can work on projects, whether design or development, any time, anywhere, even without an Internet connection.
There are several ways to install a web development stack. I use MAMP for my MacBook Pro. The disadvantage to MAMP is that it must reside in the Applications folder. There is MAMP for Windows. There is also XAMPP for Mac and Windows.
A very intriguing option is from Bitnami. Actually there are several options. They provide a full virtual machine, which you can install on any VM manager, such as VirtualBox. This provides a full virtual machine including operating system, as well as the full Web stack. Another option is just the Web stack - database server, web server, PHP and MODX already installed. What is really fun about this one is that it easily installs on external storage, like a USB drive. MODX-on-a-stick!
And, of course, if you really have too much time on your hands, you can install and manage all of the parts needed for a Web stack natively on your computer. Actually the Mac comes with some of the applications needed, but they are usually badly out-of-date. Install tools like Homebrew's "brew" command-line installer are helpful in getting these updated, as well as installing packages that OS X doesn't include by default.