如何在 Ubuntu 14.04 上安装 Seafile (Trusty Tahr)
在此页
Seafile 是一个开源的云存储软件。它为个人用户和群组提供文件共享和同步,它提供客户端加密和从移动设备轻松访问。本教程描述了在 Ubuntu 14.04 上安装 Seafile 的步骤。
安装 Seafile 依赖项
所描述的依赖项列表
- Java 运行时环境 (JRE)
- Poppler 工具
- Libreoffice 4.1+ 和 Python-uno
- libpython 2.7
- Python 库(确保 python 2.7 包含在此安装中,您可以使用映像 1.2 上的命令进行验证,如果它已经安装,则使用此命令 apt-get install python 2.7 并且如果您收到\Wheel installs require setuptools >= ...\ 错误,那么你可以使用这个 pip install setuptools --no-use-wheel --upgrade)。您还需要使用 easy_install pip 和 pip install boto 进行安装,分别如图 1.3 和 1.4 所示)
以 root 用户身份运行以下命令以安装所需的软件:
apt-get install openjdk-7-jre poppler-utils libreoffice libreoffice-script-provider-python libpython2.7 python-pip mysql-server python-setuptools python-imaging python-mysqldb python-memcache
现在我将检查安装的 python 版本是否符合 Seafile 的要求:
python -V
正如您在屏幕截图中看到的,python 版本是 2.7.6,因此它在支持的 python 版本范围内。

接下来我将使用 easy_install 安装 pip 包
easy_install pip

和 boto 包
pip install boto

接下来为您的语言安装一些额外的字体(例如 WenQuanYi,如果我们要使用中文)
apt-get install ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy

使用 MySQL 安装 Seafile
首先,您需要验证您的系统是 32 位还是 64 位系统。
uname -m

我的服务器是 64 位系统。
有两种选择,32 位或 64 位,均可在 Seafile 下载页面 http://seafile.com/en/download/ 上找到。

32 位:
cd /tmp
wget https://bitbucket.org/haiwen/seafile/downloads/seafile-server_4.0.6_x86-64.tar.gz

mkdir /root/guide

mv seafile-server_4.0.6_x86-64.tar.gz /root/guide/

cd /root/guide
进入内部后,您需要使用命令 tar 提取文件。
tar -xzf seafile-server_4.0.6_x86-64.tar.gz

mkdir installed

mv seafile-server_4.0.6_x86-64.tar.gz installed/


配置 MySQL 数据库
Seafile 由 3 个核心组件组成。我们需要为这个给定的组件创建一个数据库。
- ccnet 服务器
- 海底服务器
- 海港
现在正在创建 mysql 数据库、帐户并设置对所列给定数据库的权限。 (这只是一个示例,您可以根据自己的数据库名称创建自己的设计)。
Seafile Components | Database name | Account |
ccnet server | ccnet-db | seafile |
seafile server | seafile-db | seafile |
seahub | seahub-db | seafile |
以root用户登录mysql
mysql -u root -p
然后在 mysql shell 中发出这些命令:
create database `ccnet-db`character set = 'utf8';
create database `seafile-db`character set = 'utf8';
create database `seahub-db`character set = 'utf8';
create user 'seafile'@'localhost' identified by 'seafile';
GRANT ALL PRIVELIGES ON ccnet-db.* to `seafile`@localhost;
GRANT ALL PRIVELIGES ON seafile-db.* to `seafile`@localhost;
GRANT ALL PRIVELIGES ON seahub-db.* to `seafile`@localhost;
FLUSH PRIVILEGES;

所需软件包:
- 蟒蛇2.7
- python-setuptools
- 蟒蛇成像
- python-mysqldb
通过使用此命令:(以验证其是否已安装)
apt-get install python2.7 python-setuptools python-imaging python-mysqldb

接下来是您需要安装 seafile 服务器。转到目录 seafile-server-4.0.6 然后运行脚本 setup-seafile-mysql.sh。
cd seafile-server-4.0.6
ls -lrt
./setup-seafile-mysql.sh

在启动服务 seafile 时,您需要转到目录 seafile-server-4.0.6。然后按照图像上给出的方式运行。
cd /root/guide/seafile-server-4.0.6
ls -al
./seafile.sh start

./seahub.sh start

要使用您拥有的任何浏览器访问该站点,请在地址栏中输入。
http://192.168.0.100:8000/
在此图像上,您将看到示例 Web 访问。使用您在图 1.22 中输入的管理员帐户,您需要输入电子邮件和密码。

链接
- 海鱼
- Ubuntu