Easy to manage dev env for OS X
Odd Environment should work on Sierra if you're installing it from a fresh state. However, you will need to take manual actions if you've upgraded from an earlier OS. Please read the issue at #19 for further details and discussion.
- You need CLT installed. Run the following to install it:
$ xcode-select --install
- Make sure that Odd Boxen is completely removed if you've been using that previously. Please read Migrating from Odd Boxen for further details.
- Clone the repository
$ git clone https://github.com/oddhill/oddenvironment.git ${HOME}/oddenv
- Copy auth.pp.default to auth.pp and enter auth credentials for Sendgrid.
$ cp ${HOME}/oddenv/manifests/auth.pp.default ${HOME}/oddenv/manifests/auth.pp
- Run
setup.sh
$ ${HOME}/oddenv/scripts/setup.sh
- Add the following lines to your shell config file. (.profile or .bash_profile in your home folder)
export ODDENV_DIR="$HOME/oddenv"
source $ODDENV_DIR/scripts/env.sh
- Restart your shell and run
oddenv
in order to install everything
$ oddenv --force
Run the following:
$ oddenv
To pull the latest changes and apply them to your system.
$ oddenv services list
$ oddenv services mysql restart
$ oddenv services apache stop
oddenv services
is just a wrapper around other commands.
So brew services
might be worth checking out. :)
$ brew services list
$ brew services restart mysql56
Logs for every service is available at /usr/local/var/log. Simply browse that directory in order to find what you need.
- MySQL databases. Run this command to dump every database and the contents to the desktop:
$ mysqldump -u root -h 127.0.0.1 --all-databases > ~/Desktop/databases.sql
- Homebrew packages. You probably know if you've installed some additional package manually, but you can run the following command to get a list of what you've installed. Write them down and install them manually again after you've installed Odd Environment.
$ brew list
- Node packages. Same goes here, you'll need to install your manually installed packages afterwards. Use this command to see a list of the global packages currently installed:
$ npm -g list
- Run the following commands, one at a time:
$ cd /opt/boxen/repo
$ script/nuke --all --force
$ cd
$ rm -r ~/src/
$ for i in `gem list --no-versions`; do sudo gem uninstall -aIx $i; done
- Edit
~/.profile
and remove the line that sayssource /opt/boxen/env.sh
. - Remove any applications from
~/Applications
that has been installed by Homebrew Cask. You want to delete the ones that are symlinks, and keep the rest. - Reboot (just for the sake of it)
- Done!
Some users have experienced problems after Odd Boxen was removed which all has been releated to traces of Homebrew that wasn't removed properly.
Make sure that homebrew doesn't existing by running brew
. If the command still works, you will need to uninstall it manually by running ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
.
- Import your databases again:
$ mysql < ~/Desktop/databases.sql
- Install any additional Homebrew package that you might still need, but isn't included in Odd Environment...
- ... and do the same for Node packages.
MIT