Servers & Services Nginx. The Nginx web server has recently gained more and more popularity. And in order to be able to provide you with an optimal development environment, with which you come as close as possible to the requirements of most providers, MAMP PRO of course also provides this web server. Redis as preferred in-memory database/store (great for caching) The main reason we have chosen Kubernetes over Docker Swarm is related to the following artifacts: Key features: Easy and flexible installation, Clear dashboard, Great scaling operations, Monitoring is an integral part, Great load balancing concepts, Monitors the condition.
- Laravel 5 database config with unixsocket for MAMP - database.php. Redis is an open source, fast, and advanced key-value store that also.
- Forked from panxianhai/php-redis-mamp. Watch 2 Star 4 Fork 16 Code. Pull requests 0. Security Insights Dismiss Join GitHub today. GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
- Dismiss Join GitHub today. GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Posted on by
Like it or not, MAMP is an excellent tool for local development. If you work on multiple sites or projects at the same time across different frameworks and or CMS’s then MAMP will make your life simple. This MAMP development setup is what I have used for years while working on many freelance projects, personal projects, and obviously the day to day work projects.
In my opinion, things like Vagrant and Docker have their place but tend to overcomplicate and slow down local development. If you like Vagrant and Docker then keep at it. But consider being responsible for 40 different sites, all with various changes and updated. Good luck!
Some MAMP pros include all local sites being accessible at the same time, simple MySQL administration with PHP MyAdmin or Sequal Pro.
But some of the negatives can come once you have made changes to various config files and then go to update MAMP or add newer versions of PHP. Sometimes your configs will break, and MAMP is not set up like your Ubuntu VPS, things are not in the same locations. Most Unix commands won’t work ( Thanks, Apple ).
But as you become more and more familiar with MAMP it’s not all that bad. In fact, I think it’s the best option going.
Install MAMP 4:
Download:
Set up your document root.
Set the Web Server to Apache
Set the Document Root to
Set the Document Root to
~/Sites
Or where ever you keep your PHP projects.Setup your VirtualHosts
Open and edit
/Applications/MAMP/conf/apache/httpd.conf
Search for DocumentRoot Change the path to /Users/yourusername/Sites
Look for
# Virtual hosts
and uncomment the line ( delete the # )Create an entry in
/Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
Enable PHP 7
Install Memcached:
$ brew install memcached
Launch Memcached when the computer starts.
$ ln -sfv /usr/local/opt/memcached/*.plist ~/Library/LaunchAgents
Enable Memcached with PHP.
Open
/Applications/MAMP/bin/php/php7.0.12/conf/php.ini
Look for
; Extensions
and uncomment extension=memcached.so
Install Redis (Optional):
$ brew install redis
Launch Redis on computer starts.
$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
Start Redis server via “launchctl”.
$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
Test if Redis server is running.
$ redis-cli ping
If it replies “PONG”, then it’s good to go!
Start Redis server using a configuration file.
$ redis-server /usr/local/etc/redis.conf
![Mamp Redis Mamp Redis](https://mk0alessioangelde4kt.kinstacdn.com/wp-content/uploads/2014/04/download_imporbuddy.jpg)
Stop Redis on autostart on computer start.
$ launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
Location of Redis configuration file.
/usr/local/etc/redis.conf
Uninstall Redis and its files.
Get Redis package information.
$ brew info redis
Setup MAMP 4:
Configure PHP
Open
/Applications/MAMP/bin/php/php7.0.12/conf/php.ini
Mamp Display Errors
Enable short tags
While WordPress coding standards won’t allow short tags to be enabled… Who really has time for that.
While WordPress coding standards won’t allow short tags to be enabled… Who really has time for that.
Download the Reis extension:
Copy redis.so from the appropriate subdirectory of this repo to
/Applications/MAMP/bin/php/php5.x.x/lib/php/extensions/no-debug-non-zts-200xxxxx
(Change to your PHP version)Look for
; Extensions
and Enable Memcached and Redis extensions.Enable Xdebug at the bottom of the file by Deleting the
;
. It should already be there but will be commented out.Projected 2024 Electoral Map Redistricting
Configure your local DNS (Optional)
The Mac OS hosts file will not allow us to use wildcard subdomains, To get around this we can use a local DNS Proxy called DNSMasq.
brew install dnsmasq
The configuration is stored in
dnsmasq.conf
under /usr/local/etc/
.Inside add the following line.
This will tell any request coming in at *.dev to use our local IP.
127.0.0.1
.Load DNSMasq at start
Start and Stop
We now need to configure our mac OS to use the new local DNS server.
To do this, Go to System Preferences and then Network. For DNS configuration add your local IP 127.0.0.1 first followed by your usual DNS IP addresses:
Map Residence
To confirm that this is working, ping a local .local site.
Every now and then I come back to this article to get things set up for myself or co-workers. Since writing this MAMP 5 has come out and there are some small updates. You can read more about them here