How to configure multiple locations on minio in CentOS
To Configure Multiple Locations on Minio in CentOS
Minio is an open-source object storage server that stores unstructured data like photos, videos, virtual machine images, containers, and log files as objects. In one of our previous articles, we covered the method to install and configure system services for Minio, now in this tutorial you will learn how to configure multiple locations on Minio in CentOS 7.
If you have missed our previous tutorials on Minio, you can check them out from the following links:
To install Minio in CentOS 7: https://www.linuxhelp.com/how-to-install-minio-server-on-centos-7/
To configure system services in Minio in CentOS 7:https://www.linuxhelp.com/how-to-configure-system-services-for-minio-on-centos-7/
Installing Minio
First, create a minio file in default location by making use of the following command.
[root@linuxhelp ~]# vim /etc/default/minio
And in that file, you need to add the following lines.
MINIO_VOLUMES=tmpdata
MINIO_OPTS=--address 9000
MINIO_VOLUMES1=opt
MINIO_OPTS1=--address 9001
And then, create a new file called (minio.service) in systemd location for configuring the daemon. Here the following command is used for this purpose.
[root@linuxhelp ~]# vim etc/systemd/system/minio.service
And in that file , add the following lines
[Unit]
Description=Minio
Documentation=httpsdocs.minio.io
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=usrlocalbinminio
[Service]
WorkingDirectory=usrlocal
User=root
Group=root
PermissionsStartOnly=true
EnvironmentFile=-etcdefaultminio
ExecStartPre=binbash -c [ -n ${MINIO_VOLUMES} ] echo Variable MINIO_VOLUMES not set in etcdefaultminio
ExecStart=usrlocalbinminio server $MINIO_OPTS $MINIO_VOLUMES
StandardOutput=journal
StandardError=inherit
LimitNOFILE=65536
TimeoutStopSec=0
KillSignal=SIGTERM
SendSIGKILL=no
SuccessExitStatus=0
[Install]
WantedBy=multi-user.target
Once it is done, you need to create another file(minio1.service) in systemd location for configuring daemon. So make use if the following command.
[root@linuxhelp ~]# vim etc/systemd/system/minio1.service
And in file, you need to add the following
[Unit]
Description=Minio
Documentation=httpsdocs.minio.io
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=usrlocalbinminio
[Service]
WorkingDirectory=usrlocal
User=root
Group=root
PermissionsStartOnly=true
EnvironmentFile=-etcdefaultminio
ExecStartPre=binbash -c [ -n ${MINIO_VOLUMES1} ] echo Variable MINIO_VOLUMES1 not set in etcdefaultminio
ExecStart=usrlocalbinminio server $MINIO_OPTS1 $MINIO_VOLUMES1
StandardOutput=journal
StandardError=inherit
LimitNOFILE=65536
TimeoutStopSec=0
KillSignal=SIGTERM
SendSIGKILL=no
SuccessExitStatus=0
[Install]
WantedBy=multi-user.target
Once it is done, you need to reload the daemon by making use of the following command.
[root@linuxhelp ~]# systemctl daemon-reload
And then, enable minio, minio1 service which we have configured earlier. Run the following commands for the same purpose.
[root@linuxhelp ~]# systemctl enable minio
Created symlink from etc/systemd/system/multi-user.target wants minio.service to etc/systemd/system/minio.service.
[root@linuxhelp ~]# systemctl enable minio1
Created symlink from etc/systemd/system/multi-user.target. wants minio1.service to etc/systemd/system/minio1.service.
And then, start the minio and minio1 services by triggering the following commands.
[root@linuxhelp ~]# systemctl start minio minio1
Afterwards, check the status for minio and minio1 service by making use of the following commands.
[root@linuxhelp ~]# systemctl status minio minio1
minio.service - Minio
Loaded loaded (etcsystemdsystemminio.service enabled vendor preset disabled)
Active active (running) since Thu 2017-12-21 073837 EST 14min ago
Docs httpsdocs.minio.io
Main PID 10409 (minio)
CGroup system.sliceminio.service
+-10409 usrlocalbinminio server --address 9000 tmpdata
Dec 21 073839 linuxhelp.com minio[10409] http192.168.7.2389000 http192.168....00
Dec 21 073839 linuxhelp.com minio[10409] Command-line Access httpsdocs.minio.io...de
Dec 21 073839 linuxhelp.com minio[10409] $ mc config host add myminio http192.16...10
Dec 21 073839 linuxhelp.com minio[10409] Object API (Amazon S3 compatible)
Dec 21 073839 linuxhelp.com minio[10409] Go httpsdocs.minio.iodocsgol...de
Dec 21 073839 linuxhelp.com minio[10409] Java httpsdocs.minio.iodocsjav...de
Dec 21 073839 linuxhelp.com minio[10409] Python httpsdocs.minio.iodocspyt...de
Dec 21 073839 linuxhelp.com minio[10409] JavaScript httpsdocs.minio.iodocsjav...de
Dec 21 073839 linuxhelp.com minio[10409] .NET httpsdocs.minio.iodocsdot...de
Dec 21 073839 linuxhelp.com minio[10409] Drive Capacity 18 GiB Free, 22 GiB Total
minio1.service - Minio
Loaded loaded (etcsystemdsystemminio1.service enabled vendor preset disabled)
Active active (running) since Thu 2017-12-21 064748 EST 1h 5min ago
Docs httpsdocs.minio.io
Main PID 8602 (minio)
CGroup system.sliceminio1.service
+-8602 usrlocalbinminio server --address 9001 opt
Dec 21 064750 linuxhelp.com minio[8602] $ mc config host add myminio http192.168...VV
Dec 21 064750 linuxhelp.com minio[8602] Object API (Amazon S3 compatible)
Dec 21 064750 linuxhelp.com minio[8602] Go httpsdocs.minio.iodocsgola...de
Dec 21 064750 linuxhelp.com minio[8602] Java httpsdocs.minio.iodocsjava...de
Dec 21 064750 linuxhelp.com minio[8602] Python httpsdocs.minio.iodocspyth...de
Dec 21 064750 linuxhelp.com minio[8602] JavaScript httpsdocs.minio.iodocsjava...de
Dec 21 064750 linuxhelp.com minio[8602] .NET httpsdocs.minio.iodocsdotn...de
Dec 21 064750 linuxhelp.com minio[8602] Drive Capacity 19 GiB Free, 22 GiB Total
Dec 21 072707 linuxhelp.com minio[8602] time=2017-12-21T072707-0500 level=erro...]
Dec 21 072709 linuxhelp.com minio[8602] time=2017-12-21T072709-0500 level=erro...]
Some lines are in ellipsis, use -l to show in full.
[root@linuxhelp ~]# systemctl status minio minio1 -l
minio.service - Minio
Loaded loaded (etcsystemdsystemminio.service enabled vendor preset disabled)
Active active (running) since Thu 2017-12-21 073837 EST 15min ago
Docs httpsdocs.minio.io
Main PID 10409 (minio)
CGroup system.sliceminio.service
+-10409 usrlocalbinminio server --address 9000 tmpdata
Dec 21 073839 linuxhelp.com minio[10409] http192.168.7.2389000 http192.168.122.19000 http127.0.0.19000
Dec 21 073839 linuxhelp.com minio[10409] Command-line Access httpsdocs.minio.iodocsminio-client-quickstart-guide
Dec 21 073839 linuxhelp.com minio[10409] $ mc config host add myminio http192.168.7.2389000 admin12345 12345678910
Dec 21 073839 linuxhelp.com minio[10409] Object API (Amazon S3 compatible)
Dec 21 073839 linuxhelp.com minio[10409] Go httpsdocs.minio.iodocsgolang-client-quickstart-guide
Dec 21 073839 linuxhelp.com minio[10409] Java httpsdocs.minio.iodocsjava-client-quickstart-guide
Dec 21 073839 linuxhelp.com minio[10409] Python httpsdocs.minio.iodocspython-client-quickstart-guide
Dec 21 073839 linuxhelp.com minio[10409] JavaScript httpsdocs.minio.iodocsjavascript-client-quickstart-guide
Dec 21 073839 linuxhelp.com minio[10409] .NET httpsdocs.minio.iodocsdotnet-client-quickstart-guide
Dec 21 073839 linuxhelp.com minio[10409] Drive Capacity 18 GiB Free, 22 GiB Total
minio1.service - Minio
Loaded loaded (etcsystemdsystemminio1.service enabled vendor preset disabled)
Active active (running) since Thu 2017-12-21 064748 EST 1h 6min ago
Docs httpsdocs.minio.io
Main PID 8602 (minio)
CGroup system.sliceminio1.service
+-8602 usrlocalbinminio server --address 9001 opt
Dec 21 064750 linuxhelp.com minio[8602] $ mc config host add myminio http192.168.7.2389001 EXNMK32WM4YGJFX9UJP5 RQnAKSUblzeASFga5nb6Eu4D5plrbtdoz913VV
Dec 21 064750 linuxhelp.com minio[8602] Object API (Amazon S3 compatible)
Dec 21 064750 linuxhelp.com minio[8602] Go httpsdocs.minio.iodocsgolang-client-quickstart-guide
Dec 21 064750 linuxhelp.com minio[8602] Java httpsdocs.minio.iodocsjava-client-quickstart-guide
Dec 21 064750 linuxhelp.com minio[8602] Python httpsdocs.minio.iodocspython-client-quickstart-guide
Dec 21 064750 linuxhelp.com minio[8602] JavaScript httpsdocs.minio.iodocsjavascript-client-quickstart-guide
Dec 21 064750 linuxhelp.com minio[8602] .NET httpsdocs.minio.iodocsdotnet-client-quickstart-guide
Dec 21 064750 linuxhelp.com minio[8602] Drive Capacity 19 GiB Free, 22 GiB Total
Dec 21 072707 linuxhelp.com minio[8602] time=2017-12-21T072707-0500 level=error msg=Unable to login request from [1]33510 cause=Authentication failed, check your access credentials source=[web-handlers.go352(webAPIHandlers).Login()]
Dec 21 072709 linuxhelp.com minio[8602] time=2017-12-21T072709-0500 level=error msg=Unable to login request from [1]33510 cause=Authentication failed, check your access credentials source=[web-handlers.go352(webAPIHandlers).Login()]
After that, you need to start the service to check, open the browser and give URL as http://localhost:9000, login page, give access and secret key and click login.
The Minio browser opens with the first location configured in minio
open a new tab and give URL as http://localhost:9001, login page, give access and secret key and click login.
Minio browser opens with the second location configured in minio
With this, the method to configure multiple locations in Minio comes to an end.
Comments ( 0 )
No comments available