博客园  :: 首页  :: 管理

背景:云上有一台内部yum服务器,操作系统及版本信息为:Red Hat Enterprise Linux Server release 7.9 (Maipo)

上面每天会同aws仓库官网同步repo,版本也自然是 Red Hat Enterprise Linux Server release 7

现在需要临时增加 Redhat 8.的 仓库,(默认Redhat 8 也是有内部repo仓库的,只是在其他平台)

关于Apache的版本信息如下:Apache/2.4.6 (Red Hat Enterprise Linux)

 

于是实现方法过程如下:

1、将其他平台的repo仓库目录同步到云上的内部yum服务器

2、修改httpd配置文件,在之前的基础上,添加上新的Redhat 8仓库访问路径及目录信息,配置文件 /etc/httpd/conf.d/xxxx.conf

<VirtualHost *:80>
  DocumentRoot "/rhel-7/patch/"
  ProxyRequests on
  ProxyVia Full
<Proxy *>
  Order deny,allow
  Allow from all
</Proxy>
</VirtualHost>

<directory "/rhel-7/patch/">
  options +indexes
  Require all granted
</directory>

Alias /rhel-8 "/tmp-sap-patch/"

<directory "/tmp-sap-patch/">
  options +indexes
  Require all granted
</directory>

说明:对于临时的,笔者使用了Alias选项,即如果访问 http://x.x.x.x/rhel-8/dir-or-file ,实际就是相当于访问的 tmp-sap-patch 目录下的 dir-or-file 

 

 

 

尊重别人的劳动成果 转载请务必注明出处:https://www.cnblogs.com/5201351/p/17495628.html