Hadoop HTTPS configuration

Source: Internet
Author: User

Generate the CA in Hadoop1 and copy to HADOOP2,HADOOP2.

Cd/etc/httpsopenssl req-new-x509-keyout hdfs_ca_key-out hdfs_ca_cert-days 9999-subj '/C=CN/ST=beijing/L=chaoyang/O= Lecloud/ou=dt/cn=jenkin.com ' SCP hdfs_ca_key  hdfs_ca_cert hadoop2:/etc/https/scp hdfs_ca_key  Hdfs_ca_cert hadoop3:/etc/https/

Generate KeyStore on each machine, and trustores

Generate Keystorekeytool-keystore keystore-alias localhost-validity 9999-genkey-keyalg rsa-keysize 2048-dname "CN=${fq DN}, Ou=dt, O=dt, L=cy, ST=BJ, C=CN "//Add CA to Truststorekeytool-keystore truststore-alias caroot-import-file Hdfs_ca_ cert//export from KeyStore certkeytool-certreq-alias Localhost-keystore keystore-file cert//signed with CA to cert OpenSSL x509-re Q-ca hdfs_ca_cert-cakey hdfs_ca_key-in cert-out cert_signed-days 9999-cacreateserial//The cert of the CA and the cert after signing with the CA Import Keystorekeytool-keystore keystore-alias caroot-import-file hdfs_ca_certkeytool-keystore keystore-alias localhost -import-file cert_signed

 

Put the final keystore,trustores into the appropriate directory, and the on-machine suffix

CP KEYSTORE/ETC/HTTPS/KEYSTORE.JKSCP Truststore/etc/https/truststore.jks

Hdfs-site.xml

Datanode and Namenode Hybrid deployment Yes, need https_only <property>                <name>dfs.http.policy</name>                < value>http_and_https</value> <!--namenode Configure-                <!--<value>https_only</ value>--><!--Datanode Configure--></property>

  

Configure Ssl-client.xml

<configuration><property> <name>ssl.client.truststore.location</name> <value>/etc/ Https/truststore.jks</value> <description>truststore to is used by clients like DISTCP.  Must be specified.  </description></property><property> <name>ssl.client.truststore.password</name> <value>adminadmin</value> <description>optional.  Default value is "". </description></property><property> <name>ssl.client.truststore.type</name> < Value>jks</value> <description>optional.  The KeyStore file format, default value is "JKs". </description></property><property> <name>ssl.client.truststore.reload.interval</  name> <value>10000</value> <description>truststore Reload check interval, in milliseconds.  Default value is 10000 (seconds). </description></property><property> <name>ssl.client.keYstore.location</name> <value>/etc/https/keystore.jks</value> <description>keystore to be Used by clients like DISTCP.  Must be specified. </description></property><property> <name>ssl.client.keystore.password</name> < Value>adminadmin</value> <description>optional.  Default value is "".  </description></property><property> <name>ssl.client.keystore.keypassword</name> <value>adminadmin</value> <description>optional.  Default value is "". </description></property><property> <name>ssl.client.keystore.type</name> < Value>jks</value> <description>optional.  The KeyStore file format, default value is "JKs". </description></property></configuration>

 

Ssl-server.xml

<configuration><property> <name>ssl.server.truststore.location</name> <value>/etc/  Https/truststore.jks</value> <description>truststore to is used by NN and DN. Must is specified.  </description></property><property> <name>ssl.server.truststore.password</name> <value>adminadmin</value> <description>optional.  Default value is "". </description></property><property> <name>ssl.server.truststore.type</name> < Value>jks</value> <description>optional.  The KeyStore file format, default value is "JKs". </description></property><property> <name>ssl.server.truststore.reload.interval</  name> <value>10000</value> <description>truststore Reload check interval, in milliseconds.  Default value is 10000 (seconds). </description></property><property> <name>ssl.server.keystore.locaTion</name> <value>/etc/https/keystore.jks</value> <description>keystore to being used by NN and D  N. must be specified. </description></property><property> <name>ssl.server.keystore.password</name> <  Value>adminadmin</value> <description>must be specified.  </description></property><property> <name>ssl.server.keystore.keypassword</name>  <value>adminadmin</value> <description>must be specified. </description></property><property> <name>ssl.server.keystore.type</name> < Value>jks</value> <description>optional.  The KeyStore file format, default value is "JKs". </description></property></configuration>

  

 

  

 

  

Hadoop HTTPS configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.