With autofs you can easily mount network volumes upon first access to the folder where you want to mount the volume. Autofs is available for many OS and is preinstalled on Mac OS X so I show you how I mounted my iTunes library folder using this method.
autofs needs to be configured so that it knows where to gets its configuration. Edit the file /etc/auto_master
and add the last line:
#
# Automounter master map
#
+auto_master # Use directory service
Update! This tutorial is outdated. Nowadays brew installes m1 binaries just fine. Also use valet: https://laravel.com/docs/9.x/valet. It's 10x easier.
In this tutorial, we'll build the the nescessary packages for ARM via homebrew. After that we'll configure apache2 for using virtual hosts. The native php is ofcourse way faster, see the results of this benchmark below.
TEST NAME | SECONDS | OP/SEC |
---|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
# SSH keys setup with Apple keychain | |
### | |
if [ -z "$SSH_AUTH_SOCK" ] && [ -z "$SSH_AGENT_PID" ]; then | |
# If no SSH Agent is running, start one and load keys from Apple keychain | |
eval `ssh-agent -s` &> /dev/null | |
ssh-add --apple-load-keychain &> /dev/null | |
else | |
if [ -z "$(ssh-add -l | grep SHA256)" ]; then | |
# If agent is running but has no keys, load keys from Apple keychain |