当前位置: 移动技术网 > 科技>操作系统>Linux > 树莓派搭建Seafile个人网盘

树莓派搭建Seafile个人网盘

2018年10月07日  | 移动技术网科技  | 我要评论
步骤一、安装Seafile依赖包 步骤二、安装pip和python库 启动 mariadb服务: 配置 mariadb: 步骤四、安装Seafile网盘程序(一定要下载树莓派版本,其他版本是没办法运行的) 下载Seafile网盘: 创建Seafile网盘文件夹: 安装Seafile网盘: 启动 Se ...

步骤一、安装seafile依赖包

yum install python-setuptools python-ldap python-memcached mysql-python mariadb mariadb-server

步骤二、安装pip和python库

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
pip install requests
步骤三、配置mariadb数据库

启动 mariadb服务:

sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service

配置 mariadb:

/usr/bin/mysql_secure_installation
#new password 和 re-enter new password 字段都设置为 password,其他字段一路回车使用默认值

步骤四、安装seafile网盘程序(一定要下载树莓派版本,其他版本是没办法运行的)

下载seafile网盘:

wget https://github.com/haiwen/seafile-rpi/releases/download/v6.3.2/seafile-server_6.3.2_stable_pi.tar.gz

创建seafile网盘文件夹:

mkdir -p /data/pan
mv seafile-server_* /data/pan
cd /data/pan
tar -xzf seafile-server_*
mkdir installed
mv seafile-server_* installed
这样设计目录的好处在于
1.和 seafile 相关的配置文件都可以放在 pan 目录下,便于集中管理.
2.后续升级时,你只需要解压最新的安装包到 pan 目录下.

安装seafile网盘:

cd seafile-server-*
./setup-seafile-mysql.sh
[server name] 字段输入 seafile,[ this server's ip or domain ] 字段输入域名或服务器公网ip地址,
[ 1 or 2 ] 字段选择 1,mysql 的 [ root password ] 字段输入 password,其他字段一路回车使用默认值

启动 seafile 服务器:

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

修改防火墙规则:

sudo firewall-cmd --zone=public --permanent --add-port=8082/tcp
sudo firewall-cmd --zone=public --permanent --add-port=8000/tcp
sudo firewall-cmd --reload

大功告成!
恭喜,您的 seafile 已经部署完成,您现在拥有专属的网盘了,登录的帐号密码为您启动 seafile 步骤中设置的邮箱和密码。
可以通过 ip访问网盘:http://<您的域名>:8000
可以通过域名访问网盘:如 http://www.yourdomain.com:8000 ,其中 www.yourdomain.com 替换为您注册的域名

 

参考文献:
腾讯云:https://cloud.tencent.com/developer/labs/lab/10093
科技爱好者:http://blog.lxx1.com/1420
seafile官方文档:https://manual-cn.seafile.com/deploy/using_mysql.html

如您对本文有疑问或者有任何想说的,请 点击进行留言回复,万千网友为您解惑!

相关文章:

验证码:
移动技术网