Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jbsmithmac

macrumors regular
Original poster
Sep 11, 2011
244
0
I dabble in web development - nothing to serious (I've got a couple sites). That said I like to mess around on my localhost before going live.

I only need apache, php, mysql, and phpadmin. That said I know OS X has apache already, and the others can be installed/configured.

My question is however, since I only dabble - I'm thinking it would be best for me to use something like MAMP or XAMPP for the ease of it as it relates to configuration, etc.

Does anyone have any thoughts? I am only serving the website(s) locally on my machine, not even to the rest of the computers in my home.

My machine is a mid-2009 MBP running 10.8


Thanks!
 

MisterKeeks

macrumors 68000
Nov 15, 2012
1,833
28
I do about the same amount of web development as you, and I use XAMPP. It is simple and includes everything you need. It will allow you to serve pages to other computers, but you don't need that. I use it on an Early-2011 Quad i7 MBP- it's overkill, but it'll last for quite some time.
 

jbsmithmac

macrumors regular
Original poster
Sep 11, 2011
244
0
Thanks...I might be leaning toward MAMP because it seems that it is updated regularly as compared to XAMPP which doesn't look like its been updated in over 2 years.
 

robvas

macrumors 68040
Mar 29, 2009
3,240
629
USA
A popular way to do this is make a 512MB RAM virtual machine in VirtualBox and install a server version of Linux.
 

m00min

macrumors 6502
Jul 17, 2012
419
90
I use the pre-installed Apache and PHP, you would need to download the mySQL binary. Personally I prefer running this setup directly but if you're just wanting an easy setup go with MAMP, you won't be at the mercy of Apple breaking something in an OS update.
 

firedept

macrumors 603
Jul 8, 2011
6,277
1,130
Somewhere!
Thanks...I might be leaning toward MAMP because it seems that it is updated regularly as compared to XAMPP which doesn't look like its been updated in over 2 years.

I have been using MAMP Pro for a few years and it works well. MAMP is the free version and will serve your needs. Includes everything and setup is easy. I started with MAMP and moved to the Pro version as I required some of the additional services it gave.
 

Cromulent

macrumors 604
Oct 2, 2006
6,802
1,096
The Land of Hope and Glory
A popular way to do this is make a 512MB RAM virtual machine in VirtualBox and install a server version of Linux.

This is definitely the best way to go. Since you won't be running Mac OS X on the server hosting your website you'll need to get used to using Linux anyway. You may as well get used to it in an environment that is completely safe if you screw things up.

Personally I'd recommend Ubuntu Server 12.04 LTS as it is probably the easiest server distribution to get started with. Debian is also good but the packages in it are pretty old now.
 

Jamesbot

macrumors member
Jun 19, 2009
51
1
This is definitely the best way to go. Since you won't be running Mac OS X on the server hosting your website you'll need to get used to using Linux anyway. You may as well get used to it in an environment that is completely safe if you screw things up.

Personally I'd recommend Ubuntu Server 12.04 LTS as it is probably the easiest server distribution to get started with. Debian is also good but the packages in it are pretty old now.

If you choose to go this route, I'd also recommend using vagrant to run your vm. It's a ruby gem that allows you to do things like run a VM without the VirtualBox GUI, easily set up shared directories ( if you dont want to have to keep pushing code out to your Development environment ), among other things.

It's also super easy to download prebuild VMs ( vagrantboxes ) with the stack you want preinstalled.
 

Zyriab

macrumors newbie
Jan 4, 2013
27
9
I use LAMP running on a cheap-as-chips Raspberry Pi, keeps all the server daemons off my day-to-day MBP and works in a more authentic way (for what it's worth!) as an external web-server.
 

firewood

macrumors G3
Jul 29, 2003
8,106
1,343
Silicon Valley
I use LAMP running on a cheap-as-chips Raspberry Pi...

And a Raspberry Pi actually cost less than the Parallels or VMWare VMs and require less electricity than a night light.

I'm still looking for a hosting facility to which I can send a pre-configured Pi (or BeagleBone or PogoPlug, etc.) and that costs less per month than upgrading my home broadband to business class (with server connection TOS guarantees).
 

alembic

macrumors regular
Oct 13, 2005
183
40
I'll try Vagrant!

For those that run a development environment in a VM, how do you approach source control?

For example, do I install Subversion server on the guest OS and therefore maintain the entire development environment in the VM? or do I commit my changes to an external repository, say, on the host OS, or accessible by the host OS through a share?
 

alembic

macrumors regular
Oct 13, 2005
183
40
@Zyriab, so you have the entire LAMP stack on the Raspberry Pi? What distro are you using? Thx.
 

Cromulent

macrumors 604
Oct 2, 2006
6,802
1,096
The Land of Hope and Glory
For example, do I install Subversion server on the guest OS and therefore maintain the entire development environment in the VM? or do I commit my changes to an external repository, say, on the host OS, or accessible by the host OS through a share?

Put everything in the guest OS and sync your code to somewhere like Github or Bitbucket.
 

alembic

macrumors regular
Oct 13, 2005
183
40
Vagrant Boxes

I'm finally about to start looking at Vagrant. But I'm a .NET developer so as a Linux noobie some things still don't click for me.

Do I basically determine the environment offered by my hosting service and then configure vagrant to provision that exactly? What if the stock Vagrant boxes don't match what the hosting service provides? Do I grab the one that's closest to what I need and then tweak the vagrant configuration? Do Vagrant boxes include a description of the components so I can start with the most appropriate one? Thx.
 

alembic

macrumors regular
Oct 13, 2005
183
40
Also, after I have the VM configured, do I then edit my source files through a share so I can use something like TextMate on my MacBook Pro? or do I stay in the VM and use vi, etc? Hopefully not the latter.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.