英文:
3 different Openjkds on RHEL7 with YUM
问题
我需要在EL7上安装3个不同版本的openjdk(11.0.5、11.0.6、11.0.7)。
我看到RHEL7仓库中有这3个版本都可用,但有一个要求是将0.5/0.6的所有软件包文件安装在用户自定义位置,而0.7应安装在默认位置。
我需要使用YUM来避免在YUM之外更改RPM数据库,并确保YUM更新不会升级0.5/0.6。
自从0.6以后,Tar.gz已不再可用,所以我想使用来自RHEL仓库的OpenJDK。
我应该使用“update-alternatives —list”、“yum --installroot=
谢谢您的建议!
英文:
I need to install 3 different versions of openjdk (11.0.5, 11.0.6, 11.0.7) on EL7.
I see all 3 versions available in RHEL7 repo but there is an ask to install all package files for 0.5/0.6 in user custom location while 0.7 should be installed in default location.
I need to use YUM to avoid altering the RPM DB outside of YUM and I need to make sure that YUM update will not upgrade 0.5/0.6.
Tar.gz is no longer available since 0.6 so I want to use OpenJDK from RHEL repo.
Shall I use "update-alternatives —list”, "yum --installroot=<path> install <package1>” or some other way? I was suggesting to use virtual_env but that was rejected.
Thanks for your thoughts!
答案1
得分: 1
我不认为这是可能的。如果你只想使用这些包来获取代码,你可以手动从旧的包中提取文件:
rpm2cpio ./openjdk-11.0.5.rpm | cpio -idmv
然后你可以安装这些文件到任何你想要的地方。请注意,这些文件将不会被rpm
跟踪,因此也不会被rpm
更新或删除。
英文:
I don't think that is possible. If you just want to use the packages to get your hands on the code, you can extract the files from the older packages manually:
rpm2cpio ./openjdk-11.0.5.rpm | cpio -idmv
You can then install those wherever you want. Note that the files will thus not be tracked by rpm
, and will thus not be updated/removed by rpm
.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论