我正在尝试在弹性beantalk环境中运行Java 11。我找到了Java 11 on AWS beanstalk for Spring boot project,看起来像我想要的。
当我像在那个问题中那样创建配置文件时,我得到
错误处理文件(跳过):'。ebextensions / 10_Java.config'-包含无效密钥:'200-download-rpm-package'。有关有效键的信息,请参见http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ebextensions.html
我的yaml文件是上述问题答案中一个文件的副本。
container_commands:
100-remove-old-java-ajb:
command: "sudo yum remove -y java-1.8.0-openjdk-headless"
200-download-rpm-package:
command: "wget https://d3pxv6yz143wms.cloudfront.net/11.0.4.11.1/java-11-amazon-corretto-devel-11.0.4.11-1.x86_64.rpm "
300-install-java-ajb:
command: "sudo yum localinstall -y java-11-amazon-corretto-devel-11.0.4.11-1.x86_64.rpm"
但是当我在链接的文档页面中查看时,关于我可能违反的标签的命名规则一无所获。我怎么了?
原始响应中存在格式问题(与Stackoverflow编辑器的细节有关)。我已经更新了。还在此处发布格式化程序版本。
container_commands:
100-remove-old-java:
command: "sudo yum remove -y java-1.8.0-openjdk-headless"
200-download-rpm-package:
command: "wget https://d3pxv6yz143wms.cloudfront.net/11.0.4.11.1/java-11-amazon-corretto-devel-11.0.4.11-1.x86_64.rpm "
300-install-java:
command: "sudo yum localinstall -y java-11-amazon-corretto-devel-11.0.4.11-1.x86_64.rpm"