ubuntu

Ubuntu上MinIO的存储路径在哪

小樊
65
2025-05-18 07:29:28
栏目: 云计算

在Ubuntu上,MinIO的存储路径默认是在/data目录下。但是,你可以在启动MinIO服务器时通过命令行参数来指定自定义的存储路径。

例如,如果你想将存储路径设置为/mnt/myminiodata,你可以使用以下命令启动MinIO服务器:

./minio server /mnt/myminiodata

此外,如果你想让MinIO在系统启动时自动运行,并且希望它在指定的存储路径下工作,你可以创建一个systemd服务文件。以下是一个示例服务文件,你可以将其保存为/etc/systemd/system/minio.service

[Unit]
Description=MinIO Server
After=network.target

[Service]
User=minio
Group=minio
ExecStart=/path/to/minio server /mnt/myminiodata
Restart=on-failure

[Install]
WantedBy=multi-user.target

在这个服务文件中,确保将/path/to/minio替换为你的MinIO二进制文件的实际路径。然后,运行以下命令以启用和启动服务:

sudo systemctl enable minio
sudo systemctl start minio

这样,MinIO将在系统启动时自动运行,并使用指定的存储路径。

0
看了该问题的人还看了