Git Product home page Git Product logo

megalodon's Introduction

Megalodon

The goal of megalodon to provide a simple, repeatable, and extendable way to setup a modern php development environment on Mac OS X. It consists of a collection of homebrew formulas and chef recipies. It's pretty awesome.

This project is heavily influenced by cider/cinderella, which is aimed at providing an environment for ruby/python/node. Megalodon started as a fork of smeagol (the chef bits of cinderella), but has since taken a different approach.

Installation

Install homebrew.

You can use sudo for installing gems, but don't use sudo for anything else. If you already installed Ruby with homebrew then don't use sudo for any of the installation.

Install megalodon:

brew install --HEAD https://raw.github.com/msonnabaum/megalodon/master/formulas/megalodon.rb

Run megalodon:

megalodon install

If megalodon install fails along the way try running it again.

If it fails again, read what command failed and run just that command and look at the output.

Usage

General

Megalodon uses OSX's built in apache, so you can restart apache like so:

sudo /usr/sbin/apachectl restart

Everything else that's installed with homebrew should have a plist in ~/Library/LaunchAgents (OSX's equivalent to /etc/init.d), which can be managed with lunchy. It will soon be included in megalodon, but for now just do gem install lunchy.

For example, you'd restart mysql like so:

lunchy restart mysql

Managing virtual hosts

You will need to edit /etc/hosts as per usual; To add a new virtual host, add a new .json file in:

~/.megalodon/data_bags/vhosts

For example, you could add example.com to your /etc/hosts for 127.0.0.1 and then use an entry called example.json in ~/.megalodon/data_bags/vhosts with these contents:

{
  "id": "example_com",
  "docroot": "/home/yourname/workspace/example/",
  "servername": "example.com",
  "server_aliases": [ "www.example.com", "foo.example.com"]
}

To re-generate the apache confs after modifying/adding vhosts:

megalodon update_vhosts

Then restart apache as above.

Other notes

mysql default username is root, no password

Troubleshooting the install

Test if a new virtual host is working using curl:

curl http://localhost/ -H "Host www.example.com"

Replace www.example.com with the hostname you expect to work. If that returns the content you expect.

megalodon's People

Contributors

msonnabaum avatar steveoliver avatar atmos avatar glennpratt avatar greggles avatar cashwilliams avatar mrmaksimize avatar weitzman avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.