Coder Social home page Coder Social logo

brew-emp's Introduction

Homebrew (E)Nginx MySQL PHP Installer

Native way to setup web environment for Mac.

brew-emp

Overview

This script will install and setup Nginx + MySQL + PHP through Homebrew.

Requirements

Installation

curl -L https://raw.github.com/mrded/brew-emp/master/tools/install.sh | bash

Uninstall

curl -L https://raw.github.com/mrded/brew-emp/master/tools/uninstall.sh | bash

Update PHP version

curl -L https://raw.github.com/mrded/brew-emp/master/tools/update.sh | bash

Usage

brew-emp [start | stop | restart]

Creating VirtualHost

For example let's create virtual host for Drupal 'mysite'.

Copy Drupal preset: cp /usr/local/etc/nginx/sites-available/drupal.local /usr/local/etc/nginx/sites-available/mysite.local

Change name and path to site: vim /usr/local/etc/nginx/sites-available/mysite.local

server {
  listen       80;
  server_name  mysite.local;
  root /Users/mrded/Sites/mysite;

  access_log /usr/local/var/log/nginx/mysite.access.log;
  error_log  /usr/local/var/log/nginx/mysite.error.log;

  include /usr/local/etc/nginx/common/drupal;
}

Enable virtual host: ln -s /usr/local/etc/nginx/sites-available/mysite.local /usr/local/etc/nginx/sites-enabled/mysite.local

Add 127.0.0.1 mysite.local to /etc/hosts.

Default Settings

MySQL

Username: root

Password:

Port: 3306

Xdebug

Remote port is 9002

Configs

Nginx: /usr/local/etc/nginx/nginx.conf

FastCGI: /usr/local/etc/nginx/fastcgi.conf

PHP: /usr/local/etc/php/5.6/php.ini

Redis: /usr/local/etc/redis.conf

Xdebug: /usr/local/etc/php/5.6/conf.d/ext-xdebug.ini

MySQL: /usr/local/mysql/etc/my.cnf

Handy projects

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.