首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ElasticBeanstalk -改变java.security?

ElasticBeanstalk -改变java.security?
EN

Stack Overflow用户
提问于 2019-06-20 23:07:50
回答 1查看 124关注 0票数 1

我想在我的Elastic Beanstalk实例上更改$JAVA_HOME/jre/lib/security/java.security中的securerandom.source值。

我如何通过.ebextensions做到这一点呢?或者是另一种方式呢?

EN

回答 1

Stack Overflow用户

发布于 2019-08-20 18:20:59

$JAVA_HOME/jre/lib/security/java.security文件的开头,有一段话说

代码语言:javascript
复制
# This is the "master security properties file".
#
# An alternate java.security properties file may be specified
# from the command line via the system property
#
#    -Djava.security.properties=<URL>
#
# This properties file appends to the master security properties file.
# If both properties files specify values for the same key, the value
# from the command-line properties file is selected, as it is the last
# one loaded.

因此,您可以在.ebextensions文件夹下创建包含以下内容的java-security.config文件:

代码语言:javascript
复制
# Create a file named java-security under /usr/share/tomcat8/conf to override the default value of securerandom.source
files: 
  "/usr/share/tomcat8/conf/java-security" :
    mode: "000755"
    owner: tomcat
    group: tomcat
    content: |
      securerandom.source=<the file you want for securerandom.source>

然后转到弹性豆茎环境

->配置

->软件

->环境属性

->键入java.security.properties作为名称,键入/usr/share/tomcat8/conf/java-security作为值。

然后重新启动tomcat。您的securerandom.source应该更改为您想要的值。

要记住的一件事是,用户tomcat必须具有读取/usr/share/tomcat8/conf/java-security文件的权限。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56688927

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档