猛牛哥
记录网络点滴生活

CENTOS安装seafile专业版

seafile是个很好的开源云盘系统,服务端和客户端都支持WINDOWS、linux、苹果等系统,客户端也支持安卓手机系统。在国内各大云盘厂商集体“跑路”货服务缩水的的情况下,自建一个云盘是个不错的选择。之前360关闭云盘后,我买了百度云盘一年。但是百度云盘后来的文件“历史版本”功能严重缩水,只支持.txt后缀的文本文件,而以前是所有文件都可以有“历史版本”。所以就果断停止续费了。

回来说正题,seafile服务器端有社区版和专业版。其中专业版可以免费使用3个用户。我是自用,3个用户足够用, 所以首选安装专业版。服务器环境是centos7。

seafile专业版服务器端下载地址

第一步,安装依赖库,官方的方法是:

wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
sudo yum install java-1.7.0-openjdk poppler-utils python-setuptools \
python-imaging MySQL-python mariadb-server python-memcached python-ldap \
python-urllib3

sudo pip install boto requests
sudo /etc/init.d/mysqld start

我的服务器已经安装了LNMP环境,所以mysql数据库的安装和启动就可以省略了。seafile官方的说明是进行完上面的步骤后,再按照社区版的说明安装。结合seafile社区版里面的步骤,我执行的是:

wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
sudo yum install java-1.7.0-openjdk poppler-utils python-setuptools python-imaging python-memcached MySQL-python python-ldap python-urllib3
sudo pip install boto requests
sudo yum -y install epel-release
sudo rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
#下行用于centos7
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
#下行用于centos6
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-2.el6.nux.noarch.rpm
sudo yum -y install ffmpeg ffmpeg-devel
sudo pip install pillow moviepy

第二步,下载,解压:

wget https://download.seafile.com/seafhttp/files/0116f6a5-344a-4507-ba64-fba1a5fd51da/seafile-pro-server_6.2.9_x86-64.tar.gz
tar zxvf seafile-pro-server_6.2.9_x86-64.tar.gz
cd seafile-pro-server_6.2.9

以上命令中的seafile服务端最新版本号可以到这个网址查看:https://download.seafile.com/d/6e5297246c/?p=/pro

第三步,执行安装:

./setup-seafile-mysql.sh

安装过程:

seafile服务器专业版安装

seafile服务器专业版安装

安装完成界面:

seafile服务器专业版安装成功

seafile服务器专业版安装成功

安装成功后,当前目录的父目录内会自动生成一个软连接文件夹:seafile-server-latest,将来你升级到新版本后, 升级脚本会自动更新使其始终指向最新的 Seafile 服务器文件夹。

启动服务:

./seafile.sh start
./seahub.sh start

停止服务:

./seafile.sh stop
./seahub.sh stop

重启服务:

./seafile.sh restart
./seahub.sh restart

 

安装时遇到过的问题:

1、系统明明安装了python-2.7.5,安装程序却提示“Can’t find a python executable of version 2.7 or above in PATH”

原因:这个问题会发生在安装minimal版centos的系统上,这种“最小化”安装的系统会有一些模块或命令没有安装。例如,seafile安装脚本里面是用which python2.7命令来判断python环境,但是我系统上没有安装which这个命令,所以判断的结果就不正确了。

解决方法:执行命令yum install -y which

2、访问seafile网页端时,JS和css样式表丢失,导致网页排版错乱。

原因:使用nginx反向代理时,这个设置会影响js和css文件的访问:

location ~ .*\.(js|css)?$
{
     expires      12h;
}

解决方法:删除这几行设置。

 

赞(1) 打赏
猛牛哥原创:猛牛哥的博客 » CENTOS安装seafile专业版

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏