Last active
October 21, 2019 19:53
-
-
Save tuyenv/c6ac31f035577baa71694e29f82872b8 to your computer and use it in GitHub Desktop.
Setup Development ENV on MacOS: Apache, PHP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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 | |
| #mysql | |
| brew install mysql | |
| brew services start mysql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment