Created
November 8, 2021 05:20
-
-
Save james-see/29ea140a29b0f4d26219dc3216ed7a58 to your computer and use it in GitHub Desktop.
mini quickstart linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://dl.minio.io/server/minio/release/linux-amd64/minio | |
chmod +x minio | |
sudo ./minio server /minio | |
wget https://dl.minio.io/client/mc/release/linux-amd64/mc | |
chmod +x mc | |
./mc config host add minio http://127.0.0.1:9000 Access_key Secret_key | |
sudo ln -s /home/jc/Downloads/mc /usr/bin/mc | |
sudo ln -s /home/jc/Downloads/minio /usr/bin/minio | |
#### create systemd minio #### | |
sudo mkdir -p /opt/minio/certs | |
sudo addgroup --system minio | |
sudo adduser --system --home /opt/minio --shell /usr/sbin/nologin --no-create-home --gecos 'minio' --ingroup minio --disabled-login --disabled-password minio | |
# Add line to /etc/fstab file (use blkid to identify your device) | |
UUID=7C04AC0604ABC18E /media/disk ntfs async,big_writes,noatime,nodiratime,nofail,uid=minio,gid=minio,umask=007,errors=remount-ro 0 2 | |
sudo mount -a | |
sudo curl -fsSL https://github.com/FiloSottile/mkcert/releases/download/v1.4.3/mkcert-v1.4.3-linux-arm -o /usr/local/bin/mkcert | |
sudo chmod +x /usr/local/bin/mkcert | |
sudo mkcert -install | |
sudo update-ca-certificates | |
sudo mkcert -cert-file /opt/minio/certs/public.crt -key-file /opt/minio/certs/private.key example.org 1.2.3.4 # change hostname and ip to yours | |
sudo chown -R minio:minio /opt/minio/cert | |
sudo openssl verify -verbose -CAfile ~/.local/share/mkcert/rootCA.pem /opt/minio/certs/public.crt | |
# Volume to be used for MinIO server. | |
MINIO_VOLUMES="/media/disk/" | |
# Use if you want to run MinIO on a custom port. | |
MINIO_OPTS="--certs-dir /opt/minio/certs --address 192.168.1.200:9000 --anonymous --quiet" | |
# Access Key of the server. | |
MINIO_ACCESS_KEY="user" | |
# Secret key of the server. | |
MINIO_SECRET_KEY="secret" | |
# Region name | |
MINIO_REGION_NAME="home-local" | |
#### Create /etc/systemd/system/minio.service file | |
[Unit] | |
Description=Minio Storage Service | |
After=network.target | |
AssertFileIsExecutable=/opt/minio/minio | |
[Service] | |
User=minio | |
Group=minio | |
EnvironmentFile=-/etc/default/minio | |
ExecStartPre=/bin/bash -c "if [ -z \"${MINIO_VOLUMES}\" ]; then echo \"Variable MINIO_VOLUMES not set in /etc/default/minio\"; exit 1; fi" | |
ExecStart=/opt/minio/minio server $MINIO_OPTS $MINIO_VOLUMES | |
WorkingDirectory=/opt/minio | |
ReadWriteDirectories=/media/disk | |
StandardOutput=inherit | |
StandardError=inherit | |
LimitNOFILE=65536 | |
Restart=always | |
TimeoutStopSec=infinity | |
SendSIGKILL=no | |
LimitNPROC=64 | |
PrivateTmp=true | |
PrivateDevices=true | |
ProtectHome=true | |
ProtectSystem=strict | |
NoNewPrivileges=true | |
[Install] | |
WantedBy=multi-user.target | |
### end file | |
sudo systemctl daemon-reload | |
sudo systemctl enable minio.service | |
sudo systemctl start minio.service | |
sudo systemctl status minio.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment