赞
踩
- http://dl.minio.org.cn/server/minio/release/linux-amd64/minio
- mv minio /usr/bin/
- chmod +x /usr/bin/minio
- # 在宿主机上执行
- qemu-img create -f qcow2 -o size=20G,preallocation=metadata /home/data/KVM/M1_vdb_disk.img
- qemu-img create -f qcow2 -o size=20G,preallocation=metadata /home/data/KVM/M1_vdc_disk.img
- qemu-img create -f qcow2 -o size=20G,preallocation=metadata /home/data/KVM/M2_vdb_disk.img
- qemu-img create -f qcow2 -o size=20G,preallocation=metadata /home/data/KVM/M2_vdc_disk.img
- virsh attach-disk M1 /home/data/KVM/M1_vdb_disk.img vdb
- virsh attach-disk M2 /home/data/KVM/M2_vdb_disk.img vdb
- virsh attach-disk M1 /home/data/KVM/M1_vdc_disk.img vdc
- virsh attach-disk M2 /home/data/KVM/M2_vdc_disk.img vdc
- # 在两台服务器上都执行下面的操作
- # 分区
- fdisk /dev/vdb
- fdisk /dev/vdc
- # 格式化分区
- mkfs.xfs /dev/vdb1
- mkfs.xfs /dev/vdc1
- # 创建挂载目录
- mkdir /data1
- mkdir /data2
- # 挂载
- mount /dev/vdb1 /data1
- mount /dev/vdc1 /data1
- # 修改系统磁盘挂载配置文件
- vim /etc/fstab
- # 在文件末尾追加如下内容
- /dev/vdb1 /data1 xfs defaults 0 0
- /dev/vdc1 /data2 xfs defaults 0 0
- useradd -s /sbin/nologin -M minio
- chown -R minio:minio /data1
- chown -R minio:minio /data2
- # 在两台服务器上都准备该文件
- vim /etc/default/minio
-
- MINIO_ACCESS_KEY="admin"
- MINIO_SECRET_KEY="12345678"
- MINIO_VOLUMES="http://10.10.0.20/data1 http://10.10.0.20/data2 http://10.10.0.21/data1 http://10.10.0.21/data2"
- vim /usr/lib/systemd/system/minio.service
-
- [Unit]
- Description=Minio
- Documentation=https://docs.minio.io
- Wants=network-online.target
- After=network-online.target
- AssertFileIsExecutable=/usr/bin/minio
-
- [Service]
- WorkingDirectory=/usr/
-
- User=minio
- Group=minio
-
- PermissionsStartOnly=true
-
- EnvironmentFile=-/etc/default/minio
- ExecStartPre=/bin/bash -c "[ -n \"${MINIO_VOLUMES}\" ] || echo \"Variable MINIO_VOLUMES not set in /etc/default/minio\""
-
- ExecStart=/usr/bin/minio server $MINIO_VOLUMES
-
- StandardOutput=journal
- StandardError=inherit
-
- # 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=0
-
- # SIGTERM signal is used to stop Minio
- KillSignal=SIGTERM
-
- SendSIGKILL=no
-
- SuccessExitStatus=0
-
- [Install]
- WantedBy=multi-user.target
- systemctl daemon-reload
- systemctl enable minio
- systemctl start minio
- systemctl status minio
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。