温馨提示×

解锁Linux上MinIO的安装密码

小樊
34
2025-03-04 13:32:44
栏目: 智能运维
Linux服务器限时活动,0元免费领,库存有限,领完即止! 点击查看>>

要解锁Linux上MinIO的安装密码,您需要按照以下步骤操作:

设置管理员凭证

  • 通过环境变量定义管理员凭证(至少3字符用户名和8字符密码):
    export MINIO_ROOT_USER=admin
    export MINIO_ROOT_SECRET=your_strong_password
    
    建议将变量写入 /etc/profile 并执行 source /etc/profile 以持久化设置。

创建Systemd单元文件(可选)

  • 新建 /etc/systemd/system/minio.service 文件,内容如下:
    [Unit]
    Description=MinIO
    After=network.target
    
    [Service]
    Type=simple
    User=root
    Environment="MINIO_ROOT_USER=admin"
    Environment="MINIO_ROOT_PASSWORD=your_password"
    ExecStart=/usr/local/bin/minio server /data/minio --console-address ":9001"
    Restart=on-failure
    
    [Install]
    WantedBy=multi-user.target
    
  • 启用并启动服务:
    systemctl daemon-reload
    systemctl enable minio
    systemctl start minio
    

通过以上步骤,您可以设置或更改Linux上MinIO的管理员密码。请确保使用强密码以提高安全性。

亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>

推荐阅读:解锁Linux MinIO安装的秘密

0