Advertisement
theitd

OSX LAMP install

Jan 31st, 2017
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.90 KB | None | 0 0
  1.  
  2. # From http://www.iyware.com/osx-yosemite-mamp-homebrew-development-setup/
  3.  
  4. # Install Homebrew
  5. xcode-select --install
  6. ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  7. brew doctor
  8.  
  9. # Tap Repos
  10. brew tap homebrew/dupes
  11. brew tap homebrew/versions
  12. brew tap homebrew/homebrew-php
  13. brew tap homebrew/apache
  14.  
  15. # Verify
  16. brew update && brew upgrade
  17.  
  18. # Macintosh
  19. brew install git
  20. brew install openssl
  21. ssh-keygen -t rsa -C “email@address.invalid”
  22. ssh-add ~/.ssh/id_rsa
  23.  
  24. # Apache
  25. sudo apachectl stop
  26. sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null
  27. brew install httpd24 --with-privileged-ports --with-brewed-ssl
  28. sudo cp -v /usr/local/Cellar/httpd24/2.4.10/homebrew.mxcl.httpd24.plist /Library/LaunchDaemons
  29. sudo chown -v root:wheel /Library/LaunchDaemons/homebrew.mxcl.httpd24.plist
  30. sudo chmod -v 644 /Library/LaunchDaemons/homebrew.mxcl.httpd24.plist
  31. sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.httpd24.plist
  32. sudo httpd -k start
  33.  
  34. # MySQL
  35. brew install mysql
  36. ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
  37. launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
  38. mysqladmin -u root password “NEWPASSWORD”
  39.  
  40. # PHP
  41. brew install php56 --homebrew-apxs --with-apache --with-homebrew-curl --with-homebrew-openssl --with-phpdbg --with-tidy --without-snmp
  42. chmod -R ug+w /usr/local/Cellar/php56/5.6.2/lib/php
  43. pear config-set php_ini /usr/local/etc/php/5.6/php.ini
  44. printf '\nAddHandler php5-script .php\nAddType text/html .php' >> /usr/local/etc/apache2/2.4/httpd.conf
  45. perl -p -i -e 's/DirectoryIndex index.html/DirectoryIndex index.php index.html/g' /usr/local/etc/apache2/2.4/httpd.conf
  46. printf '\nexport PATH="$(brew --prefix homebrew/php/php56)/bin:$PATH"' >> ~/.profile
  47.  
  48. # Dev Stuff
  49. brew install composer
  50. brew install behat
  51. brew install node
  52. npm -g install grunt
  53. npm -g install shifter
  54. brew tap danpoltawski/homebrew-mdk
  55. brew install moodle-sdk
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement