前置环境
宝塔部署(替代linux命令操作的网页端面板)
根据环境自行选择安装宝塔 宝塔下载安装官网
运行安装命令并访问
使用WindTerm终端工具连接服务器,并运行安装命令
控制台打印提示信息,安装成功后,访问宝塔面板地址即可
安装Mysql
安装完成后进入配置页面创建数据库
安装Redis
设置Redis访问密码
安装Minio
官方安装文档地址: Minio安装文档
- 下载Minio安装包
shell
wget https://dl.minio.org.cn/server/minio/release/linux-amd64/minio
chmod +x minio
sudo mv minio /usr/local/bin/
- 创建 systemd 系统启动服务文件
shell
echo "[Unit]
Description=MinIO
Documentation=https://minio.org.cn/docs/minio/linux/index.html
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/usr/local/bin/minio
[Service]
WorkingDirectory=/usr/local
User=minio-user
Group=minio-user
ProtectProc=invisible
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=/usr/local/bin/minio server \$MINIO_OPTS \$MINIO_VOLUMES
# MinIO RELEASE.2023-05-04T21-44-30Z adds support for Type=notify (https://www.freedesktop.org/software/systemd/man/systemd.service.html#Type=)
# This may improve systemctl setups where other services use \`After=minio.server\`
# Uncomment the line to enable the functionality
# Type=notify
# Let systemd restart this service always
Restart=always
# Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=65536
# Specifies the maximum number of threads this process can create
TasksMax=infinity
# Disable timeout logic and wait until process is stopped
TimeoutStopSec=infinity
SendSIGKILL=no
[Install]
WantedBy=multi-user.target
# Built for \${project.name}-\${project.version} (\${project.name})" > /usr/lib/systemd/system/minio.service
- 创建用户组和用户及数据目录
shell
mkdir -p /usr/local/minio
groupadd -r minio-user
useradd -M -r -g minio-user minio-user
chown minio-user:minio-user /usr/local/minio
- 创建环境变量配置文件
shell
echo "# MINIO_ROOT_USER and MINIO_ROOT_PASSWORD sets the root account for the MinIO server.
# This user has unrestricted permissions to perform S3 and administrative API operations on any resource in the deployment.
# Omit to use the default values 'minioadmin:minioadmin'.
# MinIO recommends setting non-default values as a best practice, regardless of environment
MINIO_ROOT_USER=minio
MINIO_ROOT_PASSWORD=Abc123++
# MINIO_VOLUMES sets the storage volume or path to use for the MinIO server.
MINIO_VOLUMES=\"/usr/local/minio\"
# MINIO_OPTS sets any additional commandline options to pass to the MinIO server.
# 例如, \`--console-address :9001\` sets the MinIO Console listen port
MINIO_OPTS=\"--console-address :9090 -address :9000\"
# MINIO_SERVER_URL sets the hostname of the local machine for use with the MinIO Server
# MinIO assumes your network control plane can correctly resolve this hostname to the local machine
# Uncomment the following line and replace the value with the correct hostname for the local machine and port for the MinIO server (9000 by default).
#MINIO_SERVER_URL=\"http://minio.example.net:9000\"" > /etc/default/minio
- 启动minio服务
shell
sudo systemctl start minio.service
sudo systemctl enable minio.service
- 状态检查
shell
sudo systemctl status minio.service
journalctl -f -u minio.service