Jump to content
Larry Ullman's Book Forums

Environments For Development On Macs


Recommended Posts

Hi

 

I got my first mac not long ago and set it up using the bundled Apache, I downloaded PHP to get the latest version and also Mysql. I also downloaded ElasticSearch and node.js. Everything was glorious. However when I upgraded to Yosemite it basically wrecked everything and it took me ages to get everything back working. 

 

So my question is Mac aficionados what are good set ups that are "resistant" to these kind of problems?

 

Thanks

 

Jonathon

Link to comment
Share on other sites

Honestly, I've generally not had a problem with this (not for years, at least) until the Yosemite update. I don't have best practices here. My understanding is Yosemite did a lot with /usr/local, which is what was different. My current policy is to cross my fingers that this goes better the next time around!

Link to comment
Share on other sites

  • 1 month later...

I am back regarding this.

 

I have a few questions for mac people. I have a working environment. There are a couple of things that are missing so to speak, when I look at the yii requirements page. GD library support for PNG and Memcache, which I think were ok prior to upgrading to Yosemite.

 

I like Vagrant, however I had a little trouble with permissions and working from inside vagrant ssh and my host machines files. 

 

One of the concerns for me was how could you ensure the stability of your DB. I did like that in XAMPP you could turn it on or off so it didn't use a load of resources. If I destroyed the vagrant environment, I would lose the data, tables and everything in there. 

 

I have heard of homebrew too and wonder about using that, it seems to be an easier?? way to install the software you want. 

 

Would that be right? It also seems more manageable in that everything ends up in your usr/local folder and can presumably be cleared out fairly easily too?

 

I had quite the game installing/compiling mcyrpt. My environment is ok currently, but I would be interested to know people's experiences with both Vagrant and Homebrew and how easy / time consuming they were or any tricks. It's really not my forte. 

 

Thanks

 

Jonathon

Link to comment
Share on other sites

One of the concerns for me was how could you ensure the stability of your DB. I did like that in XAMPP you could turn it on or off so it didn't use a load of resources. If I destroyed the vagrant environment, I would lose the data, tables and everything in there. 

 

Yeah, this was tedious when I first started using vagrant, until I found that you could suspend a guest machine:
 
 
vagrant global-status is also really handy to manage/see all the guest machines.
 
Link to comment
Share on other sites

Thanks Rob that is helpful. 

 

I do very much like the idea of Vagrant and I had got to a working environment pretty much, but losing the DB data or having the VM eat away at the RAM (I only have a mac air) was something I was concerned about.

Link to comment
Share on other sites

I use both Vagrant and Homebrew. Homebrew is a pretty great way to install software, and I'd use it for anything that's possible. I heard rumors that the Yosemite installation took forever with lots of stuff in /usr/local, but I didn't see that for myself. Homebrew is also easy to keep up to date, to fix problems, etc. And the doctor is nice. But it's best if you commit to using Homebrew instead of picking and choosing how you install things. 

 

Vagrant does require a lot of memory. I'm also using Vagrant through VM Fusion, which is a commercial product. Not sure what all that offers over VirtualBox. 

 

To me, there are two benefits of using Vagrant. First, you can exactly mimic an environment. Second, you can keep stuff separate from your Mac such that updates don't mess things up. 

 

That being said, for most things, day to day, I don't use Vagrant. Every so often with an update I lose my Apache virtual hosts or a MySQL update doesn't use the same data directory. In those cases, I just need to make some edits and changes. Not a big deal, just an annoyance. 

 

For performance, Apache is always running locally. If I think about it, I turn MySQL on and off (via the System Preference) as I need it. 

Link to comment
Share on other sites

Thanks, Jonathon! It was nice to do a little development and whip out a project like that. And it'll help me going forward at some future point. (It's on Digital Ocean, by the way.) But I need to get back to writing so it's not too long before the revision gets finished!

Link to comment
Share on other sites

 Share

×
×
  • Create New...