mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-05 21:07:43 +00:00
fix(deploy): use standard rustfs log directory (#2491)
Signed-off-by: 80347547 <jianglong@oppo.com> Co-authored-by: 80347547 <jianglong@oppo.com>
This commit is contained in:
@@ -21,9 +21,12 @@ sudo mkdir -p /data/rustfs/{vol1,vol2}
|
||||
# Create configuration directory
|
||||
sudo mkdir -p /etc/rustfs
|
||||
|
||||
# Create log directory
|
||||
sudo mkdir -p /var/log/rustfs
|
||||
|
||||
# Set directory permissions
|
||||
sudo chown -R rustfs:rustfs /opt/rustfs /data/rustfs
|
||||
sudo chmod 755 /opt/rustfs /data/rustfs
|
||||
sudo chown -R rustfs:rustfs /opt/rustfs /data/rustfs /var/log/rustfs
|
||||
sudo chmod 755 /opt/rustfs /data/rustfs /var/log/rustfs
|
||||
```
|
||||
|
||||
## 2. Install RustFS
|
||||
|
||||
@@ -30,8 +30,8 @@ EnvironmentFile=-/etc/default/rustfs
|
||||
ExecStart=/usr/local/bin/rustfs $RUSTFS_VOLUMES $RUSTFS_OPTS
|
||||
|
||||
# service log configuration
|
||||
StandardOutput=append:/data/deploy/rust/logs/rustfs.log
|
||||
StandardError=append:/data/deploy/rust/logs/rustfs-err.log
|
||||
StandardOutput=append:/var/log/rustfs/rustfs.log
|
||||
StandardError=append:/var/log/rustfs/rustfs-err.log
|
||||
|
||||
# resource constraints
|
||||
LimitNOFILE=1048576
|
||||
@@ -58,7 +58,7 @@ ProtectKernelModules=true
|
||||
ProtectControlGroups=true
|
||||
RestrictSUIDSGID=true
|
||||
RestrictRealtime=true
|
||||
ReadWritePaths=/data/rustfs
|
||||
ReadWritePaths=/data/rustfs /var/log/rustfs
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Reference in New Issue
Block a user