Posted On March 31, 2019

How to Install HAProxy using PKGSRC

kimconnect 0 comments
blog.KimConnect.com >> Linux >> How to Install HAProxy using PKGSRC
How To use PKGSRC: https://www.netbsd.org/docs/pkgsrc/creating.html

Install dependencies:
yum install epel-release -y
yum groupinstall "Development Tools" -y
yum install vim traceroute nmap bzip2 git wget make gcc perl pcre pcre-devel zlib-devel openssl-devel -y
Bootstrap Package Source (BSD implementation):
su - kimconnect
wget ftp://ftp.netbsd.org/pub/pkgsrc/stable/pkgsrc.tar.gz
mkdir /home/kimconnect/usr
tar -xzvf pkgsrc.tar.gz -C ~/usr
cd /home/kimconnect/usr/pkgsrc && ./bootstrap/bootstrap --unprivileged

Add licensing Acceptances:
sed -i '/\.endif/i ALLOW_VULNERABLE_PACKAGES= yes' /home/kimconnect/pkg/etc/mk.conf
sed -i '/\.endif/i ACCEPTABLE_LICENSES+= oracle-binary-code-license' /home/kimconnect/pkg/etc/mk.conf
sed -i '/\.endif/i ACCEPTABLE_LICENSES+= gnu-agpl-v3' /home/kimconnect/pkg/etc/mk.conf

/home/kimconnect/pkg/sbin/pkg_admin -K /home/kimconnect/pkg/pkgdb fetch-pkg-vulnerabilities
ls ~/usr/pkgsrc/
vim ~/.bash_profile

## Ensure that these lines are present ##
PATH=$PATH:$HOME/.local/bin:$HOME/bin
PATH=$PATH:/home/kimconnect/pkg/sbin
PATH=$PATH:/home/kimconnect/pkg/bin
MANPATH=/home/kimconnect/usr/pkg/man:$MANPATH
export PATH
## -------------------------------- ##

## re-login to realize the change
exit
su - kimconnect

## Perform pkgsrc update prior to any application install
cd /home/kimconnect/usr/pkgsrc && cvs update -dP

## More dependencies
cd /home/kimconnect/usr/pkgsrc/devel/gettext-tools && bmake install clean clean-depends

cd /home/kimconnect/usr/pkgsrc/net/haproxy
mv PLIST.Linux PLIST.Linux.bak

cat << EOF > PLIST.Linux
man/man1/haproxy.1
sbin/haproxy
share/doc/haproxy/architecture.txt
share/doc/haproxy/configuration.txt
share/examples/haproxy/acl-content-sw.cfg
share/examples/haproxy/auth.cfg
share/examples/haproxy/content-sw-sample.cfg
share/examples/haproxy/option-http_proxy.cfg
share/examples/haproxy/ssl.cfg
share/examples/haproxy/transparent_proxy.cfg
share/examples/haproxy/wurfl-example.cfg
EOF

## Install HAProxy
cd /home/kimconnect/usr/pkgsrc/net/haproxy && bmake clean clean-depends && bmake install
bmake package && bmake deinstall && bmake install

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

Redirecting Microphone through Remmina RDP Sessions

Update 11/29/2020: the 'redirect local microphone' option is now simply a check-mark on Remmina version…

VmWare Workstation 6, Linux disk expansion

Run the disk expansion command: "C:\Program Files\VMware\VMware Workstation\vmware-vdiskmanager" -x 60Gb "D:\My Virtual Machines\Centos 5.2 Test3\Red…

How to Install & Configure Pihole on Ubuntu 20.04

1. Installation- Run these commands: # sudo apt-get install gamin -ysudo curl -sSL https://raw.githubusercontent.com/pi-hole/pi-hole/master/automated%20install/basic-install.sh |…