Installation Minio in Unix/Linux

MinIO — server object storage released under Apache License v2.0, which is compatible with the cloud storage service Amazon S3. It is best suited for storing unstructured data such as photos, videos, log files, backups and images of the containers/virtual machines. The size of the object can vary from a few KB to 5ТБ max.

Installation Minio using Docker on Unix/Linux

One of the easiest ways to start Minio is to use Docker. But first, install Docker:

Installing Docker in Debian/Ubuntu

Install Docker in CentOS/RedHat/Fedora

Taking stable image:

$ docker pull minio/minio

Run:

$ docker run-p 9000:9000 minio/minio server /data

For ease of use, you can use docker-compose the file, for example:

minio: image: minio/minio hostname: minio container_name: minio command: server /data volumes: - /opt/minio:/data ports: - 9000:9000

To run the command:

$ docker-compose up-d

The service will be available at:

http://localhost:9000

If done correctly, you will see the web interface for login enter the username and password. Data will be generated by the machine and you can find them at /opt/minio.

Installation Minio using Kubernetes in Unix/Linux

Set by kubectl, for this pose:

apiVersion: v1 kind: PersistentVolumeClaim metadata: # This name uniquely identifies the PVC. Will be used in deployment below. name: minio-pv-claim labels: app: minio-storage-claim spec: # Read more about access modes here: https://kubernetes.io/docs/user-guide/persistent-volumes/#access-modes accessModes: - ReadWriteOnce resources: # This is the request for storage. Should be available in the cluster. requests: storage: 500Gi # Uncomment and add storageClass specific to your requirements below. Read more https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class-1 #storageClassName: --- apiVersion: extensions/v1beta1 kind: Deployment metadata: # This name uniquely identifies the Deployment name: minio-deployment spec: strategy: type: Recreate template: metadata: labels: # Label is used as selector in the service. app: minio spec: # Refer to the PVC created earlier volumes: - name: storage persistentVolumeClaim: # Name of the PVC created earlier claimName: minio-pv-claim containers: - name: minio # MinIO Pulls the default image from Docker Hub image: minio/minio args: - server - /storage env: # MinIO access key and secret key - name: MINIO_ACCESS_KEY value: "MINIO_ACCESS_KEY" - name: MINIO_SECRET_KEY value: "MINIO_SECRET_KEY" ports: - containerPort: 9000 # Mount the volume into the pod volumeMounts: - name: storage # must match the volume name, above mountPath: "/storage" --- apiVersion: v1 kind: Service metadata: name: minio-service spec: type: LoadBalancer ports: - port: 9000 targetPort: 9000 protocol: TCP selector: app: minio

If you want to run in distribut-fashion:

apiVersion: v1 kind: Service metadata: name: minio labels: app: minio spec: clusterIP: None ports: - port: 9000 name: minio selector: app: minio --- apiVersion: apps/v1beta1 kind: StatefulSet metadata: name: minio spec: serviceName: minio replicas: 4 template: metadata: labels: app: minio spec: containers: - name: minio env: - name: MINIO_ACCESS_KEY value: "MINIO_ACCESS_KEY" - name: MINIO_SECRET_KEY value: "MINIO_SECRET_KEY" image: minio/minio args: - server - http://minio-{0...3}.minio.default.svc.cluster.local/data ports: - containerPort: 9000 # These volume mounts are persistent. Each pod in the PetSet # gets a mounted volume based on this field. volumeMounts: - name: data mountPath: /data # These are converted to volume claims by the controller # and mounted at the paths mentioned above. volumeClaimTemplates: - metadata: name: data spec: accessModes: - ReadWriteOnce resources: requests: storage: 500Gi # Uncomment and add storageClass specific to your requirements below. Read more https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class-1 #storageClassName: --- apiVersion: v1 kind: Service metadata: name: minio-service spec: type: LoadBalancer ports: - port: 9000 targetPort: 9000 protocol: TCP selector: app: minio

Run:

$ kubectl create-f minio-deployment.yaml

Installed using helm:

$ helm install stable/minio

Or run in a distributed fashion:

$ helm install --set mode=distributed,replicas=4 stable/minio

That’s all.

Installation on MacOS Minio

To begin with we put HOMEBREW and then running:

$ brew install minio/stable/minio

PS: you Can run the following command:

$ sudo wget -O /usr/local/bin/minio https://dl.min.io/server/minio/release/darwin-amd64/minio &&  sudo chmod 755 /usr/local/bin/minio

To start running:

$ minio server /data

Also, you can install minio client, to do this, run:

$ brew install minio/stable/mc

That’s all!

Installation Minio in Linux

To install Minio in Linux OS, run:

$ sudo wget -O /usr/local/bin/minio https://dl.min.io/server/minio/release/linux-amd64/minio &&  sudo chmod +x /usr/local/bin/minio

Also, you can install minio client:

$ sudo wget -O /usr/local/bin/mc https://dl.min.io/client/mc/release/linux-amd64/mc &&  sudo chmod +x /usr/local/bin/mc

Note: If you want to use ppc64le architecture:

$ sudo wget -O /usr/local/bin/minio https://dl.min.io/server/minio/release/linux-ppc64le/minio &&  sudo chmod +x /usr/local/bin/minio

To start running:

$ minio server /data

That’s all!

The use of Minio in Unix/Linux

Minio can be used for various huskison. Will give a few examples.

Using Minio with Terraform in Unix/Linux

Do the backend for Terraforma in the following way:

terraform { backend "s3" { bucket = "terraform-state" key = "dev/terraform.tfstate" region = "us-east-1" access_key = "MINIO_ACCESS_KEY" secret_key = "MINIO_SECRET_KEY" endpoint = "http://localhost:9000" skip_credentials_validation = true force_path_style = true } }

Can juzat.

That’s all, “Install Minio in Unix/Linux” is finished!

Source: linux-notes.org

(Visited 12 times, 1 visits today)