![로컬 네트워크의 Repo 서버에 연결할 수 없습니다.](https://rvso.com/image/789263/%EB%A1%9C%EC%BB%AC%20%EB%84%A4%ED%8A%B8%EC%9B%8C%ED%81%AC%EC%9D%98%20Repo%20%EC%84%9C%EB%B2%84%EC%97%90%20%EC%97%B0%EA%B2%B0%ED%95%A0%20%EC%88%98%20%EC%97%86%EC%8A%B5%EB%8B%88%EB%8B%A4..png)
현재 두 개의 VM이 있습니다.
- 노드1(192.168.55.201)
- 저장소(192.168.55.203)
설정하려고 하는데노드1repo 서버에서 패키지를 검색할 수 있도록 합니다. 현재 AppStream 저장소가 있고 httpd가 설정되어 있습니다.저장소주인.
[root@rhel9 test_repos]# tree -d AppStream/
AppStream/
├── Packages
└── repodata
[root@rhel9 test_repos]# systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2023-09-13 11:51:53 UTC; 18min ago
Docs: man:httpd.service(8)
Main PID: 37453 (httpd)
Status: "Total requests: 20; Idle/Busy workers 100/0;Requests/sec: 0.0182; Bytes served/sec: 10 B/sec"
Tasks: 213 (limit: 11077)
Memory: 23.1M
CPU: 1.929s
CGroup: /system.slice/httpd.service
├─37453 /usr/sbin/httpd -DFOREGROUND
├─37454 /usr/sbin/httpd -DFOREGROUND
├─37455 /usr/sbin/httpd -DFOREGROUND
├─37456 /usr/sbin/httpd -DFOREGROUND
└─37457 /usr/sbin/httpd -DFOREGROUND
Sep 13 11:51:53 rhel9.localdomain systemd[1]: Starting The Apache HTTP Server...
Sep 13 11:51:53 rhel9.localdomain systemd[1]: Started The Apache HTTP Server.
Sep 13 11:51:53 rhel9.localdomain httpd[37453]: Server configured, listening on: port 80
~에노드1,AppStream.repo 파일을 다음 위치에 생성했습니다./etc/yum.repos.d
[AppStream]
name=AppStream
baseurl=http://192.168.55.203:/test_repos/AppStream
gpgcheck=0
enabled=1
을(를) 실행하려고 하면 dnf update
다음 오류가 발생합니다.
Errors during downloading metadata for repository 'AppStream':
- Status code: 404 for http://192.168.55.203/test_repos/repodata/repomd.xml (IP: 192.168.55.203)
Error: Failed to download metadata for repo 'AppStream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
repo 데이터 디렉토리를 확인하면저장소호스트, 파일이 존재하는 것을 볼 수 있습니다 repodata.xml
.
└── repodata
├── 278a30984eda05dd66bf5b64b4c73e3ad594b4d7e53c88a2c65aeaa0c5948590-filelists.xml.gz
├── 538c923c865cbbe37031914cb741d828109b4ca5a75d7295a44044a5919d5dfa-primary.sqlite.bz2
├── 58ab9375821de1a81796ad3f0037d2dfa2ab8b1659ed191152ac848a7851c7d8-filelists.sqlite.bz2
├── a5bca624b05d997d2558ed577fe5eceba8429ef7df1237d95f5dd3d57c5e8165-other.xml.gz
├── b77637ccd437dfab4e6352a43838094f7d9c6a4c91de7ccb97e11ca83b349fed-primary.xml.gz
├── ecb122d15f31549a564c15d66fb89e336e777812ae30c83620fa53f6df86f4b5-other.sqlite.bz2
├── productid
└── repomd.xml
다음 문제 해결을 완료했습니다.
- 성공적으로 핑을 보냈습니다저장소~에서노드1그리고 그 반대
- 성공적으로 말려저장소~에서노드1그리고 아파치 환영 페이지를 얻었습니다
- 방화벽 규칙이 설정되어 있는지 확인했습니다.저장소
public (active)
target: default
icmp-block-inversion: no
interfaces: eth0 eth1
sources:
services: cockpit dhcpv6-client http ssh
문제가 무엇인지 아시나요?
감사해요 !
답변1
오류 로그를 확인한 후 Permission Denied 메시지를 볼 수 있었습니다. 문제는 내 test_repos
디렉터리 에 올바른 파일 컨텍스트가 없다는 것입니다 . 이제 문제가 해결 되었습니다 httpd_sys_content_t
.