
Installing HAProxy in MacOs BigSur
HAProxy is one of the famous open-source application used for load balancing and proxy. I use it mainly as a proxy in my local development environment.
Method 1:
We can install haproxy in MacOs using homebrew. Just run the command :
brew install haproxy
However after the recent BigSur update(mid May 2021), the haproxy installed via this method was not working properly. So I had to find an alternative method. This is much more lengthy and manual.
Method 2:
- Download your desired haproxy version from here.
- Remove existing haproxy in brew using command
brew uninstall haproxy
- Extract folder and
cd
into the folder - Run
make clean
- Run
make -j6 TARGET=osx USE_KQUEUE=1 USE_POLL=1 USE_PCRE=1 USE_THREAD=1 USE_OPENSSL=1 USE_ZLIB=1 SSL_LIB=/usr/local/opt/openssl/lib SSL_INC=/usr/local/opt/openssl/include ADDLIB=-lcrypto
- Check by typing
./haproxy
- Run
sudo make install
- Run
sudo ln -s /usr/local/sbin/haproxy /usr/local/bin/haproxy
- Run
haproxy
and check if everything is successfull