CentOS 离线 RPM 安装 MinIO
下载 rpm 包:https://dl.min.io/server/minio/release/linux-amd64/
安装
shell
[root@localhost ~]# rpm -ivh minio-20231016041343.0.0.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:minio-0:20231016041343.0.0-1 ################################# [100%]
[root@localhost ~]#
设置 minio 的启动用户
shell
# .rpm 包安装的方式会自动创建下面这个文件,ll 命令可能看不到,但可以 cat 命令查看其内容。
vi /usr/lib/systemd/system/minio.service
# 进入编辑模式,将 User 和 Group 都修改为 root,然后保存退出
代码片段如下:
shell
User=root
Group=root
创建环境变量文件
shell
# 创建数据存储目录
mkdir -p /home/minio/data
# 创建minio启动配置文件,进入编辑模式
vi /etc/default/minio
shell
# MINIO_ROOT_USER and MINIO_ROOT_PASSWORD sets the root account for the MinIO server.
# This user has unrestricted permissions to perform S3 and administrative API operations on any resource in the deployment.
# Omit to use the default values 'minioadmin:minioadmin'.
# MinIO recommends setting non-default values as a best practice, regardless of environment
MINIO_ROOT_USER=admin
MINIO_ROOT_PASSWORD=12345678
# MINIO_VOLUMES sets the storage volume or path to use for the MinIO server.
MINIO_VOLUMES="/home/minio/data"
#MINIO_VOLUMES="/mnt/data"
# MINIO_OPTS sets any additional commandline options to pass to the MinIO server.
# For example, `--console-address :9001` sets the MinIO Console listen port
MINIO_OPTS="--address :9000 --console-address :9001"
# MINIO_SERVER_URL sets the hostname of the local machine for use with the MinIO Server
# MinIO assumes your network control plane can correctly resolve this hostname to the local machine
# Uncomment the following line and replace the value with the correct hostname for the local machine and port for the MinIO server (9000 by default).
#MINIO_SERVER_URL="http://minio.example.net:9000"
保存,并退出编辑。
shell
# 设置开机自启动
systemctl enable minio
# 启动
systemctl start minio
# 查看状态
systemctl status minio
访问
S3-API: http://127.0.0.1:9000
网页 Console: http://127.0.0.1:9001