how to generate the root CA.pem in mongodb for configuring the ssl certificates?
how to generate the root CA.pem in mongodb for configuring the ssl
  certificates?


As per MongoDB documentation here The procedure creates both the CA PEM file and an intermediate authority certificate and key files to sign server/client test certificates.


  TESTING PURPOSES ONLY:  This will provides some guidelines for creating test x.509 certificates:
  
  
  Do not use these certificates for production. Instead, follow your    security policies.
  For information on OpenSSL, refer to the official OpenSSL docs.    Although this tutorial uses OpenSSL, the material should not be taken 
  as an authoritative reference on OpenSSL.
  


for further your ref here