Azkaban-安装部署(二)生成密匙库+同步时间配置

Posted on 2020-04-20 17:30  MissRong  阅读(558)  评论(0编辑  收藏  举报

一、生成密钥库

Keytool是java数据证书的管理工具,使用户能够管理自己的公/私钥对及相关证书。

-keystore    指定密钥库的名称及位置(产生的各类信息将不在.keystore文件中)

-genkey      在用户主目录中创建一个默认文件".keystore"

-alias  对我们生成的.keystore 进行指认别名;如果没有默认是mykey

-keyalg  指定密钥的算法 RSA/DSA 默认是DSA

1)生成 keystore的密码及相应信息的密钥库

[itstar@bigdata111 azkaban]$ keytool -keystore keystore -alias jetty -genkey -keyalg RSA

输入密钥库口令:  000000

再次输入新口令:  000000

您的名字与姓氏是什么?

  [Unknown]:  回车即可(下同)

您的组织单位名称是什么?

  [Unknown]:  

您的组织名称是什么?

  [Unknown]:  

您所在的城市或区域名称是什么?

  [Unknown]:  

您所在的省/市/自治区名称是什么?

  [Unknown]:  

该单位的双字母国家/地区代码是什么?

  [Unknown]:  

CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown是否正确?

  [否]:  y

输入 <jetty> 的密钥口令    000000

        (如果和密钥库口令相同, 按回车):  

再次输入新口令:            000000

注意:

密钥库的密码至少必须6个字符,可以是纯数字或者字母或者数字和字母的组合等等

密钥库的密码最好和<jetty> 的密钥相同,方便记忆

2)将keystore 拷贝到 azkaban web服务器根目录中

[itstar@bigdata111 azkaban]$ mv keystore /opt/module/azkaban/server/

二、时间同步配置

 

 

 

 1.先配置好服务器节点上的时区

如果在/usr/share/zoneinfo/这个目录下不存在时区配置文件Asia/Shanghai,就要用 tzselect 生成。

[itstar@bigdata111 azkaban]$ tzselect

Please identify a location so that time zone rules can be set correctly.

Please select a continent or ocean.

 1) Africa

 2) Americas

 3) Antarctica

 4) Arctic Ocean

 5) Asia

 6) Atlantic Ocean

 7) Australia

 8) Europe

 9) Indian Ocean

10) Pacific Ocean

11) none - I want to specify the time zone using the Posix TZ format.

#? 5

Please select a country.

 1) Afghanistan           18) Israel                35) Palestine

 2) Armenia               19) Japan                 36) Philippines

 3) Azerbaijan            20) Jordan                37) Qatar

 4) Bahrain               21) Kazakhstan            38) Russia

 5) Bangladesh            22) Korea (North)         39) Saudi Arabia

 6) Bhutan                23) Korea (South)         40) Singapore

 7) Brunei                24) Kuwait                41) Sri Lanka

 8) Cambodia              25) Kyrgyzstan            42) Syria

 9) China                 26) Laos                  43) Taiwan

10) Cyprus                27) Lebanon               44) Tajikistan

11) East Timor            28) Macau                 45) Thailand

12) Georgia               29) Malaysia              46) Turkmenistan

13) Hong Kong             30) Mongolia              47) United Arab Emirates

14) India                 31) Myanmar (Burma)       48) Uzbekistan

15) Indonesia             32) Nepal                 49) Vietnam

16) Iran                  33) Oman                  50) Yemen

17) Iraq                  34) Pakistan

#? 9

Please select one of the following time zone regions.

1) Beijing Time

2) Xinjiang Time

#? 1

 

The following information has been given:

 

        China

        Beijing Time

 

Therefore TZ='Asia/Shanghai' will be used.

Local time is now:      Thu Oct 18 16:24:23 CST 2018.

Universal Time is now:  Thu Oct 18 08:24:23 UTC 2018.

Is the above information OK?

1) Yes

2) No

#? 1

 

You can make this change permanent for yourself by appending the line

        TZ='Asia/Shanghai'; export TZ

to the file '.profile' in your home directory; then log out and log in again.

 

Here is that TZ value again, this time on standard output so that you

can use the /usr/bin/tzselect command in shell scripts:

Asia/Shanghai

2.拷贝该时区文件,覆盖系统本地时区配置

[itstar@bigdata111 azkaban]$ cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime  

3.集群时间同步(同时发给三个窗口)

[itstar@bigdata111 azkaban]$ sudo date -s '2019-05-20 20:39:30'

*************************************************************************************************

4.我用的是这种:

或者,如果之前安装CentOS的时候匹配上了Shanghai的那个本地时间的话,直接三台机器同步执行下面的命令:

1)yum -y install ntp ntpdate  安装ntpdate工具

2)ntpdate cn.pool.ntp.org   设置系统时间与网络时间同步

3)date 再查看时间

4)hwclock --systohc 映射到系统时间里

Copyright © 2024 MissRong
Powered by .NET 8.0 on Kubernetes