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