记一次不是很顺利的部署 Seafile 服务器过程,包含各种问题的解决过程

说明:做为一名诚实的搬运工,这里贴上官方部署文档,本文仅做一些梳理,算是做个笔记了


1,下载页面下载最新的服务器安装包


2,使用ssh工具(本如xshell)连接至远程服务器,创建安装目录(如vicfile)

cd /home
mkdir vicfile

3,打开本地cmd,将使用scp命令将文件从本地上传至服务器。

 scp C:\Users\vicdor\Downloads\seafile-server_6.3.1_x86-64.tar.gz [email protected]:/home/vicfile/


4,待数据传递完毕,切换到xshell,进入到vicfile文件夹,可以看到我们的安装包已经上传成功了


5,解压,并把安装包移动到installed文件夹

tar -xzf seafile-server_*
mkdir installed
mv seafile-server_* installed

6,安装

cd seafile-server-*
./setup-seafile-mysql.sh  #运行安装脚本并回答预设问题

7,可以看到安装脚本运行的时候便报错了,这是因为缺少了seafile依赖的一些工具包,如果不嫌多,也可以报一次错,就复制执行一次红框中提示的命令。这里我们可以执行官方文档中的安装命令,将seafile服务安装的先决条件准备好

# on Debian/Ubuntu 14.04 server
apt-get update
apt-get install python2.7 libpython2.7 python-setuptools \
  python-ldap python-mysqldb python-memcache python-urllib3
# on Ubuntu 16.04 server
# As the default python binary on Ubuntu 16.04 server is python 3, we need to install python (python 2) first.
apt-get update
apt-get install python
apt-get install python2.7 libpython2.7 python-setuptools  python-ldap python-urllib3 ffmpeg python-pip python-mysqldb python-memcache
pip install pillow moviepy
# on CentOS 7
yum -y install epel-release
rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
yum -y install MySQL-python python-memcached python-ldap python-urllib3 ffmpeg ffmpeg-devel
pip install pillow moviepy

8,下图为ubuntu执行官方脚本报错提示,这里我按提示将原来的python-imaging替换为python-pil,再重新执行了一次。后又在执行安装脚本的时候提示python-imaging为必须,我便把官方脚本中的python-imaging在上面代码中移除了

9,后来几经查探安装pillow来代替python-imaging

apt-get install python-dev python-setuptools
apt-get install libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev
pip install pillow

9,准备好先决环境后再次执行第6步安装脚本,结果还是提示我存在遗漏,继续按照提示CV


10,安装好后再次执行第6步安装脚本,按提示敲回车继续操作,设置服务名,配置ip和端口



11,后续过程无法继续,这里不得不暂时退出先来安装个mysql了。

apt-get install mysql-server

12,登录mysql修改root密码,并设置允许远程访问

mysql -uroot -p(输入密码处直接回车)
set password for root@localhost = password('这里填密码');
exit;

编辑文件/etc/mysql/mysql.conf.d/mysqld.cnf:

vi /etc/mysql/mysql.conf.d/mysqld.cnf

注释掉bind-address = 127.0.0.1:(用鼠标定位到相应行首,敲击键盘i,查看确认光标位置,输入#注释当前行,然后敲击esc 后输入:wq保存并退出)

然后进入mysql服务,执行授权命令:

grant all on *.* to root@'%' identified by '你的密码' with grant option;
flush privileges;

然后执行quit或exit命令退出mysql服务后重启mysql。

service mysql restart

13,现在继续执行第6步,按提示进行操作


14,按照提示配置默认超管用户,直到最后提示操作成功


15,最后启动seafile服务

启动 Seafile:

./seafile.sh start # 启动 Seafile 服务
  • 1
  • 2

启动 Seahub

./seahub.sh start <port>  # 启动 Seahub 网站 (默认运行在8000端口上)

16,浏览器输入http://你的ip:8000 即可访问

猜你喜欢

转载自blog.csdn.net/vicdorlin/article/details/80858823