Files
baijiahao_data_crawl/服务器命令.txt
“shengyudong” 322ac74336 2025-12-25 upload
2025-12-25 11:16:59 +08:00

49 lines
985 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 给安装脚本执行权限
chmod +x install_service.sh
# 运行安装脚本需要root权限
sudo bash install_service.sh
# 查看服务状态
systemctl status bjh_daemon
# 查看实时日志
journalctl -u bjh_daemon -f
# 查看最近50行日志
journalctl -u bjh_daemon -n 50
# 停止服务
systemctl stop bjh_daemon
# 启动服务
systemctl start bjh_daemon
# 重启服务
systemctl restart bjh_daemon
# 禁用开机自启
systemctl disable bjh_daemon
# 启用开机自启
systemctl enable bjh_daemon
# 1. 检查服务是否运行
systemctl is-active bjh_daemon
# 输出 "active" 表示正在运行
# 2. 查看进程
ps aux | grep data_sync_daemon
# 3. 查看日志输出
tail -f logs/bjh_daemon.log
# 查看详细错误日志
journalctl -u bjh_daemon -n 100 --no-pager
# 检查Python路径是否正确
which python3
# 检查脚本是否存在
ls -la /root/xhh_baijiahao/data_sync_daemon.py
# 手动运行测试
cd /root/xhh_baijiahao
python3 data_sync_daemon.py