An Interest In:
Web News this Week
- April 27, 2024
- April 26, 2024
- April 25, 2024
- April 24, 2024
- April 23, 2024
- April 22, 2024
- April 21, 2024
MinIO on OpenBSD 7.2: Install
Summary
MinIO is one of object storage suites compatible with AWS S3.
It is written in Go (Golang) and offers high performance.
It is also open source, and available as backend object storage service on private cloud and so on.
This post shows how to install it on OpenBSD and publish it as service. It's easy, because MinIO is offered via Ports :)
Environment
- OS: OpenBSD 7.2
- Object Storage: MinIO 0.20220826
Tutorial
Install via package manager
Just run:
$ doas pkg_add minio
The output was:
quirks-6.42 signed on 2023-01-08T01:39:04Zuseradd: Warning: home directory `/var/minio' doesn't exist, and -m was not specifiedminio-0.20220826: okThe following new rcscripts were installed: /etc/rc.d/minioSee rcctl(8) for details.New and changed readme(s): /usr/local/share/doc/pkg-readmes/minio
Daemon is ready
You will see /etc/rc.d/minio
was created. The daemon control script starts with:
#!/bin/kshdaemon="/usr/local/bin/minio server"daemon_flags="/var/minio/export"daemon_user="_minio"(...)
Look at daemon_flags
./var/minio/export
is created at minio installation.
It means minio data will be stored there.
Well, the minio directory is here:
$ doas ls -aR /var/minio
The output was:
doas ls -aR /var/minio/var/minio:. .. export/var/minio/export:. ..
Has been unused yet.
Be careful the daemon listens to egress by default
Let's see /usr/local/share/doc/pkg-readmes/minio
.
According to it:
Its API/web interface is accessible by default on port 9000, listening on all
network interfaces.
It means the minio daemon by default listens to egress
and is open to all packets on the external interface.
Extend file limits (Optional)
The readme also says:
Bumping file limits
===================Per https://github.com/minio/minio-service it is advised to run minio with more
file descriptors than what is allowed by the default daemon login class.Add this to the login.conf(5) file if you want to bump those limits:
minio:\ :openfiles-cur=4096:\ :openfiles-max=8192:\ :tc=daemon:
Refer to https://docs.minio.io/ for more details on how to run minio.
In order to extend the limit, edit /etc/login.conf
to append the lines below:
+ minio:\+ :openfiles-cur=4096:\+ :openfiles-max=8192:\+ :tc=daemon:
Then run to update the database:
$ doas cap_mkdb /etc/login.conf
It updates /etc/login.conf.db
which is effective for performance improvement especially on very large /etc/login.conf
.
Activate daemon
Let's activate the daemon:
$ doas rcctl enable miniominio(ok)
The run it:
$ doas rcctl start miniominio(ok)
Besides, alternatively, you may use -f
option to run the server on trial with keeping the daemon deactivated:
$ doas rcctl -f start miniominio(ok)
Is minio started ?
Let's see the directory again:
$ doas ls -a /var/minio
The output was:
. .. .minio export
.minio
is created !!
In addition, with ls -aR /var/minio
, you will see many files were created ;)
Conclusion
How is networking on the daemon ? Run to check:
$ curl 127.0.0.1:9000
The output was:
<?xml version="1.0" encoding="UTF-8"?><Error><Code>AccessDenied</Code><Message>Access Denied.</Message><Resource>/</Resource><RequestId>(...)</RequestId><HostId>(...)</HostId></Error>
Actually, it was "Bad Request". It should be confirmed with this:
$ curl -I 127.0.0.1:9000
It returned:
HTTP/1.1 400 Bad RequestAccept-Ranges: bytesContent-Length: 261Content-Type: application/xmlServer: MinIOVary: OriginDate: Wed, 11 Jan 2023 14:40:57 GMT
It's OK, because our minio server is just installed.
Congratulations for now !!!
Configuration should be followed at the next step.
What is important here is it gave response !!!
Let's see it also works to an external request:
$ curl <minio-ip>:9000
Response gotten ? :)
Original Link: https://dev.to/nabbisen/minio-on-openbsd-72-install-3b3h
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To