Easy-rsa is a small useful tool for building and managing of the Public Key Infrastructure, which means creating a root certificate authority, and request and sign certificates, including sub-CAs and certificate revocation lists (CRL).
step.1. install the package
yum -y install easy-rsa
step.2. go to dir and clear all
cd /usr/share/easy-rsa/3.0.3/ ./easyrsa clean-all
step.3. from easy-rsa dir init pki
./easyrsa init-pki
step.4. generate ca.crt and ca.key
./easyrsa build-ca
step.5. generate the master key for server
./easyrsa build-server-full myServer
step.6. generate Diffie Hellman parameters
./easyrsa gen-dh
step.7. generate certificates for all clients
./easyrsa build-client-full client1