Can someone please give me exact openssl command(s) to use.
Command parameters can vary, and encryption technology is regulated by national laws. You should consult with your IT security staff on this matter if possible.
What you are probably looking for is “how to self-sign my TLS public key”. Here’s a basic sketch of what this looks like in production:
You as subject have generated for your server a public/private key-pair already with, eg, openssl. Now you need a certificate authority, ca, to sign the public key, rendering your public key certificate. This is achieved by creating a certificate signature request or csr with, eg, openssl, and giving it to ca. Then ca may render the certificate to you for you to distribute how you like. These steps can be achieved by you acting both as subject and ca, by self-signing.
Here’s a possible SO question that might help you: