You could take a look at XAMPP. It has a version for Mac.
https://www.apachefriends.org/index.html
You can see another post of mine here where I discuss modifying the hosts file and adding a Virtual Host to mimic a real production server for your Wordpress development.
https://wordpress.org/support/topic/packets-out-of-order-error-driving-me-crazy?replies=13