环境:
OS:Centos 7
1.下载minio
下载地址如下
wget https://dl.min.io/server/minio/release/linux-amd64/
2.安装
[root@host135 milvus]# rpm -ivh minio-20240803043323.0.0-1.x86_64.rpm Preparing... ################################# [100%] Updating / installing... 1:minio-20240803043323.0.0-1 ################################# [100%]
3.创建默认配置文件
vi /etc/default/minio
配置文件内容如下(注意端口冒号前有个空格):
MINIO_ROOT_USER=minioadmin MINIO_ROOT_PASSWORD=minioadmin MINIO_OPTS="--address :9000 --console-address :9090" MINIO_VOLUMES="/home/middle/minio/data"
说明:
MINIO_VOLUMES参数指定的目录不需要提前创建,服务启动后会自动创建
4.修改任务启动用户并启动服务
[root@host135 data]# more /usr/lib/systemd/system/minio.service [Unit] Description=MinIO Documentation=https://docs.min.io Wants=network-online.target After=network-online.target AssertFileIsExecutable=/usr/local/bin/minio [Service] Type=notify WorkingDirectory=/usr/local User=root Group=root ProtectProc=invisible EnvironmentFile=-/etc/default/minio 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=1048576 # Turn-off memory accounting by systemd, which is buggy. MemoryAccounting=no # Specifies the maximum number of threads this process can create TasksMax=infinity # Disable timeout logic and wait until process is stopped ##TimeoutSec=infinity TimeoutStopSec=infinity SendSIGKILL=no [Install] WantedBy=multi-user.target # Built for ${project.name}-${project.version} (${project.name})
说明:
1.参数TimeoutSec修改为TimeoutStopSec
2.用户和组修改为root
User=root
Group=root
5.启动服务
让修改的配置生效
systemctl daemon-reload
启动服务
systemctl start minio
设置开机启动
systemctl enable minio # 设置开机启动
systemctl disable minio # 取消开机启动
6.登录
访问 http://192.168.1.135:9090,使用 minioadmin/minioadmin 账户密码登录.
标签:minio,启动,rpm,minioadmin,systemctl,root,安装,MINIO From: https://www.cnblogs.com/hxlasky/p/18345126