Mac Dev Server - haiquang9994/dev_env GitHub Wiki
Install Brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Install git + bash-completion
brew install git bash-completion
Install nginx
brew install nginx
brew services start nginx
/usr/local/etc/nginx/php_params
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
/usr/local/etc/nginx/php73_params
include php_params;
fastcgi_pass 127.0.0.1:9000;
/usr/local/etc/nginx/nginx.conf
include /Users/light/Developer/vhosts/*.conf;
Bug upload image 500 /usr/local/etc/nginx/nginx.conf
client_max_body_size 100M;
client_body_temp_path /Users/light/Developer/tmp;
include /Users/light/Developer/vhosts/*.conf;
brew install [email protected]
brew link [email protected]
brew services start [email protected]
Install php-redis
export PATH="/usr/local/Cellar/[email protected]/7.3.17_1/bin:$PATH"
pecl install redis
Install Redis
brew install redis
brew services start redis
Install Mysql
brew install [email protected]
brew services start [email protected]
Install dnsmasq
brew install dnsmasq &&
echo 'address=/.lc/127.0.0.1' >> /usr/local/etc/dnsmasq.conf &&
echo 'port=53' >> /usr/local/etc/dnsmasq.conf &&
sudo mkdir -v /etc/resolver &&
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/lc' &&
sudo brew services start dnsmasq