Minio安装

Minio安装

软件目录:/usr/local/bin/minio

下载运行文件
cd /usr/local/bin/
wget https://dl.min.io/server/minio/release/linux-amd64/minio
chmod +x minio
制作默认配置文件
sudo cat <<EOT >> /etc/default/minio
# Volume to be used for MinIO server.
MINIO_VOLUMES="/data1/server/infra/minio/data"
# Use if you want to run MinIO on a custom port.
MINIO_OPTS="--address :15090"
# Access Key of the server.
# MINIO_ACCESS_KEY="hufY76YgdgjGHGlOoiK"
# Secret key of the server.
# MINIO_SECRET_KEY="Hyhdygyf654GY5r8tigyYgyhefbjfrklgrjogjHtd"
EOT
获取制作服务
cd /etc/systemd/system/
sudo curl -O https://raw.githubusercontent.com/minio/minio-service/master/linux-systemd/minio.service
vi minio.service
配置如下

注意修改默认执行用户及组

[Unit]
Description=MinIO
Documentation=https://docs.min.io
Wants=network-online.target
After=network-online.target

# 指定执行文件路径

AssertFileIsExecutable=/usr/local/bin/minio

[Service]
AmbientCapabilities=CAP_NET_BIND_SERVICE
WorkingDirectory=/usr/local/

# 修改默认执行用户及组

User=minio
Group=minio

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=65536

# 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})  
添加配置

如果指定普通用户运行并且软件运行端口号小于1024,

[Service]
AmbientCapabilities=CAP_NET_BIND_SERVICE
WorkingDirectory=/usr/local/
运行

制作启动服务,守护程序运行

systemctl enable minio.service
systemctl start minio
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值