Open your terminal app and run: $ brew services start mysqlĬomplete the mysql_secure_installation the default pass is empty for root, follow instructions (should be able to just hit enter for each prompt). If it doesn’t work right away, try turning WiFi off and on (or unplug/plug your ethernet cable), or reboot your system. The results should return from the IP address 127.0.0.1. To test the dnsmasq setup, open your terminal app and run: $ ping -c 3 fakedomainthatisntreal.localhost $ sudo bash -c 'echo "port 35353" > /etc/resolver/dev' $ sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/dev' Open your terminal app and run: $ echo 'address=/.dev/127.0.0.1' > $(brew -prefix)/etc/nf Open your terminal app and run: $ mkdir ~/Sites Open your terminal app and run: $ brew install nginx mysql phpmyadmin dnsmasq Make a dev directory Install Nginx, MySQL, phpMyAdmin, and dnsmasq Open your terminal app and run: $ /bin/bash -c "$(curl -fsSL )"Ģ. If you follow the tutorial and end up with issues, questions, or suggestions for improvement, please leave a comment and I’ll do my best to reply. A localhost LEMP stack tailored to a fresh installation of macOS Monterey in 2022. My previous setup used a vhost file to make each subdirectory in my ~/Sites folder into its own *.localhost domain and I wanted to keep that up. I just want my environment to be fast and work with as many native applications as possible, while also being extremely easy for me to spin up a new dev environment. There’s no SSL (and no plans to enable that at this time). It’s not perfect, but it works for the theme development work I typically do. Just picked up a new M1 MacBook Pro and I decided it was finally time to document my process for getting a working local LEMP environment up and running.
0 Comments
Leave a Reply. |