$ openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr
Generating a 2048 bit RSA private key
.....................................................................+++
................................................................+++
writing new private key to 'server.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [GB]:JP
State or Province Name (full name) [Berkshire]:Saitama(都道府県を英字で入力)
Locality Name (eg, city) [Newbury]:Saitama-shi(市区町村を英字で入力)
Organization Name (eg, company) [My Company Ltd]:Slogical Corporation(組織名を英字で入力)
Organizational Unit Name (eg, section) []:System Team(部署名を英字で入力)
Common Name (eg, your name or your server's hostname) []:www.slogical.co.jp(コモンネームを英字で入力)
Email Address []:(空白、エンターのみ入力)
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:(空白、エンターのみ入力)
An optional company name []:(空白、エンターのみ入力)
$
$ openssl genrsa -des3 2048 > server.key
Generating RSA private key, 2048 bit long modulus
.......+++
...........................................................+++
e is 65537 (0x10001)
Enter pass phrase:(パスフレーズ入力)
Verifying - Enter pass phrase:(パスフレーズ入力)
$
$ openssl req -new -key server.key -out server.csr -sha256
Enter pass phrase for server.key:(パスフレーズ入力)
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [GB]:JP
State or Province Name (full name) [Berkshire]:Saitama(都道府県を英字で入力)
Locality Name (eg, city) [Newbury]:Saitama-shi(市区町村を英字で入力)
Organization Name (eg, company) [My Company Ltd]:Slogical Corporation(組織名を英字で入力)
Organizational Unit Name (eg, section) []:System Team(部署名を英字で入力)
Common Name (eg, your name or your server's hostname) []:www.slogical.co.jp(コモンネームを英字で入力)
Email Address []:(空白、エンターのみ入力)
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:(空白、エンターのみ入力)
An optional company name []:(空白、エンターのみ入力)
$