# 剧本

> 使用剧本安装 ferretdb
---

有一个内置的剧本 [`mongo.yml`](https://github.com/pgsty/pigsty/blob/v3.7.0/mongo.yml) 用于在节点上安装 FerretDB。

--------

## `mongo.yml`

[`mongo.yml`](https://github.com/pgsty/pigsty/blob/v3.7.0/mongo.yml)：在目标主机上安装 MongoDB/FerretDB。

此剧本包含以下子任务：

- `mongo_check` ：检查 mongo 身份
- `mongo_dbsu` ：创建操作系统用户 mongod
- `mongo_install` ：安装 mongo/ferretdb rpm
- `mongo_purge` ：清除 mongo/ferretdb
- `mongo_config`：配置 mongo/ferretdb
- `mongo_cert` ：签发 mongo/ferretdb ssl 证书
- `mongo_launch` ：启动 mongo/ferretdb 服务
- `mongo_register` ：将 mongo/ferretdb 注册到 prometheus
