4.13.6. 配置 Satellite 使用外部数据库
使用 satellite-installer 命令配置 Satellite 以连接到外部 MongoDB 和 PostgreSQL 数据库。
先决条件
- 您已在 Red Hat Enterprise Linux 服务器中安装了并配置了 MongoDB 和 PostgreSQL 数据库。
流程
要为 Satellite 配置外部数据库,请输入以下命令:
satellite-installer --scenario satellite \ --foreman-db-host postgres.example.com \ --foreman-db-password Foreman_Password \ --foreman-db-database foreman \ --foreman-db-manage false \ --katello-candlepin-db-host postgres.example.com \ --katello-candlepin-db-name candlepin \ --katello-candlepin-db-password Candlepin_Password \ --katello-candlepin-manage-db false \ --foreman-proxy-content-pulpcore-manage-postgresql false \ --foreman-proxy-content-pulpcore-postgresql-host postgres.example.com \ --foreman-proxy-content-pulpcore-postgresql-db-name pulpcore \ --foreman-proxy-content-pulpcore-postgresql-password Pulpcore_Password \ --katello-pulp-db-username pulp \ --katello-pulp-db-password pulp_password \ --katello-pulp-db-seeds mongo.example.com:27017 \ --katello-pulp-db-name pulp_database
验证数据库的状态:
对于 PostgreSQL,请输入以下命令:
# satellite-maintain service status --only postgresql
对于 MongoDB,请输入以下命令:
# satellite-maintain service status --only rh-mongodb34-mongod