How to install OpenVPN 2.1.x on CentOS 5 using RPM’s

1. Download and compile pkcs11-helper

Download from http://www.opensc-project.org/

wget http://www.opensc-project.org/files/pkcs11-helper/pkcs11-helper-1.07.tar.bz2

Compile:

rpmbuild -tb pkcs11-helper-1.07.tar.bz2

Install:

rpm -ivh /usr/src/redhat/RPMS/i386/pkcs11-helper-1.07-2rh.i386.rpm /usr/src/redhat/RPMS/i386/pkcs11-helper-devel-1.07-2rh.i386.rpm

OpenVPN 2.1

Download: http://openvpn.net/index.php/downloads.html

Compile:

Note: You need to untar the source, copy the openvpn.spec to /usr/src/redhat/SPECS Then copy the original file to /usr/src/redhat/SOURCES Edit the openvpn.spec and delete the management string from it, then compile.

rpmbuild -bb openvpn.spec

Install:

rpm -ivh /usr/src/redhat/RPMS/i386/openvpn-2.1_rc15-1.i386.rpm

Install lzo from rpmforge:

yum –enablerepo=rpmforge -y install lzo-devel

More info on using rpmforge on Centos/RHEL here: http://dag.wieers.com/rpm/FAQ.php#B1