When I ran it, I had to add sudo to the start of each line. Hit up this page and you’ll see the following, do it. Installation from here is rather easy, following But first, ComposerĬakePHP uses composer for installation, so we’ll need to install composer first. Then then type the following to confirm the path: This will refresh your terminal windows to use this new profile. This will set the php command to be set to MAMP’s PHP instead of the PHP that came with Mac. bash_profile and add the following line:Įxport PATH =/Applications/MAMP/bin/php/php7.3.7/bin:$PATH In Terminal, go to your home directory, then edit. I came across this lovely blog post which helped. It may be possible to install it all, I trust it is, but this was much easier and faster. The PHP that comes with Mac doesn’t have the necessary extensions installed. If you tried to install CakePHP right now, you’d get a headache, which is what I cried over for a while. Have fun working with Laravel.Continuing in the trend of “not knowing Mac well enough”, it appears Mac OSX Mojave comes with PHP, but a slightly different configured version. You should see the Laravel home page.įantastic Job Done ! You have now installed Laravel with Mamp on Mac OSX. Then it will show you the url where project is running something like, Go to the browser and hit this url. Navigate to the project you just created. Once the Laravel installation is finished, Now it's time to run the Laravel web application. This will start downloading the Laravel software and other required dependencies. Navigate to Applications/MAMP/htdocs folder in terminal & run the following command composer create -project laravel /laravel myProject "5.5.*" In case it doesn't output the correct path, try closing the terminal window (exit fully) and open again, it should apply the changes (Restart in short).Īlright, we are now all setup to install Laravel with MAMP.If everything was successful, It should output the new path to MAMP PHP install In Terminal, type in which php again and look for the updated string.In Terminal, run source ~/.bash_profile.(You can check the latest PHP version available in your MAMP directory (/Applications/MAMP/bin/php) Type i and then paste the following at the top of the file:Įxport PATH=/Applications/MAMP/bin/php/php7.2.8/bin:$PATH.Within the Terminal, run vim ~/.bash_profile.But if not then you either have to upgrade your php version on local mac, Or we can switch local PHP to use our MAMP php version which is greater than 7.1.3 If the version returned by this command is >=7.1.3, then you are good to go. 5.7 requires PHP >=7.1.3, Although the latest MAMP will have the latest PHP, it might be the case that the PHP installed local to your MAC machine is old.Ĭheck by running the following command on terminal. Test it out by command composer -v on terminal. That's it, you now have composer on your MAC. Move the composer to /usr/local/bin/composer mv composer.phar /usr/local/bin/composer If not follow below steps.ĭownload composer installer by this command in terminal curl -sS | php Open your terminal and type out command composer -v, If this gives your the composer version that means you have composer already installed on your machine. Laravel makes use of composer for dependency management, So we need to make sure we have that installed in our system. If the MAMP is installed correctly and the server started without any errors, you should see the following page on accessing localhost in your browser. You should see a MAMP directory created with following contents.Ĭlick on MAMP to start the MAMP Control Panel (Which looks like below image)Ĭlick on Start Servers to Start the MAMP Server. Once the installation is successfully completed, You can now go ahead to start the MAMP. The package will start writing files in your MAC. Go through the installation with all the steps. Click the package to start installing MAMP.Ĭlick on Continue to proceed with Installation. This will download a *.pkg installer on your MAC. Go to MAMP official website and choose to download MAMP for OSX (Mac) MAMP provides them with all the tools they need to run WordPress on their desktop PC for testing or development purposes. MAMP is a free, local server environment that can be installed under macOS and Windows with just a few clicks. The first step is to make sure you have MAMP installed on your Mac. In this tutorial we will go over step by step on How to Install Laravel with MAMP on Mac OSX.
0 Comments
Leave a Reply. |