tar.gz files and they are only recommended for experts who know they want it.
As mentioned previously, the ZIP files are similar to the Linux binary. There are two types of MariaDB downloads for Windows: ZIP files and MSI packages.
$ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout server.key -out server.(For more resources related to this topic, see here.) Installing MariaDB on Windows SSLCertificateKeyFile "/usr/local/etc/httpd/server.key"
SSLCertificateFile "/usr/local/etc/httpd/server.crt" $ vi /usr/local/etc/httpd/extra/nfĬreate your virtual host entries that you want to use SSL with.
Save the file, open up /usr/local/etc/httpd/extra/nf and add your own SSL based virtual hosts. General setup for the virtual host DocumentRoot "/usr/local/var/www"
mysql -urootĬhange default 8443 ports to 443 in the SSL configuration file. brew services start mariadbĪfter MariaDB is started, you can connect.
brew install mariadbĪfter installation, start the MariaDB server with. We will install the sphp script into brew's standard /usr/local/bin: $ curl -L > /usr/local/bin/sphpĪfter you have completed these steps, you should be able to switch your PHP version by using the command sphp followed by a two digit value for the PHP version: $ sphp 72 Luckily, some industrious individuals have already done the hard work for us and written a very handy little PHP switcher script. We hard-coded Apache to use PHP 5.6, but we really want to be able to switch between versions. Restart apache $ sudo apachectl -k restart Servername is disabled by default, set it to localhost: #ServerName ServerName localhost DirectoryIndex index.php index.htmlįind Listen 8080 and change it: Listen 80 Include /usr/local/etc/httpd/extra/nfĬheck DirectoryIndex includes index.php. LoadModule vhost_alias_module lib/httpd/modules/mod_vhost_alias.so LoadModule userdir_module lib/httpd/modules/mod_userdir.so LoadModule ssl_module lib/httpd/modules/mod_ssl.so LoadModule socache_shmcb_module lib/httpd/modules/mod_socache_shmcb.so LoadModule rewrite_module lib/httpd/modules/mod_rewrite.so Modify the paths as follows,Ĭomment out all but one entry: #LoadModule php5_module php7_module /usr/local/etc/httpd/nf and uncomment these lines. You will again need to edit the /usr/local/etc/httpd/nf. You have successfully installed your PHP versions, but we need to tell Apache to use them. PHP Installation $ brew install brew unlink brew install php.ini file can be found in: /usr/local/etc/php/7.2/php.ini. You can watch the Apache error log in a new Terminal tab/window during a restart to see if anything is invalid or causing a problem: $ tail -f /usr/local/var/log/httpd/error_log Start Apache, open browser with and you should see a message saying “It works!” $ sudo apachectl -k start Instead we'll brew and configure it to run on standard ports (80/443). We don't want to use the pre-installed Apache. $ sudo launchctl unload /System/Library/LaunchDaemons/ 2>/dev/null MacOS comes with Apache pre-installed, stop it and prevent it from starting on boot. $ brew doctorĪdd the Homebrew taps we need. Let's see if everything works the way it should. MacOS High Sierra Setup: Homebrew + Apache + PHP + MariaDB + SSL Homebrew Installationįirst let's install Homebrew.