This little script will let you create an SSL CSR and key in one command. Be sure to change the C (country), ST (state), and L (locality) variables to fit your needs.
Call the script with the domain name you want to generate:
$ ssl.sh www.domain.com
You could self-sign the CSR if you'd like as well:
$ openssl x509 -req -days 365 -in www.domain.com.csr -signkey www.domain.com.key -out www.domain.com.crt