1 Star 2 Fork 1

inpool / Seafile Helper

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

方便 Seafile Server 安装与维护的小工具

当前版本: seafile-server-7.1.3 社区版

历史版本

工具解决的问题

  1. 缺少资源文件,导致部分图标无法显示的问题
  2. 初始化数据库 root 帐号无法连接的问题
  3. 快捷的将 seafile 和 seahub 安装为 systemd service,实现开机启动和进程监控

使用说明

  1. 这里 下载对应版本的工具
  2. 使用 seafile/seafile-server-7.1.3 覆盖官方安装包解压出来的目录,即可解决部分图标无法显示的问题。
  3. 因脚本需要知道seafile的安装位置,因此必须seafile/helpers 放到与 seafile-server-7.0.5 同级目录,才正常使用helpers中的脚本

使用方法

1. 初始化数据库 (seafile/helpers/prepare-mysql-db.sh)

该脚本需要使用root用户运行,用于初始化数据库,内部主要做3件事:

  1. 通过用户名和主机的组合判断用户是否存在,如果指定用户不存在,创建用户
  2. 创建需要的数据库
  3. 授权新创建的数据库给指定用户

该脚本会询问用户您几个问题:

  1. 想创建的用户:想创建的数据库用户名
  2. 用户对应的主机:默认为 localhost
  3. 用户对应的密码:即使不创建用户,这里也要提供,但是会被忽略
  4. 想创建的数据库,如果需要创建多个数据库,使用空格分割多个数据库名。 例如:若想创建 ccnet, seafile, seahub 三个数据库,则提供
    ccnet seafile seahub

2. 创建服务配置文件 (seafile/helpers/install_as_service.py)

该脚本需要在 /usr/local/lib/systemd/system 下创建文件,因此必须使用root用户运行。

使用方法只需直接运行即可,成功创建则输出 successed!。注意事项有:

  1. 脚本文件必须放在指定位置,见 使用说明 第 2 条

  2. 创建的服务配置文件是模板配置文件,文件名分别为 seafile@.serviceseahub@.service,文件中将 用户名 作为变量,在启用服务时在@加上运行服务的用户名即可。 例:要使用seafuser用户运行 seafile 和 seahub 服务,执行以下命令即可(如需立即启动服务,加入 --now 参数:

    $ systemctl enable seafile@seafuser.service
    $ systemctl enable seahub@seafuser.service
MIT License Copyright (c) 2020 inpool Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Seafile相关的一些小脚本 展开 收起
Python
MIT
取消

贡献者

全部

近期动态

加载更多
不能加载更多了
Python
1
https://gitee.com/inpool/seafile-helpers.git
git@gitee.com:inpool/seafile-helpers.git
inpool
seafile-helpers
Seafile Helper
master

搜索帮助