We can generate self-signed certificate in Linux using OpenSSL. One issue we may encounter is how to renew that certificate. No issues, this can accomplished using OpenSSL.
openssl x509 -x509toreq -signkey private.key -out newcert.csr -in oldcert.pem
where oldcert.pem is the old certificate. When you run the above command, its data will be imported into the certificate newcert.csr using the current private key private.key