I have run into a problem where I have been working with two different projects. One requiring Drupal and the other Laravel 7.+. There are more ways to setup a development enviroment then there are operating systems it seems! Today we will look at creating a well rounded development local server enviroment on a MacBook Pro using HomeBrew.
I especially enjoy using HomeBrew as it is an excellent package manager for OSX. Simple, straight forward and the packages are quite complete!
What I have to work with;
As you can see, the machine is not a muscle machine by anymeans. It will work just fine for what I will be using it for.
According to the documentation, the minimum requirments are;
xcode-select --install, developer.apple.com/downloads
or have Xcode 3 installed.
Now, before you begin, you must not install HomeBrew as a root user! Very bad things can happen should you do so... You have been warned!
I like to create a work directory when using the commandline. I find it much easier to keep things clean.
mkdir ~/work && cd ~/work
Download and install HomeBrew with the installer;
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
chmod 775 install.sh && ./install.sh
The process should go off without a hitch. If you discover errors, it is best to fix the problems before you move on.
Now, I have a list of software I wish to install;
You will have to uninstall Apache from your system if you are using a newer version of OSX.
sudo apachectl stop &&
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
brew install httpd