How to install cakephp on mac
#Procedure disclosure (Memorandum)
Install MAMP on ##1.mac
##2.Pass PATH to MAMP php (PATH from php in mac to MAMP php in terminal)
At the terminal
macbook:~ user$ which php
When you execute, you should see (/usr/bin/php) because you can see the current status. When I checked, it seems that this php is the php originally included in mac, and it seems to be useless as it is.
In this case, since PATH is not in MAMP php, At the terminal
macbook:~ user$ .bash_profile
To execute the vim operation.
##3. With Vim, pass PATH to MAMP php
Switch to insert mode on the Vim screen
export PATH=/Applications/MAMP/bin/php/php? .? .? /bin:$PATH
Run. Select the php version for /php?.?.?/. Exit the insert mode, save and exit the Vim screen.
- Check Vim command operation in advance. (Switching insert mode, exiting Vim screen, saving, etc. Easy.)
Then return to the terminal
% source ~/.bash_profile
To reflect the Vim settings. At the terminal
macbook:~ user$ which php
Run
/Applications/MAMP/bin/php/php?.?.?/bin/php
It is OK if is displayed.
Install ##4.composer At the terminal
macbook:~ user$ curl -sS https://getcomposer.org/installer | php
Run. after installing composer
macbook:~ user$ composer -v
If you can check the version of composer by executing.
After that, move “composer.phar” to the folder specified in PATH.
Install ##5.cakephp To the folder you want to install
macbook:~ user$ cd installation folder (in my case MAMP htdocs)
Move
macbook:~ htdocs $ php composer.phar create-project --prefer-dist cake php/app version specification folder name
If you can install it without any problems, you are finished.
This is my first article, so it’s for myself, but I’m sorry if there are any mistakes.