You can generate CSR using OpenSSL:
openssl req -newkey rsa:2048 -keyout private_key.pem -out server.csr
where req is a command to control x.509 certificates,
-newkey — means “we need a new key”
_rsa_ — hashing algorythm, and 2048 — the length of a key. To sign certificates after 2010 you need at least this length! Until 2010 it was possible to use 1024 bit key.
-keyout — path to the file on the server
-out — path to the certificate’s request file (crs)