首页 > 系统相关 >CentOs上安装minio

CentOs上安装minio

时间:2024-05-11 13:57:12浏览次数:19  
标签:MinIO CentOs local service user 安装 MINIO minio

MINIO安装

一、下载二进制文件

wget https://dl.minio.org.cn/server/minio/release/linux-amd64/minio

 

二、授权,并移动到指定目录

chmod +x minio

sudo mv minio /usr/local/bin/

 

二、创建服务文件

/usr/lib/systemd/system/minio.service

 

内容如下:

 

[Unit]

Description=MinIO

Documentation=https://minio.org.cn/docs/minio/linux/index.html

Wants=network-online.target

After=network-online.target

AssertFileIsExecutable=/usr/local/bin/minio

 

[Service]

WorkingDirectory=/usr/local

 

User=minio-user

Group=minio-user

ProtectProc=invisible

 

EnvironmentFile=-/etc/default/minio

ExecStartPre=/bin/bash -c "if [ -z \"${MINIO_VOLUMES}\" ]; then echo \"Variable MINIO_VOLUMES not set in /etc/default/minio\"; exit 1; fi"

ExecStart=/usr/local/bin/minio server $MINIO_OPTS $MINIO_VOLUMES

 

# MinIO RELEASE.2023-05-04T21-44-30Z adds support for Type=notify (https://www.freedesktop.org/software/systemd/man/systemd.service.html#Type=)

# This may improve systemctl setups where other services use `After=minio.server`

# Uncomment the line to enable the functionality

# Type=notify

 

# Let systemd restart this service always

Restart=always

 

# Specifies the maximum file descriptor number that can be opened by this process

LimitNOFILE=65536

 

# Specifies the maximum number of threads this process can create

TasksMax=infinity

 

# Disable timeout logic and wait until process is stopped

TimeoutStopSec=infinity

SendSIGKILL=no

 

[Install]

WantedBy=multi-user.target

 

# Built for ${project.name}-${project.version} (${project.name})

 

三、创建用户和组

minio.service 文件默认以 minio-user 用户和组身份运行。 您可以使用 groupadd 和 useradd``命令创建用户和组. 以下示例创建用户、组并设置权限以访问MinIO预定用于存储的文件夹路径。 这些命令通常需要管理员 (``sudo) 权限。

groupadd -r minio-user

useradd -M -r -g minio-user minio-user

 

创建文件存储目录

mkdir /home/minio

chown minio-user:minio-user /home/minio

 

四、创建环境变量文件

/etc/default/minio

内容:

# 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=minioadmin

MINIO_ROOT_PASSWORD=minioadmin

 

# MINIO_VOLUMES sets the storage volume or path to use for the MinIO server.

 

MINIO_VOLUMES="/mnt/data"

 

# MINIO_OPTS sets any additional commandline options to pass to the MinIO server.

# 例如, `--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"

 

五、启动服务

sudo systemctl enable minio.service

sudo systemctl start minio.service

 

六、查询服务是否正常

sudo systemctl status minio.service

journalctl -f -u minio.service

 

 

标签:MinIO,CentOs,local,service,user,安装,MINIO,minio
From: https://www.cnblogs.com/hdwang/p/18186373

相关文章

  • AIX7100-安装JDK1.8
    上传java8_64.zip解压java8_64.zip链接:https://pan.baidu.com/s/1ALnhiXLkDWbbhyfCf8djVQ?pwd=hz28提取码:hz28#cd/usr/local/#unzipjava8_64.zip#vi/etc/profile#find/usr/local/java8_64-name"java"-typef/usr/local/java8_64/jre/bin/java"......
  • Consul安装
    1.1Win安装选择我们想要下载的版本点击下载,如果芯片是AMD选择右边下载。解压下载的文件进入解压之后的文件查看是否成功安装consulagent-dev-dev表示开发模式运行,另外还有-server表示服务模式运行前端查看:1.2CentOS安装1.查看系统芯片架构:arch2.安装解压......
  • centOS8上安装Mysql 8.0.26
    1、Mysql官网下载RPM包wgethttps://dev.mysql.com/get/mysql80-community-release-el8-1.noarch.rpm2、检查是否已安装(强力卸载)foriin$(rpm-qa|grepmysql);dorpm-e$i--nodeps;donerm-rf/var/lib/mysql&&rm-rf/etc/my.cnf&&rm-rf/usr/share/mysql备注:可配合......
  • 物理机centos7.9扩展网卡
    前段时间装了一台机器,系统是centos7.9,主板自带两个网口,不够用,又插了一块Inter芯片的4口pcie网卡,重启系统后,使用ipa查看ip信息,网卡直接识别到了,但/etc/sysconfig/network-scripts/目录里没有网卡配置文件,需要手动创建这些文件:#进入目录[root@localhost~]#cd/etc/sysconfig......
  • installshield 安装jdk并配置环境变量
    今天来通过installshield安装jdk以及配置环境变量,本质上是调用第三方安装程序。首先将jdk的安装文件添加到我们的安装程序中然后编写我们的脚本选择BEHAVIORANDLOGIC->InstallScript->Setup.Rul->AfterMoveData->OnFirstUIAfter,如图OnFirstUIAfter脚本如下点击查看代......
  • Nginx访问本地静态资源(附Windows环境安装教程)
    目前市面上主流的三款Nginx,Apache和TomcatWeb服务器软件HTTP服务器本质上也是一种应用程序——它通常运行在服务器之上,绑定服务器的IP地址并监听某一个TCP端口来接收并处理HTTP请求,这样客户端(如Firefox,Chrome这样的浏览器)就能通过HTTP协议获取服务器上的网页(HTML格式)、文档(PDF格......
  • Hive安装与搭建
    Hive安装搭建1、上传解压配置环境变量#1、解压tar-zxvfapache-hive-3.1.2-bin.tar.gz-C/usr/soft/#2、重名名mvapache-hive-3.1.2-binhive-3.1.2#3、配置环境变量vim/etc/profile#4、在最后增加配置exportHIVE_HOME=/usr/local/soft/hive-3.1.2exportPA......
  • 如何在AlmaLinux服务器中安装 VirtualBox 7.0
    https://www.a5idc.net/helpview_1331.html目前由Oracle拥有和维护的OracleVMVirtualBox是世界上最受欢迎的开源虚拟化平台,它使用户能够从底层计算机硬件创建虚拟机。VirtualBox是第2类管理程序,这意味着它安装在现有操作系统(如Windows或Linux)之上,以创建模拟CPU、RAM......
  • JAVA下载安装配置基础
    JAVA下载安装配置基础JDK、JRE、JVMJDK:JavaDevelopmentKitJava开发者工具,他包含JRE和JVMJRE:JavaRuntimeEnvironmentJava运行时环境包含JVMJVM:JAVAVirtualMachineJave虚拟机下载配置JDK搜索下载JDK8(目前使用率较高的版本)安装JDK记住安装的路径进入高......
  • CentOS安装Docker
    CentOS安装Docker今天又重新安装了docker,复习回顾了一下安装过程。这个安装过程还是轻松的,毕竟有官方文档指导Docker文档。这里值得注意的是在linux上安装安装的是DockerEngine,这里有介绍说:DockerEngine是一种开源容器化技术,用于构建和容器化应用程序。Docker引擎充当客......