yum -y install openssl mod_ssl
秘密鍵の設定
# cd /etc/httpd/conf # openssl genrsa -aes128 1024 >server.key Generating RSA private key, 1024 bit long modulus ........++++++ .....++++++ e is 65537 (0x10001) Enter pass phrase: ←パスフレーズ入力 Verifying - Enter pass phrase: ←同じパスフレーズを入力 公開鍵ファイルの作成 # openssl req -new -key server.key > server.csr 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) [XX]:JP State or Province Name (full name) []:Tokyo Locality Name (eg, city) [Default City]:Minato Organization Name (eg, company) [Default Company Ltd]:examples Organizational Unit Name (eg, section) []:1S Common Name (eg, your name or your server's hostname) []:example.com Email Address []:info@example.com Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: ←そのままEnterでOK An optional company name []: ←そのままEnterでOK
firewallの設定
# firewall-cmd --add-service=https --zone=public --permanent firewallの再起動 # firewall-cmd --reload