在OpManager中启用SSL

 

对于OpManager 8050及以上版本启用SSL的步骤
在8050版本,OpManager移除了Apache。请参阅以下步骤来启用SSL:

  1. 打开命令行:(运行 -> cmd)更改目录到/opmanager/bin
  2. 执行以下命令
    ssl_gen.bat -f Enable
现在你已成功在OpManager上启用自签SSL认证,你可以使用https://来连接到OpManager客户端。

禁用SSL:
  1. 打开命令行(运行 -> cmd)更改目录到/opmanager/bin
  2. 执行以下命令
    ssl_gen.bat -f Disable
这将会禁用OpManager的SSL认证,客户端将不能使用http://来登录。

在OpManager 8050以前版本上启用SSL
  1. 停止OpManager服务
  2. 确保服务窗口已关闭
  3. 打开命令行,更改目录到\opmanager\bin
  4. 执行脚本OpManagerService.bat -r项:

    OpManagerService.bat -r

    这将会完全移除服务

  5. 重命名\opmanager下的文件夹apacheapache-old
  6. 点击这里下载启用SSL的Apache。
  7. 解压此文件到OpManager根目录下,完成后会出现一个新的apache文件夹。
  8. 打开命令行,更改到/opmanager/bin目录下,执行脚本ssl_gen.bat 创建SSL证书。
  9. 现在执行脚本OpManagerService.bat,添加-i作为执行选项,将OpManager服务重新注册,运行如下所示:

    OpManagerService.bat -i

    这将为OpManager重新添加服务。
  10. 重启OpManager服务并访问链接:https://<opmanager host name or IP address>:<port number>。例如如果主机名称为OpM-Server且使用端口为80,你可以访问如下链接:

    https://OpM-Server:80

Web客户端SSL链接启用成功。

启用NetFlow插件的SSL
如果你安装了NetFLow插件,请参阅下面的步骤:
  1. 请确认OpManager已经启用了SSL
  2. 停止OpManager服务
  3. 下载NetFlow_ssl.zip 并将其解压到 \opmanager文件夹下
  4. 运行\opmanager\NetFlow\bin文件夹下的ssl_gen.bat脚本
  5. 这将会在\opmanager\NetFlow\server\default\conf\ssl文件夹下创建NetFlow.truststore和server.keystore
  6. 启动OpManager服务
NetFlow插件启动SSL成功

在OpManager中启用第三方SSL
  1. 打开命令行(运行 -> cmd)更改目录到/opmanager/bin
  2. 生成一个Keystore文件 执行以下命令并提供要求的明细,在conf文件夹下创建OpManager.truststore文件

    >jre\bin\keytool.exe -v -genkey -keyalg RSA -keystore conf\OpManager.truststore -alias opmanager (按Enter键)
    Enter keystore password:(为这个keystore文件创建密码,需要至少6个字符,并按Enter键)
    What is your first and last name?
    [Unknown]: (输入运行OpManager服务器的名称,这里必须是包含域名的全称,如opmserver.manageengine.com,按Enter键)
    What is the name of your organizational unit?
    [Unknown]: (你的组织单位名称,如SYSADMIN,按Enter键)
    What is the name of your organization?
    [Unknown]: (你的组织名称,如Zoho Corp,按Enter键)
    What is the name of your City or Locality?
    [Unknown]: (你的城市名称,如Pleasanton,按Enter键)
    What is the name of your State or Province?
    [Unknown]: (你的州/省名称,如California,按Enter键)
    What is the two-letter country code for this unit?
    [Unknown]: (你的国家编号,如US,按Enter键)
    Is CN=opmserver.manageengine.com, OU=SYSADMIN, O=Zoho Corp, L=Pleasanton, ST=California, C=US correct?
    [no]: (监视明细是否正确为,是请输入yes并按Enter键,如果不是则直接按Enter键进行修改)
    Generating 1,024 bit RSA key pair and self-signed certificate (MD5WithRSA)
    for CN=opmserver.manageengine.com, OU=SYSADMIN, O=Zoho Corp, L=Pleasanton, ST=California, C=US
    Enter key password for <opmanager>
    (RETURN if same as keystore password): (直接按Enter键,对于tomcat,keystore密码和key[别名]密码必须一样)
    [Storing conf\OpManager.truststore]
  3. Generating CSR File (认证签名请求),执行以下命令在conf文件夹下创建opmssl.csr文件:
    >jre\bin\keytool.exe -v -certreq -file conf\opmssl.csr -keystore conf\OpManager.truststore -alias opmanager
    Enter keystore password: (输入keystore文件的密码)
    Certification request stored in file <conf\opmssl.csr>
    将其提交到你的证书中心
  4. 从证书中心(Certification Authority)获取证书
    使用上一步生成的csr文件联系一个证书中心,如Verisign、Equifax,来生成ssl证书。一般情况下,你需要将csr文件的内容复制并粘贴到他们网站上对应的文本框中,在接受了你的请求后,他们会通过邮件向你发送证书内容,复制证书内容到一个文本编辑器,保存为“ServerCert.cer”并将其放置在OpManager_Home\conf文件夹下,需要注意,在复制和粘贴的时候,不要在行末出现多余的空白字符。
  5. 导入根和中间媒介证书
    在导入我们的证书之前,我们还要将证书中心的根和中间媒介证书导入到第二步生成的keystore文件中,在发给你的证书邮件中包含证书中心的根和中间媒介证书链接。将它们使用名称“CARoot.cer”和“CAIntermediate.cer”保存到conf目录下,一些证书中心可能会有两个或更多的中间媒介证书,请在导入之前参阅他们的说明文档。

    导入根证书:
    >jre\bin\keytool.exe -import -trustcacerts -file conf\CARoot.cer -keystore conf\OpManager.truststore -alias CARootCert
    Enter keystore password: (输入keystore密码)
    (根证书的信息将会打印出来)
    Trust this certificate? [no]: (如果证书正确,输入yes并按Enter键)
    Certificate was added to keystore

    导入中间媒介证书:
    >jre\bin\keytool.exe -import -trustcacerts -file conf\CAIntermediate.cer -keystore conf\OpManager.truststore -alias CAInterCert
    Enter keystore password: (输入keystore密码)
    Certificate was added to keystore

  6. 导入服务器的证书
    执行以下命令将从证书中心接收到的证书添加到keystore文件
    >jre\bin\keytool.exe -import -trustcacerts -file conf\ServerCert.cer -keystore conf\OpManager.truststore -alias opmanager
    Enter keystore password: (输入keystore密码)
    Certificate reply was installed in keystore
  7. 配置Tomcat
    1. 使用文本编辑器打开“sl_server.xml”文件(位于OpManager_Home\tomcat\conf\backup目录下)
    2. 搜索“keystoreFile”,它是连接器的一个属性,将它的值设置为
      “WEBNMS_ROOT_DIR/conf/OpManager.truststore”
    3. 修改“keystorePass”参数的值
      修改为你设置的keystore文件的密码
  8. 修改conf文件
    1. 使用文本编辑器打开“OpManagerStartUp.properties”文件(位于OpManager_Home\conf目录下)
    2. 设置参数“https”值为“Enable”
  9. 启动OpManager服务器,使用https连接客户端。例:https://opmserver.manageengine.com:80
注意:如果你已经有了这个服务器的证书,你可以用它来设置SSL,只要复制-粘贴keystore文件到OpManager_Home\conf目录下,并将其重命名为“OpManager.truststore”,然后从步骤5开始执行即可。



Copyright © 2005-2013, ZOHO Corp.,All Rights Reserved.