1.创建minio.service文件
进入该目录下cd /etc/systemd/system/ 创建minio.service文件
cd /etc/systemd/system/
touch minio.service
1
2
3
2.配置启动内容脚本
#编辑命令
vim minio.service
1
2
[Unit]
Description=Minio Service[Service]
Environment="MINIO_ROOT_USER=admin"
Environment="MINIO_ROOT_PASSWORD=123456789"
ExecStart=/root/minio server /mnt/data --console-address ":5000"
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
StandardOutput=/mnt/minio/logs/minio.log
PrivateTmp=true[Install]
WantedBy=multi-user.target