make install-daemon-service

make install-daemon-service
vim /etc/systemd/system/lotus-daemon.service
[Unit]
Description=Lotus Daemon
After=network-online.target
Requires=network-online.target

[Service]
Environment=GOLOG_FILE="/var/log/lotus/daemon.log"
Environment=GOLOG_LOG_FMT="json"
Environment=LOTUS_PATH="/seal/lotus"
ExecStart=/usr/local/bin/lotus daemon
Restart=always
RestartSec=10

MemoryAccounting=true
MemoryHigh=8G
MemoryMax=10G
LimitNOFILE=8192:10240

[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl start lotus-daemon.service
systemctl status lotus-daemon.service
systemctl enable lotus-daemon.service
cat /etc/systemd/system/lotus-daemon.service
[Unit]
Description=Lotus Daemon
After=network-online.target
Requires=network-online.target

[Service]
Environment=GOLOG_FILE="/var/log/lotus/daemon.log"
Environment=GOLOG_LOG_FMT="json"
Environment=LOTUS_PATH="/seal/lotus"
EnvironmentFile=/seal/lotus_vars.env
ExecStart=/usr/local/bin/lotus daemon
Restart=always
RestartSec=10

#MemoryAccounting=true
#MemoryHigh=8G
#MemoryMax=10G
#LimitNOFILE=8192:10240
LimitNOFILE=1024000:1024000

[Install]
WantedBy=multi-user.target
cat /seal/lotus_vars.env
# LOG
RUST_BACKTRACE=full
RUST_LOG=info

# LOTUS
LOTUS_FVM_CONCURRENCY=24

make install-miner-service

# make install-miner-service
install -C ./lotus-miner /usr/local/bin/lotus-miner
install -C ./lotus /usr/local/bin/lotus
mkdir -p /etc/systemd/system
mkdir -p /var/log/lotus
install -C -m 0644 ./scripts/lotus-daemon.service /etc/systemd/system/lotus-daemon.service
systemctl daemon-reload

lotus-daemon service installed. Don't forget to run 'sudo systemctl start lotus-daemon' to start it and 'sudo systemctl enable lotus-daemon' for it to be enabled on startup.
mkdir -p /etc/systemd/system
mkdir -p /var/log/lotus
install -C -m 0644 ./scripts/lotus-miner.service /etc/systemd/system/lotus-miner.service
systemctl daemon-reload

lotus-miner service installed. Don't forget to run 'sudo systemctl start lotus-miner' to start it and 'sudo systemctl enable lotus-miner' for it to be enabled on startup.

reference

  1. Systemd service files

Guess you like

Origin blog.csdn.net/u010953692/article/details/134673493
Recommended