Exactly how depends on several things ( mainly what your system setup is …
If you’re running Apache 2.4 on a Debian-based OS with version 1.0+ of the libaugeas0 package available, you can use the Apache plugin. This automates both obtaining and installing certs on an Apache webserver. To specify this plugin on the command line, simply include --apache.
if you’re running Nginx you can use this plugin to automatically obtain and install your certificate.
You can use the --manual and certonly tags ( along with the -d )
There are also numerous other clients and ways of doing it ( List of Client Implementations ). If you can give us some information about which client you are using, what your OS is, and the command you have already used to generate your first certificate we will be able to help better.