树莓派论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 2403|回复: 0
收起左侧

树莓派3B seafile 企业云盘无法实现自启动,求助!

[复制链接]
发表于 2018-8-14 10:21:17 | 显示全部楼层 |阅读模式
树莓派3B安装seafile 开源的企业云盘
手动启动成功


root@raspberrypi:~# cd /opt
root@raspberrypi:/opt# dir
ccnet  pids                  seafile-server_6.0.5_stable_pi.tar.gz  seahub.db
conf   seafile-data          seafile-server-latest                  vc
logs   seafile-server-6.0.5  seahub-data
root@raspberrypi:/opt# cd seafile-server-6.0.5/
root@raspberrypi:/opt/seafile-server-6.0.5# dir
check_init_admin.py  seaf-gc.sh            seahub.sh
reset-admin.sh       seafile               setup-seafile-mysql.py
runtime              seafile-server-6.0.5  setup-seafile-mysql.sh
seaf-fsck.sh         seafile.sh            setup-seafile.sh
seaf-fuse.sh         seahub                upgrade
root@raspberrypi:/opt/seafile-server-6.0.5# clear
root@raspberrypi:/opt/seafile-server-6.0.5# dir
check_init_admin.py  seaf-gc.sh            seahub.sh
reset-admin.sh       seafile               setup-seafile-mysql.py
runtime              seafile-server-6.0.5  setup-seafile-mysql.sh
seaf-fsck.sh         seafile.sh            setup-seafile.sh
seaf-fuse.sh         seahub                upgrade
root@raspberrypi:/opt/seafile-server-6.0.5# ./seafile.sh start


[08/14/18 02:11:49] ../common/session.c(132): using config file /opt/conf/ccnet.conf
Starting seafile server, please wait ...
Seafile server started


Done.
root@raspberrypi:/opt/seafile-server-6.0.5# ./seahub.sh start


LC_ALL is not set in ENV, set to en_US.UTF-8
./seahub.sh: line 207: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory
Starting seahub at port 8000 ...


Seahub is started


Done.
编辑 [size=0.85em]vim /etc/systemd/system/seafile.service
[size=0.85em]

[unit]Description=Seafile# add mysql.service or postgresql.service depending on your database to the line belowAfter=network.target[Service]Type=oneshotExecStart=/opt/seafile-server-6.0.5/seafile-server-latest/seafile.sh startExecStop=/opt/seafile-server-6.0.5/seafile-server-latest/seafile.sh stopRemainAfterExit=yesUser=rootGroup=seafile[Install]WantedBy=multi-user.target


编辑
vim /etc/systemd/system/seahub.service

[unit]
Description=Seafile hub
After=network.target seafile.service

[Service]
# change start to start-fastcgi if you want to run fastcgi
ExecStart=/opt/seafile-server-6.0.5/seafile-server-latest/seahub.sh start
ExecStop=/opt/seaflie-server-6.0.5/seafile-server-latest/seahub.sh stop
User=root
Group=seafile
Type=oneshot
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

设置服务开机自启动sudo systemctl enable seafile.servicesudo systemctl enable seahub.service不知道设置那里有错误,那位大神给指导指导





回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|树莓派论坛 ( 粤ICP备15075382号-1  

GMT+8, 2024-11-25 14:55 , Processed in 1.125000 second(s), 24 queries , Gzip On.

Powered by Shumeipai.net! X3.2

© 2001-2015 树莓派论坛安全联盟

快速回复 返回顶部 返回列表