mirror of
https://github.com/minio/minio.git
synced 2024-12-23 21:55:53 -05:00
dist: Moved systemd scripts to minio-systemd. (#3136)
Removing this from the repo.
This commit is contained in:
parent
490159ea89
commit
62dcee3b14
51
dist/linux-systemd/distributed/README.md
vendored
51
dist/linux-systemd/distributed/README.md
vendored
@ -1,51 +0,0 @@
|
||||
|
||||
- Systemd script is configured to run the binary from /usr/share/minio/bin/.
|
||||
```sh
|
||||
$ mkdir -p /usr/share/minio/bin/
|
||||
```
|
||||
|
||||
- Download the binary. Find the relevant links for the binary at https://minio.io/downloads/#minio-server.
|
||||
```sh
|
||||
$ wget -O /usr/share/minio/bin/minio https://dl.minio.io/server/minio/release/linux-amd64/minio
|
||||
```
|
||||
|
||||
- Give execute permission to the Minio binary.
|
||||
```sh
|
||||
$ chmod +x /usr/share/minio/bin/minio
|
||||
```
|
||||
|
||||
- Create user minio. Systemd is configured with User=minio .
|
||||
```sh
|
||||
$ useradd minio
|
||||
```
|
||||
|
||||
- Create the Environment configuration file.
|
||||
```sh
|
||||
$ cat <<EOT >> /etc/default/minio.conf
|
||||
```
|
||||
|
||||
```
|
||||
# Remote node configuration.
|
||||
MINIO_VOLUMES=node1:/tmp/drive1 node2:/drive1 node3:/tmp/drive1 minio4:/tmp/drive1
|
||||
# Use if you want to run Minio on a custom port.
|
||||
MINIO_OPTS="--address :9199"
|
||||
# Access Key of the server.
|
||||
MINIO_ACCESS_KEY=Server-Access-Key
|
||||
# Secret key of the server.
|
||||
MINIO_SECRET_KEY=Server-Secret-Key
|
||||
|
||||
EOT
|
||||
```
|
||||
|
||||
- Download and put `minio.service` in `/etc/systemd/system/`
|
||||
```sh
|
||||
$ ( cd /etc/systemd/system/; curl -O https://raw.githubusercontent.com/minio/minio/master/dist/linux-systemd/distributed/minio.service )
|
||||
```
|
||||
- Enable startup on boot.
|
||||
```sh
|
||||
$ systemctl enable minio.service
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
40
dist/linux-systemd/distributed/minio.service
vendored
40
dist/linux-systemd/distributed/minio.service
vendored
@ -1,40 +0,0 @@
|
||||
[Unit]
|
||||
Description=Minio
|
||||
Documentation=https://docs.minio.io
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
AssertFileIsExecutable=/usr/share/minio/bin/minio
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/usr/share/minio/
|
||||
|
||||
User=minio
|
||||
Group=minio
|
||||
|
||||
PermissionsStartOnly=true
|
||||
|
||||
EnvironmentFile=-/etc/default/minio.conf
|
||||
ExecStartPre=/bin/bash -c "[ -n \"${MINIO_VOLUMES}\" ] || echo \"Variable MINIO_VOLUMES not set in /etc/defaults/minio.conf\""
|
||||
|
||||
ExecStart=/usr/share/minio/bin/minio server $MINIO_OPTS $MINIO_VOLUMES
|
||||
|
||||
StandardOutput=journal
|
||||
StandardError=inherit
|
||||
|
||||
# Specifies the maximum file descriptor number that can be opened by this process
|
||||
LimitNOFILE=65536
|
||||
|
||||
# Disable timeout logic and wait until process is stopped
|
||||
TimeoutStopSec=0
|
||||
|
||||
# SIGTERM signal is used to stop Minio
|
||||
KillSignal=SIGTERM
|
||||
|
||||
SendSIGKILL=no
|
||||
|
||||
SuccessExitStatus=0
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
# Built for ${project.name}-${project.version} (${project.name})
|
50
dist/linux-systemd/minio.service
vendored
50
dist/linux-systemd/minio.service
vendored
@ -1,50 +0,0 @@
|
||||
[Unit]
|
||||
Description=Minio
|
||||
Documentation=https://docs.minio.io
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
AssertPathExists=/etc/minio/
|
||||
AssertFileIsExecutable=/usr/share/minio/bin/minio
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/usr/share/minio/
|
||||
|
||||
User=minio
|
||||
Group=minio
|
||||
|
||||
PermissionsStartOnly=true
|
||||
|
||||
EnvironmentFile=-/etc/default/minio
|
||||
ExecStartPre=/bin/bash -c "[ -n \"${MINIO_VOLUMES}\" ] || echo \"Variable MINIO_VOLUMES not set in /etc/defaults/minio\""
|
||||
ExecStartPre=/bin/bash -c "(for i in $MINIO_VOLUMES; do if [ ! -d $i ]; then echo \"Directory $i of variable MINIO_VOLUMES isn't an existing directory\" && false; exit; fi; done)"
|
||||
|
||||
ExecStartPre=-/bin/chown -R root:minio /etc/minio/
|
||||
ExecStartPre=-/bin/chmod -R 660 /etc/minio/
|
||||
ExecStartPre=-/bin/chmod -R ug+X /etc/minio/
|
||||
|
||||
ExecStart=/usr/share/minio/bin/minio \
|
||||
--config-dir "/etc/minio/" \
|
||||
server \
|
||||
$MINIO_OPTS \
|
||||
$MINIO_VOLUMES
|
||||
|
||||
StandardOutput=journal
|
||||
StandardError=inherit
|
||||
|
||||
# Specifies the maximum file descriptor number that can be opened by this process
|
||||
LimitNOFILE=65536
|
||||
|
||||
# Disable timeout logic and wait until process is stopped
|
||||
TimeoutStopSec=0
|
||||
|
||||
# SIGTERM signal is used to stop Minio
|
||||
KillSignal=SIGTERM
|
||||
|
||||
SendSIGKILL=no
|
||||
|
||||
SuccessExitStatus=0
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
# Built for ${project.name}-${project.version} (${project.name})
|
36
dist/linux-systemd/readme.md
vendored
36
dist/linux-systemd/readme.md
vendored
@ -1,36 +0,0 @@
|
||||
# Readme
|
||||
Service script for minio service for systemd.
|
||||
|
||||
# Installation
|
||||
```
|
||||
mkdir /etc/minio/
|
||||
mkdir -p /usr/share/minio/bin/
|
||||
wget -O /usr/share/minio/bin/minio http://...
|
||||
chmod +x /usr/share/minio/bin/minio
|
||||
```
|
||||
|
||||
Create minio user.
|
||||
```
|
||||
useradd minio
|
||||
```
|
||||
|
||||
Create default configuration. Don't forget to update MINIO_VOLUMES with the correct path(s).
|
||||
```
|
||||
cat <<EOT >> /etc/default/minio
|
||||
MINIO_OPTS="--address :9000"
|
||||
MINIO_VOLUMES="/tmp/minio/"
|
||||
EOT
|
||||
```
|
||||
|
||||
# Systemctl
|
||||
|
||||
Put minio.service in /etc/systemd/system/
|
||||
```
|
||||
( cd /etc/systemd/system/; curl -O https://raw.githubusercontent.com/minio/minio/master/dist/linux-systemd/minio.service )
|
||||
```
|
||||
|
||||
Enable startup on boot
|
||||
```
|
||||
systemctl enable minio.service
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user