Jonathon Posted December 1, 2014 Share Posted December 1, 2014 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 More sharing options...
Larry Posted December 1, 2014 Share Posted December 1, 2014 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 More sharing options...
rob Posted December 1, 2014 Share Posted December 1, 2014 I'd recommend having a look at https://www.vagrantup.com Link to comment Share on other sites More sharing options...
Larry Posted December 1, 2014 Share Posted December 1, 2014 Rob makes a good point (thanks, Rob!). There are strong arguments to using Vagrant, including that you can exactly replicate your server and Mac upgrades won't hose all the work you've done. Link to comment Share on other sites More sharing options...
Jonathon Posted December 6, 2014 Author Share Posted December 6, 2014 Thanks guys Link to comment Share on other sites More sharing options...
Jonathon Posted January 9, 2015 Author Share Posted January 9, 2015 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 More sharing options...
rob Posted January 11, 2015 Share Posted January 11, 2015 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: https://docs.vagrantup.com/v2/cli/suspend.html vagrant global-status is also really handy to manage/see all the guest machines. https://docs.vagrantup.com/v2/cli/global-status.html Link to comment Share on other sites More sharing options...
Jonathon Posted January 13, 2015 Author Share Posted January 13, 2015 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 More sharing options...
Larry Posted January 13, 2015 Share Posted January 13, 2015 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 More sharing options...
Jonathon Posted January 14, 2015 Author Share Posted January 14, 2015 Thanks Larry I actually went with homebrew. Had some trouble with MySQL in the end, but got MariaDB up instead. So I'm happy. I wish i'd have understood about homebrew before. but better late than never is better! Thanks Jonathon Link to comment Share on other sites More sharing options...
Larry Posted January 15, 2015 Share Posted January 15, 2015 Better late than never indeed! Link to comment Share on other sites More sharing options...
Jonathon Posted January 16, 2015 Author Share Posted January 16, 2015 Indeed, new .pub site is very nice too. Surely time for a little break after v1 is finished i'd hope. Link to comment Share on other sites More sharing options...
Larry Posted January 18, 2015 Share Posted January 18, 2015 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 More sharing options...
Recommended Posts