RHEL6 Beta:如何使用yum命令安装不带RHN的软件包
时间:2020-01-09 10:43:29 来源:igfitidea点击:
我正在为我们的应用程序测试Redhat Enterprise Linux 6。
但是,RHN不支持beta RHEL 6软件。
如何在不使用DVD ROM的情况下使用yum命令安装其他软件?
您需要通过编辑/etc/yum.repos.d/rhel-beta.repo文件来启用betaRepo,然后执行:
# vi /etc/yum.repos.d/rhel-beta.repo
确保启用设置为1:
[rhel-beta] name=Red Hat Enterprise Linux $releasever Beta - $basearch #baseurl=ftp://ftp.redhat.com/pub/redhat/rhel/beta/$releasever/$basearch/os/ mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=rhel-$releasever-beta&arch=$basearch enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta [rhel-beta-optional] name=Red Hat Enterprise Linux $releasever Beta (Optional) - $basearch #baseurl=ftp://ftp.redhat.com/pub/redhat/rhel/beta/$releasever/optional/$basearch/os/ mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=rhel-optional-$releasever-beta&arch=$basearch enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta
保存并关闭文件。
现在,您可以访问不带RHN的软件以进行RHEL 6.0 beta下的测试。
# yum list | less # yum search php
输出示例:
Loaded plugins: refresh-packagekit, rhnplugin This system is not registered with RHN. RHN support will be disabled. =============================================================================================================== Matched: php ================================================================================================================ php.x86_64 : PHP scripting language for creating dynamic web sites php-bcmath.x86_64 : A module for PHP applications for using the bcmath library php-cli.x86_64 : Command-line interface for PHP php-common.x86_64 : Common files for PHP php-dba.x86_64 : A database abstraction layer module for PHP applications ...
您可以按照以下步骤安装php:
# yum install php
输出示例:
Loaded plugins: refresh-packagekit, rhnplugin This system is not registered with RHN. RHN support will be disabled. Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package php.x86_64 0:5.3.2-3.el6 set to be updated --> Processing Dependency: php-cli = 5.3.2-3.el6 for package: php-5.3.2-3.el6.x86_64 --> Processing Dependency: php-common = 5.3.2-3.el6 for package: php-5.3.2-3.el6.x86_64 --> Running transaction check ---> Package php-cli.x86_64 0:5.3.2-3.el6 set to be updated ---> Package php-common.x86_64 0:5.3.2-3.el6 set to be updated --> Finished Dependency Resolution Dependencies Resolved =============================================================================== Package Arch Version Repository Size =============================================================================== Installing: php x86_64 5.3.2-3.el6 rhel-beta 1.1 M Installing for dependencies: php-cli x86_64 5.3.2-3.el6 rhel-beta 2.2 M php-common x86_64 5.3.2-3.el6 rhel-beta 515 k Transaction Summary =============================================================================== Install 3 Package(s) Downloading Packages: (1/2): php-cli-5.3.2-3.el6.x86_64.rpm | 2.2 MB 00:03 (2/2): php-common-5.3.2-3.el6.x86_64.rpm | 515 kB 00:00 ------------------------------------------------------------------------------ Total 284 kB/s | 2.7 MB 00:09 warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID f21541eb: NOKEY rhel-beta/gpgkey | 6.6 kB 00:00 ... Importing GPG key 0xF21541EB "Red Hat, Inc. (beta key 2) " from /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta Is this ok [y/N]: y Importing GPG key 0x897DA07A "Red Hat, Inc. (Beta Test Software) " from /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta Is this ok [y/N]: y Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : php-common-5.3.2-3.el6.x86_64 1/3 Installing : php-cli-5.3.2-3.el6.x86_64 2/3 Installing : php-5.3.2-3.el6.x86_64 3/3 Installed: php.x86_64 0:5.3.2-3.el6 Dependency Installed: php-cli.x86_64 0:5.3.2-3.el6 php-common.x86_64 0:5.3.2-3.el6 Complete!