検索

3.4. Installing MongoDB

download PDF

You can install only the same version of MongoDB that is installed with the satellite-installer tool during an internal database installation. You can install MongoDB using Red Hat Software Collections (RHSCL) repositories or from an external source, as long as the version is supported. Satellite supports MongoDB version 3.4.

Procedure

  1. To install MongoDB, enter the following command:

    # yum install rh-mongodb34 rh-mongodb34-syspaths
  2. Start and enable the rh-mongodb34 service:

    # systemctl start rh-mongodb34-mongod
    # systemctl enable rh-mongodb34-mongod
  3. Create a Pulp user on MongoDB for database pulp_database:

    # mongo pulp_database \
    --eval "db.createUser({user:'pulp',pwd:'pulp_password',roles:[{role:'dbOwner', db:'pulp_database'},{ role: 'readWrite', db: 'pulp_database'}]})"
  4. In the /etc/opt/rh/rh-mongodb34/mongod.conf file, specify the bind IP:

    bindIp: your_mongodb_server_bind_IP,::1
  5. Edit the /etc/opt/rh/rh-mongodb34/mongod.conf file to enable authentication in the security section:

    security:
      authorization: enabled
  6. Restart the rh-mongodb34-mongod service:

    # systemctl restart rh-mongodb34-mongod
  7. Open port 27017 for MongoDB:

    # firewall-cmd --add-port=27017/tcp
    # firewall-cmd --runtime-to-permanent
  8. From Satellite Server, test that you can access the database. If the connection succeeds, the command returns 1.

    # scl enable rh-mongodb34 " mongo --host mongo.example.com \
    -u pulp -p pulp_password --port 27017 --eval 'ping:1' pulp_database"
Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.