1 远程下载二进制文件
[root@localhost bin]# cd /opt/package
[root@localhost package]# wget https://dl.min.io/server/minio/release/linux-amd64/minio
2 创建目录:文件存储、日志
[root@localhost package]# cd /opt
[root@localhost opt]# mkdir minio
[root@localhost opt]# mv /opt/package/minio /opt/minio/
[root@localhost opt]# cd minio/
[root@localhost minio]# mkdir data
[root@localhost minio]# touch minio.log
3 授权执行
[root@localhost minio]# chmod +x minio
4 启动
[root@localhost minio]# nohup /opt/minio/minio server --address :9000 --console-address :9001 /opt/minio/data >/opt/minio/minio.log 2>&1 &
5 创建配置文件
[root@localhost minio]# mkdir conf
[root@localhost minio]# vi /opt/minio/conf/minio.conf
MINIO_VOLUMES="/opt/minio/data"
MINIO_OPTS="-C /opt/minio/conf --address 0.0.0.0:9000 --console-address 0.0.0.0:9001"
MINIO_ROOT_USER=admin
MINIO_ROOT_PASSWORD=admin123456
6 注册服务并开机自启
[root@localhost src]# cd /etc/systemd/system
[root@localhost system]# vi minio.service
[Unit]
Description=Minio
Documentation=https://docs.min.io
Wants=network-online.target
After=network-online.target
[Service]
# User and group
User=root
Group=root
EnvironmentFile=/opt/minio/conf/minio.conf
ExecStart=/opt/minio/minio server $MINIO_OPTS
ExecReload=/bin/kill -HUP $MAINPID
# Let systemd restart this service always
Restart=always
# Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=65536
TimeoutStopSec=5
SendSIGKILL=no
SuccessExitStatus=0 1
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=minio
[Install]
WantedBy=multi-user.target
保存退出
刷新服务配置
[root@localhost system]# systemctl daemon-reload
启动
[root@localhost minio]# systemctl start minio
停止
[root@localhost minio]# systemctl stop minio
设置开机自启
[root@localhost system]# systemctl enable minio
查看状态
[root@localhost system]# systemctl status minio
7 创建key
浏览器登录地址:主机IP:9001
用户名:minioadmin
密码:minioadmin
点击左侧Access Keys,点击Create access key
z7EUdMhiTAMS1nQe6I3i
ufhlIfdNj7LufEXDHyhhobr6gYMQokjHgb6zRi38
附录
参考文档
https://blog.csdn.net/qq_24950043/article/details/136068964
本站资源均来自互联网,仅供研究学习,禁止违法使用和商用,产生法律纠纷本站概不负责!如果侵犯了您的权益请与我们联系!
转载请注明出处: 免费源码网-免费的源码资源网站 » Centos安装Minio
发表评论 取消回复