Skip to content

Instantly share code, notes, and snippets.

@koolhead17
Last active April 8, 2017 14:39
Show Gist options
  • Save koolhead17/f6b11c965dbea52f2da46ea1919c4486 to your computer and use it in GitHub Desktop.
Save koolhead17/f6b11c965dbea52f2da46ea1919c4486 to your computer and use it in GitHub Desktop.
$ wget https://dl.minio.io/server/minio/release/linux-amd64/minio
$ chmod 755 minio
$ sudo cp minio /usr/local/bin/
$ whoami
  ubuntu
$ sudo su
# cat <<EOT >> /etc/default/minio
> MINIO_VOLUMES="/tmp/myvolume"
> EOT

Systemctl Setup

# cd /etc/systemd/system/
# wget https://raw.githubusercontent.com/minio/minio-service/master/linux-systemd/minio.service

After that I modified with my minio.service file, so local system user ubuntu and group ubuntu in my setup cpuld use it.

[Service]
WorkingDirectory=/usr/local/
User=ubuntu
Group=ubuntu

Changed permission for minio.service so my user ubuntu can execute it.

# chmod 755 minio.service 
# exit

Enable startup on boot

$ sudo systemctl enable minio.service

Test it all.

$ sudo service minio restart
$ sudo service minio status
● minio.service - Minio
   Loaded: loaded (/etc/systemd/system/minio.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2017-04-08 20:00:16 IST; 4s ago
     Docs: https://docs.minio.io
  Process: 1495 ExecStartPre=/bin/bash -c [ -n "${MINIO_VOLUMES}" ] || echo "Variable MINIO_VOLUMES not set in /etc/default/minio" (code=exited, status=0/SUCC
 Main PID: 1498 (minio)
    Tasks: 6
   Memory: 6.9M
      CPU: 43ms
   CGroup: /system.slice/minio.service
           └─1498 /usr/local/bin/minio server /tmp/myvolume

Apr 08 20:00:17 ubuntu minio[1498]: Browser Access:
Apr 08 20:00:17 ubuntu minio[1498]:    http://10.0.0.5:9000  http://127.0.0.1:9000
Apr 08 20:00:17 ubuntu minio[1498]: Command-line Access: https://docs.minio.io/docs/minio-client-quickstart-guide
Apr 08 20:00:17 ubuntu minio[1498]:    $ mc config host add myminio http://10.0.0.5:9000 ZD8JWSNUPWZOGBBORENB iFq/bK9Ov8fwSwSVlxuB1EqHNnVcU+phfrHjT0i7
Apr 08 20:00:17 ubuntu minio[1498]: Object API (Amazon S3 compatible):
Apr 08 20:00:17 ubuntu minio[1498]:    Go:         https://docs.minio.io/docs/golang-client-quickstart-guide
Apr 08 20:00:17 ubuntu minio[1498]:    Java:       https://docs.minio.io/docs/java-client-quickstart-guide
Apr 08 20:00:17 ubuntu minio[1498]:    Python:     https://docs.minio.io/docs/python-client-quickstart-guide
Apr 08 20:00:17 ubuntu minio[1498]:    JavaScript: https://docs.minio.io/docs/javascript-client-quickstart-guide
Apr 08 20:00:17 ubuntu minio[1498]: Drive Capacity: 5.1 GiB Free, 7.0 GiB Total
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment