Yes, we know Centos 6 is very old now, but we had a requirement to use an old Centos 6 server for wiregaurd. Here is a quick way to get you up and running on an existing Centos 6 server. Note the wireguard-tools does not match the exact Wireguard version here but it still works as required (for wg-quick etc.)
This install requires a newer kernel so note this is the first part to get out of the way:
wget https://linux.cc.iitk.ac.in/mirror/centos/elrepo/kernel/el6/x86_64/RPMS/...
wget https://linux.cc.iitk.ac.in/mirror/centos/elrepo/kernel/el6/x86_64/RPMS/...
wget https://www.elrepo.org/elrepo-release-6-9.el6.elrepo.noarch.rpm
yum install kernel-lt* elrepo-release*
yum install git patch gcc
yum install https://dl.fedoraproject.org/pub/archive/epel/6/x86_64/Packages/d/dkms-2...
curl -Lo /etc/yum.repos.d/wireguard.repo https://copr.fedorainfracloud.org/coprs/jdoss/wireguard/repo/epel-7/jdos...
yum install wireguard-dkms
cd /usr/src/wireguard-0.0.20190702/
wget https://github.com/Intika-Linux-Wireguard/Wireguard-Centos-6/raw/master/...
patch < quick.patch
vim /boot/grub/grub.conf and change default=0
reboot
dkms build -m wireguard -v 1.0.20220627
dkms install -m wireguard -v 1.0.20220627
yum install libmnl-devel
cd /usr/src/
wget https://git.zx2c4.com/wireguard-tools/snapshot/wireguard-tools-1.0.20210...
cd wireguard-tools-1.0.20210914
make && make install
now you can go ahead and setup your Wireguard VPN as normal :)