MAC - letronghieu4897/magento GitHub Wiki

MAC

MAC

  • 1. XAMPP
  • 2. Install NVM
  • 3. MAMP
    • 3.1 Connect database of MAMP
    • 3.2 Change PHP version
  • 4. Setup Server On Mac

1.XAMPP

1. Change in : xampp > conf > extra > httpd-vhosts.conf
2. Change in conf > httpd.conf : DirectoryRoot.

2.Install NVM

brew update
brew install
mkdir ~/.nvm
vim ~/.bash_profile

add : 
export NVM_DIR=~/.nvm
source $(brew --prefix nvm)/nvm.sh

source ~/.bash_profile
echo $NVM_DIR

nvm install v10.7.0

2.MAMP

3.1 Connect database of MAMP


echo $PATH
~
ls -alh
cat .bash_profile
cp .bash_profile .bash_profile_backup
locate mysql | less
echo 'export
PATH=$PATH:/Applications/MAMP/Library/bin' >> ~/.bash_profile
source ~/.bash_profile
echo $PATH
mysql -u root -p root

3.2 Change PHP version

1. Open MAMP > Preference > PHP > choose php version

2. vim ~/.bash_profile. Adding
 export PATH=/Applications/MAMP/bin/php/php<version chosen above>/bin:$PATH

3. source ~/.bash_profile

4. Setup Server On Mac

1. Install php 7.2 https://vyspiansky.github.io/2018/11/08/set-up-php-7.2-on-macos-mojave-with-homebrew/

NOTE

/usr/local/etc/php/7.2/

/usr/local/etc/nginx/

/usr/local/var/log/nginx/

brew services start php

sudo -s nginx reload