CentOS 7에서 MongoDB를 설치하고 실행하는 방법은 무엇입니까?

Sufyan

CentOS 7 컴퓨터에 MongoDB 서버를 설치하고 실행하려고합니다. CentOS 7 컴퓨터는 대학 캠퍼스에 있으며 VPN을 통해 ssh를 통해 집에서 액세스하고 있습니다.

나는 링크에 주어진 모든 단계를 따랐다 :
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/

다음은 출력입니다 sudo systemctl start mongod.

Job for mongod.service failed because the control process exited with error code. See "systemctl status mongod.service" and "journalctl -xe" for details.  

다음은 출력입니다 systemctl status mongod.service.

● mongod.service - MongoDB Database Server
   Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2020-12-30 00:23:07 IST; 1min 41s ago
     Docs: https://docs.mongodb.org/manual
  Process: 61587 ExecStart=/usr/bin/mongod $OPTIONS (code=exited, status=14)
  Process: 61584 ExecStartPre=/usr/bin/chmod 0755 /var/run/mongodb (code=exited, status=0/SUCCESS)
  Process: 61581 ExecStartPre=/usr/bin/chown mongod:mongod /var/run/mongodb (code=exited, status=0/SUCCESS)
  Process: 61578 ExecStartPre=/usr/bin/mkdir -p /var/run/mongodb (code=exited, status=0/SUCCESS)

Dec 30 00:23:07 smart systemd[1]: Starting MongoDB Database Server...
Dec 30 00:23:07 smart mongod[61587]: about to fork child process, waiting until server is ready for connections.
Dec 30 00:23:07 smart mongod[61587]: forked process: 61589
Dec 30 00:23:07 smart mongod[61587]: ERROR: child process failed, exited with 14
Dec 30 00:23:07 smart mongod[61587]: To see additional information in this output, start without the "--for...tion.
Dec 30 00:23:07 smart systemd[1]: mongod.service: control process exited, code=exited status=14
Dec 30 00:23:07 smart systemd[1]: Failed to start MongoDB Database Server.
Dec 30 00:23:07 smart systemd[1]: Unit mongod.service entered failed state.
Dec 30 00:23:07 smart systemd[1]: mongod.service failed.
Hint: Some lines were ellipsized, use -l to show in full.   

다음은 출력입니다 journalctl -xe.

Dec 30 00:23:07 smart polkitd[1826]: Unregistered Authentication Agent for unix-process:61557:106467206 (system bus
Dec 30 00:23:08 smart dbus[1879]: [system] Successfully activated service 'org.fedoraproject.Setroubleshootd'
Dec 30 00:23:08 smart setroubleshoot[61594]: failed to retrieve rpm info for /proc/sys/net/ipv4/tcp_fastopen
Dec 30 00:23:08 smart setroubleshoot[61594]: SELinux is preventing /usr/bin/mongod from open access on the file /pr
Dec 30 00:23:08 smart python[61594]: SELinux is preventing /usr/bin/mongod from open access on the file /proc/sys/n

                                     *****  Plugin catchall (100. confidence) suggests   **************************

                                     If you believe that mongod should be allowed open access on the tcp_fastopen f
                                     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 'mongod' --raw | audit2allow -M my-mongod
                                     # semodule -i my-mongod.pp

Dec 30 00:23:11 smart setroubleshoot[61594]: SELinux is preventing /usr/bin/mongod from unlink access on the sock_f
Dec 30 00:23:11 smart python[61594]: SELinux is preventing /usr/bin/mongod from unlink access on the sock_file mong

                                     *****  Plugin catchall (100. confidence) suggests   **************************

                                     If you believe that mongod should be allowed unlink access on the mongodb-2701
                                     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 'mongod' --raw | audit2allow -M my-mongod
                                     # semodule -i my-mongod.pp

Dec 30 00:24:52 smart chronyd[2023]: Source 162.159.200.123 replaced with 5.189.141.35

내가 어디에서 잘못되었는지 모르거나 기본적인 구성 단계를 놓쳤습니다.
https://unix.stackexchange.com/a/568238/372656
https://stackoverflow.com/a/64818226 과 같은 많은 온라인 블로그 / 사이트를 시도했지만
도움이되지 않았습니다.

누구든지 어떻게 해결할 수 있는지 설명해 주시겠습니까? 미리 감사드립니다.

숫자 9

내 의견을 해결책으로 넣어야한다고 생각합니다.

journalctl 출력에서 ​​SELinux가 Mongod가 일부 파일에 대한 액세스를 열지 못하게하여 mongodb가 작동하지 않는다고 말합니다. SELinux를 허용 모드로 설정하거나 SELinux에 mongodb 실행을 허용해야합니다.

자세한 내용은 이 링크 를 참조하십시오. 더 긴 설명을 위해이 링크 를 사용하거나 링크 1에 따라 enforcing = 0을 설정하거나 / etc / selinux / config를 편집하고 허용하도록 설정하십시오.

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

Centos에 OctoberCMS를 설치하는 방법은 무엇입니까?

분류에서Dev

CentOS에 Docker를 설치하는 방법은 무엇입니까?

분류에서Dev

CentOS 7 설치에 Fedora Repo를 추가하는 방법은 무엇입니까?

분류에서Dev

centos7에 pktstat를 설치하는 방법은 무엇입니까?

분류에서Dev

CentOS 7에 Docker를 설치하는 방법은 무엇입니까?

분류에서Dev

init.d없이 centos7에서 tinyproxy를 실행하는 방법은 무엇입니까?

분류에서Dev

sshd 서비스를 항상 실행하고 CentOS7에서 영구 FQDN 호스트 이름을 설정하는 방법은 무엇입니까?

분류에서Dev

CentOS 8에서 phpseclib를 설치하는 방법은 무엇입니까?

분류에서Dev

CentOS 7에서 시간대를 변경하는 방법은 무엇입니까?

분류에서Dev

Centos, R에 "topicmodels"패키지를 설치하는 방법은 무엇입니까?

분류에서Dev

CentOS 5.2에 GCC 4.7.2를 설치하는 방법은 무엇입니까?

분류에서Dev

centos에 man 페이지를 설치하는 방법은 무엇입니까?

분류에서Dev

CentOS 6.5에 libsnmp를 설치하는 방법은 무엇입니까?

분류에서Dev

Centos 6.8에 Spacewalk를 설치하는 방법은 무엇입니까?

분류에서Dev

CentOS 8에 python-setuptools를 설치하는 방법은 무엇입니까?

분류에서Dev

Ubuntu 16에서 Docker를 실행하고 이전 설치를 제거하는 방법은 무엇입니까?

분류에서Dev

Fedora 19에서 xlsx2csv를 설치하고 실행하는 방법은 무엇입니까?

분류에서Dev

KuBuntu에서 e2defrag를 설치하고 실행하는 방법은 무엇입니까?

분류에서Dev

Ubuntu 18.04에서 Anbox를 설치하고 실행하는 방법은 무엇입니까?

분류에서Dev

AWS 시스템에서 Eclipse를 설치하고 실행하는 방법은 무엇입니까?

분류에서Dev

archlinux에 mongodb를 설치하는 방법은 무엇입니까?

분류에서Dev

Ubuntu 12.04에 opencv를 설치하고 Python으로 실행하는 방법은 무엇입니까?

분류에서Dev

패키지를 외장 드라이브에 설치하고 실행하는 방법은 무엇입니까?

분류에서Dev

CentOs 7에 (tar.xz) 패키지를 설치하는 올바른 방법은 무엇입니까?

분류에서Dev

CentOS 및 Ubuntu에서 Gmail로 mutt를 설치 / 설정하는 방법은 무엇입니까?

분류에서Dev

Centos에서 ipv6를 설정하는 방법은 무엇입니까?

분류에서Dev

Mongodb를 실행하는 Mongoose에서 스크립트를 실행하는 방법은 무엇입니까?

분류에서Dev

CentOS 7의 lsblk 목록에서 블록 장치를 제거하는 방법은 무엇입니까?

분류에서Dev

CentOS에 jdk7을 설치하는 방법은 무엇입니까?

Related 관련 기사

  1. 1

    Centos에 OctoberCMS를 설치하는 방법은 무엇입니까?

  2. 2

    CentOS에 Docker를 설치하는 방법은 무엇입니까?

  3. 3

    CentOS 7 설치에 Fedora Repo를 추가하는 방법은 무엇입니까?

  4. 4

    centos7에 pktstat를 설치하는 방법은 무엇입니까?

  5. 5

    CentOS 7에 Docker를 설치하는 방법은 무엇입니까?

  6. 6

    init.d없이 centos7에서 tinyproxy를 실행하는 방법은 무엇입니까?

  7. 7

    sshd 서비스를 항상 실행하고 CentOS7에서 영구 FQDN 호스트 이름을 설정하는 방법은 무엇입니까?

  8. 8

    CentOS 8에서 phpseclib를 설치하는 방법은 무엇입니까?

  9. 9

    CentOS 7에서 시간대를 변경하는 방법은 무엇입니까?

  10. 10

    Centos, R에 "topicmodels"패키지를 설치하는 방법은 무엇입니까?

  11. 11

    CentOS 5.2에 GCC 4.7.2를 설치하는 방법은 무엇입니까?

  12. 12

    centos에 man 페이지를 설치하는 방법은 무엇입니까?

  13. 13

    CentOS 6.5에 libsnmp를 설치하는 방법은 무엇입니까?

  14. 14

    Centos 6.8에 Spacewalk를 설치하는 방법은 무엇입니까?

  15. 15

    CentOS 8에 python-setuptools를 설치하는 방법은 무엇입니까?

  16. 16

    Ubuntu 16에서 Docker를 실행하고 이전 설치를 제거하는 방법은 무엇입니까?

  17. 17

    Fedora 19에서 xlsx2csv를 설치하고 실행하는 방법은 무엇입니까?

  18. 18

    KuBuntu에서 e2defrag를 설치하고 실행하는 방법은 무엇입니까?

  19. 19

    Ubuntu 18.04에서 Anbox를 설치하고 실행하는 방법은 무엇입니까?

  20. 20

    AWS 시스템에서 Eclipse를 설치하고 실행하는 방법은 무엇입니까?

  21. 21

    archlinux에 mongodb를 설치하는 방법은 무엇입니까?

  22. 22

    Ubuntu 12.04에 opencv를 설치하고 Python으로 실행하는 방법은 무엇입니까?

  23. 23

    패키지를 외장 드라이브에 설치하고 실행하는 방법은 무엇입니까?

  24. 24

    CentOs 7에 (tar.xz) 패키지를 설치하는 올바른 방법은 무엇입니까?

  25. 25

    CentOS 및 Ubuntu에서 Gmail로 mutt를 설치 / 설정하는 방법은 무엇입니까?

  26. 26

    Centos에서 ipv6를 설정하는 방법은 무엇입니까?

  27. 27

    Mongodb를 실행하는 Mongoose에서 스크립트를 실행하는 방법은 무엇입니까?

  28. 28

    CentOS 7의 lsblk 목록에서 블록 장치를 제거하는 방법은 무엇입니까?

  29. 29

    CentOS에 jdk7을 설치하는 방법은 무엇입니까?

뜨겁다태그

보관