Skip to content

Instantly share code, notes, and snippets.

@yugaego
Last active June 13, 2019 18:34
Show Gist options
  • Save yugaego/450510157f1d15e394c3a378e35132bc to your computer and use it in GitHub Desktop.
Save yugaego/450510157f1d15e394c3a378e35132bc to your computer and use it in GitHub Desktop.
Mac OS 10.13 High Sierra Install PHP 7.0 Apache MariaDB With Homebrew

Tools

  $ xcode-select --install
  $ softwareupdate --list

Install Homebrew

Homebrew website

Apache

  $ sudo apachectl stop
  $ sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null
  $ brew install httpd  
  $ sudo brew services start httpd  
  $ vim /usr/local/etc/httpd/httpd.conf 

MariaDB

  $ brew install mariadb
  $ brew services start mariadb
  $ /usr/local/Cellar/mariadb/10.2.9/bin/mysql_secure_installation

PHP

    $ xcode-select --install
    $ brew tap homebrew/homebrew-php
    $ brew options php70
    $ brew install php70 --with-homebrew-curl --with-httpd
    $ vim  /usr/local/etc/php/7.0/php.ini

Check this line is added to httpd.conf

LoadModule php7_module /usr/local/Cellar/php70/7.0.24_16/libexec/apache2/libphp7.so
    $ brew install php70-apcu php70-xdebug php70-imagick
    $ brew install --build-from-source php70-opcache
    $ brew install --build-from-source php70-intl
    $ brew install --build-from-source php70-mcrypt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment