fedora 에 실행 nginx 설치
8173 단어 Linux
windows 10 시스템 개발 환경 에 서 는 여러 가지 문제 가 자주 발생 하 는데, 오늘 오전 에는 또 이해 할 수 없 는 문제 가 발생 했 지만, 임무 가 급 해 자신의 컴퓨터 개발 을 생각 하고 있다.자신의 컴퓨터 를 사용 할 때 fedora 시스템, 프로젝트 에 nginx 를 사 용 했 기 때문에 fedora 에 설치 해 야 하기 때문에 이 글 이 있 습 니 다.
설치 절차
원본 코드 를 다운로드 한 후 컴 파일 하여 설치 하려 고 했 는데 make 가 항상 실 패 했 기 때문에 어 쩔 수 없 이 창고 에서 dnf 를 설치 할 수 밖 에 없 었 습 니 다.
레 퍼 런 스
이 때 프로젝트 를 시작 하면 브 라 우 저 에서 일부 자원, js, css, 이미지 403 에 접근 할 수 없습니다.나 도 방법 을 많이 찾 아 봤 는데 안 돼.마지막 으로 seLinux 문제 가 발 견 됐 습 니 다.seLinux 는 잘 모 르 겠 습 니 다. 다만 안전 과 밀접 한 관 계 를 알 고 있 을 뿐 입 니 다.다음 명령 을 사용 하여 자세 한 정 보 를 볼 수 있 습 니 다: journalctl - xe 는 seLinux 에 관 한 문 제 를 알 릴 수 있 습 니 다.
journalctl -xe
Do
allow this access for now by executing:
# ausearch -c 'nginx' --raw | audit2allow -M my-nginx
# semodule -X 300 -i my-nginx.pp
12 26 11:37:22 localhost.localdomain setroubleshoot[4902]: SELinux is preventing nginx from name_connect access on the tcp_socket port 20050. For complete SELinux messages
12 26 11:37:22 localhost.localdomain python3[4902]: SELinux is preventing nginx from name_connect access on the tcp_socket port 20050.
***** Plugin connect_ports (85.9 confidence) suggests *********************
If you want to allow nginx to connect to network port 20050
Then you need to modify the port type.
Do
# semanage port -a -t PORT_TYPE -p tcp 20050
where PORT_TYPE is one of the following: dns_port_t, dnssec_port_t, http_port_t, kerberos_port_t, ocsp_port_t.
***** Plugin catchall_boolean (7.33 confidence) suggests ******************
If you want to allow httpd to can network connect
Then you must tell SELinux about this by enabling the 'httpd_can_network_connect' boolean.
Do
setsebool -P httpd_can_network_connect 1
***** Plugin catchall_boolean (7.33 confidence) suggests ******************
If you want to allow nis to enabled
Then you must tell SELinux about this by enabling the 'nis_enabled' boolean.
Do
setsebool -P nis_enabled 1
***** Plugin catchall (1.35 confidence) suggests **************************
If you believe that nginx should be allowed name_connect access on the port 20050 tcp_socket by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'nginx' --raw | audit2allow -M my-nginx
# semodule -X 300 -i my-nginx.pp
12 26 11:37:25 localhost.localdomain google-chrome.desktop[4501]: [4501:4540:1226/113725.433785:ERROR:connection_factory_impl.cc(386)] Failed to connect to MCS endpoint wi
seLinux 보안 명단 에 nginx 를 추가 하면 됩 니 다.seLinux 는 세 가지 모델 이 있 는데 그것 이 바로:
이상 의 절 차 는 nginx 의 설 치 를 완성 하 였 습 니 다.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
바이너리 파일cat 또는tail, 터미널 디코딩 시 처리 방법cat으로 바이너리 파일을 보려고 할 때 코드가 엉망이 되어 식은땀이 났다. 웹에서 스크롤된 정보의 처리 방법과alias의 설정을 요약합니다. reset 명령을 사용하여 터미널을 재설정합니다.이렇게 하면 고치지 못하...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.