If you also need PEAR/PECL, follow these instructions. To activate these settings you have to restart Apache: sudo apachectl restart You should also configure a few settings in /etc/php.ini: sudo tee -a /etc/php.ini << EOFĭate.timezone = "`sudo systemsetup -gettimezone | awk ''`" LoadModule php5_module libexec/apache2/libphp5.so So we’ll also add it to our config: sudo tee -a /etc/apache2/other/ $USER nf << EOF LoadModule rewrite_module libexec/apache2/mod_rewrite.so It seems that mod_rewrite no longer gets loaded by default, so we’ll also add that to our config: sudo tee -a /etc/apache2/other/ $USER nf << EOF Include /private/etc/apache2/extra/nfĪfter that, configure vhosts as necessary in /etc/apache2/extra/nf (don’t forget to remove the examples in there). If you want to use vhosts, you’ll also have to make sure that the vhosts config gets loaded: sudo tee -a /etc/apache2/other/ $USER nf << EOF Now we have to make sure that our user config above actually gets loaded: sudo tee -a /etc/apache2/other/ $USER nf << EOF
Options Indexes MultiViews FollowSymLinks Then add a configuration for your user: sudo tee /etc/apache2/users/ $nf Apacheįirst, you have to create a web root in your user account: mkdir ~/Sites
#How to install mysql on mac el capitan for free
You can get MAMP for free here.OS X 10.11 ships with both a recent version of Apache (2.4.x), as well as PHP (5.5.x), so you’ll just have to install MySQL and go through a few steps to get everything up and running. You can either install and configure them manually, or you can go a predefined route through an all-in-one server application, such as MAMP, that includes Apache, MySQL, and PHP applications in a simply manageable application-based web server package. The default Apache server is barebones and does not have PHP, MySQL or anything else particularly cool. If you make changes to the server and just want to restart it, you can do so with the following command: To shut down the web server, return to the command line and type the following: This whole process is pretty fast and can be completed in less than a minute, as the video tutorial below shows: Shutting down the Apache device and restarting the Apache server Using http: // localhost / is also great, and by editing the hosts file you can place the local domain anywhere you want to create a local test environment in an otherwise live domain. You can now also visit to see all the content stored in the user’s ~ / Sites / directory – if there is anything per user – and you can add an index.html file or whatever else you want in the directory to serve it to the outside world or even just a local area network. Note that if you just want to access and edit the ‘localhost’ roots and not the user level Sites at localhost / ~ user, you will find the Apache web server files and ‘It Works!’ html in: Location and user site folders for Apache web server documents Now that you have started a successful Apache server on OS X, you can either edit the kernel ‘localhost’ files or go further with the user files. Start Safari, Chrome or Firefox and go to “” to make sure the server is running, you will see “It works!” message.Next you Start the Apache web server with the following command:.Now press Control + O to save the changes to nf and then press Control + X to exit nano.Edit the directory path USERNAME to the correct username.Settings Directories MultiviewsAllowOverride AuthConfig LimitOrder allow, denyAllow from all In the.
#How to install mysql on mac el capitan password
Enter the administrator password when prompted, and then paste the following into the nanotext editor:.