Building OpenVPN 2.5.2 on older CentOS systems
Posted: Sat Jun 12, 2021 10:04 am
I just managed to get OpenVPN to build on an older version of CentOS so I thought it might help to share the instructions in case anyone else is trying to do this.
I have been running an older OpenVPN for some time but it was built against the old openssl that came with CentOS 5.
Some time ago I had built openssl 1.1 and installed it under /usr/local/lib so it wouldn't interfere with the system version but I could build new packages against it.
I recently upgraded my openVPN client and it started warning me about deprecated features in my old OpenVPN server so I started to look at upgrading it. I ran into various issues along the way that I won't go into in a lot of detail but the build method that worked for me in the end was this:
Unpacked the tgz file and cd into the directory.
It's worth mentioning that without the -std=gnu99 I got a compilation error. I tried a few alternatives to the standard c99 and this was the first one I hit that enabled it to compile without errors.
I have been running an older OpenVPN for some time but it was built against the old openssl that came with CentOS 5.
Some time ago I had built openssl 1.1 and installed it under /usr/local/lib so it wouldn't interfere with the system version but I could build new packages against it.
I recently upgraded my openVPN client and it started warning me about deprecated features in my old OpenVPN server so I started to look at upgrading it. I ran into various issues along the way that I won't go into in a lot of detail but the build method that worked for me in the end was this:
Unpacked the tgz file and cd into the directory.
Code: Select all
CFLAGS="-I/usr/local/include -Wl,-rpath=/usr/local/lib -L/usr/local/lib -std=gnu99" ./configure --disable-lzo --disable-plugin-auth-pam
make
make install