Skip to content

Instantly share code, notes, and snippets.

@tuyenv
Last active October 21, 2019 19:53
Show Gist options
  • Save tuyenv/c6ac31f035577baa71694e29f82872b8 to your computer and use it in GitHub Desktop.
Save tuyenv/c6ac31f035577baa71694e29f82872b8 to your computer and use it in GitHub Desktop.

Revisions

  1. tuyenv revised this gist Oct 21, 2019. 1 changed file with 1 addition and 5 deletions.
    6 changes: 1 addition & 5 deletions setup-macbook
    Original file line number Diff line number Diff line change
    @@ -37,8 +37,4 @@ sudo apachectl start

    PHP Switcher Script
    curl -L https://gist.github.com/rhukster/f4c04f1bf59e0b74e335ee5d186a98e2/raw > /usr/local/bin/sphp
    sphp 7.0

    #mysql
    brew install mysql
    brew services start mysql
    sphp 7.0
  2. tuyenv revised this gist Oct 21, 2019. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion setup-macbook
    Original file line number Diff line number Diff line change
    @@ -37,4 +37,8 @@ sudo apachectl start

    PHP Switcher Script
    curl -L https://gist.github.com/rhukster/f4c04f1bf59e0b74e335ee5d186a98e2/raw > /usr/local/bin/sphp
    sphp 7.0
    sphp 7.0

    #mysql
    brew install mysql
    brew services start mysql
  3. tuyenv created this gist Oct 21, 2019.
    40 changes: 40 additions & 0 deletions setup-macbook
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,40 @@
    #requirements
    xcode-select --install
    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    brew doctor
    brew install openldap libiconv

    #httpd
    brew install httpd
    sudo brew services start httpd
    config 80 and localhost: /usr/local/etc/httpd/httpd.conf
    sudo apachectl -k restart

    #php
    brew tap exolnet/homebrew-deprecated
    brew install [email protected]
    brew install [email protected]
    brew install [email protected]
    brew install [email protected]
    brew install [email protected]

    /usr/local/etc/php/5.6/php.ini
    /usr/local/etc/php/7.0/php.ini
    /usr/local/etc/php/7.1/php.ini
    /usr/local/etc/php/7.2/php.ini
    /usr/local/etc/php/7.3/php.ini

    config: /usr/local/etc/httpd/httpd.conf
    LoadModule php7_module /usr/local/opt/[email protected]/lib/httpd/modules/libphp7.so
    <IfModule dir_module>
    DirectoryIndex index.php index.html
    </IfModule>
    <FilesMatch \.php$>
    SetHandler application/x-httpd-php
    </FilesMatch>
    sudo apachectl -k stop
    sudo apachectl start

    PHP Switcher Script
    curl -L https://gist.github.com/rhukster/f4c04f1bf59e0b74e335ee5d186a98e2/raw > /usr/local/bin/sphp
    sphp 7.0