Linux安装minio
一、软件下载
二、安装minio
1、安装包准备
2、检查minio是否已安装
rpm -qa|grep minio
3、安装minio与mcli安装包
rpm -ivh minio-20230227181045.0.0.x86_64.rpm
rpm -ivh mcli-20230228001259.0.0.x86_64.rpm
4、修改配置文件
查看配置文件位置
systemctl status minio
修改配置文件
vim /usr/lib/systemd/system/minio.service
[Unit]
Description=MinIO
Documentation=https://docs.min.io
Wants=network-online.target
After=network-online.target
#这里需要修改为你minio存放位置
AssertFileIsExecutable=/usr/local/bin/minio
[Service]
WorkingDirectory=/usr/local
# User and group
User=root
Group=root
ProtectProc=invisible
EnvironmentFile=-/etc/default/minio
ExecStartPre=/bin/bash -c "if [ -z \"${MINIO_VOLUMES}\" ]; then echo \ "Variable MINIO VOLUMES not set in /etc/default/minio\"; exit 1; fi"
ExecStart=/usr/local/bin/minio server $MINIO_OPTS $MINIO_VOLUMES
# Let systemd restart this service always
Restart=always
# Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=1048576
# Specifies the maximum number of threads this process can create
TasksMax=infinity
# Disable timeout logic and wait until process is stopped
TimeoutStopSec=infinity
SendSIGKILL=no
[install]
WantedBy=multi-user.target
# Built for ${project.name}-${project.version} (${project.name})
修改mimio秘钥及数据存放地址
vim /etc/default/minio
MINIO_ACCESS_KEY=xxxx
MINIO_SECRET_KEY=xxxxxxxxx
MINIO_OPTS="--address '0.0.0.0:9050' --console-address '0.0.0.0:9051' "
MINIO_VOLUMES="/data/minio/data"
创建数据文件夹
mkdir -p /data/minio/data
修改访问凭据
mcli --autocompletion
vim /root/.mcli/config.json
{
"version": "10",
"aliases": {
"local": {
"url": "http://localhost:9050",
"accessKey": "xxxx",
"secretKey": "xxxxxx",
"api": "S3v4",
"path": "auto"
}
}
}
accessKey对应MINIO_ACCESS_KEY
secretKey对应MINIO_SECRET_KEY
运行minio
systemctl start minio
查看minio运行状态
systemctl status minio.service
分享所感,如有侵权,请联系删除,可扫码关注微信公众号获取更多福利噢。
本文仅限于技术交流,若造成不良影响,本文创作人员概不负责,请支持正版应用,注重产权保护!!
(您的“打赏”将是我最大的写作动力!转载请注明出处.)
本文仅限于技术交流,若造成不良影响,本文创作人员概不负责,请支持正版应用,注重产权保护!!
(您的“打赏”将是我最大的写作动力!转载请注明出处.)
关注微信公众号 |