Ubuntu18如何搭建Seafile7.0版本
发表于:2025-02-03 作者:千家信息网编辑
千家信息网最后更新 2025年02月03日,本篇内容介绍了"Ubuntu18如何搭建Seafile7.0版本"的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够
千家信息网最后更新 2025年02月03日Ubuntu18如何搭建Seafile7.0版本
本篇内容介绍了"Ubuntu18如何搭建Seafile7.0版本"的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!
环境:Ubuntu18.04、Samba、Apache2.4、MySQL5.7
参考资料:https://cloud.seafile.com/published/seafile-manual-cn/deploy/using_mysql.md
# 更新源sudo apt update && upgrade# 安装必备软件包sudo apt install -y python-dev libpython2.7 python-pip python-setuptools python-pil python-mysqldb python-ldap python-urllib3 python-memcache ffmpeg# 如果提示安装失败,可尝试重新执行# 新建文件夹名字自定义,案例中使用'haiwen'这个名称,用来放置Seafile# 假如放在当前用户下 '/home/demo/haiwen'# 通过samba共享文件夹share,上传安装包到share# 由于pipy下载不稳定,我预先下载了部分组件:pillow、numpy、moviepy-1.0.1# 手动安装离线包sudo -H pip install Pillow-6.2.0-cp27-cp27mu-manylinux1_x86_64.whlsudo -H pip install numpy-1.16.5-cp27-cp27mu-manylinux1_x86_64.whldemo@ubuntu:~/share/moviepy-1.0.1$ sudo python setup.py install# 启用Apache反向代理模块sudo a2enmod rewrite proxy_http# 将Seafile安装包复制到/home/demo/haiwen下# 新建'installed'文件夹,解压seafile安装包,解压完毕后将压缩包移动到'installed'文件夹里。# 进入seafile文件夹# cd ./seafile-server-lastest# 配置过程不需要用root权限# 配置数据库,根据提示填写./setup-seafile-mysql.sh# 启动seafile# ./seafile.sh { start | stop | restart }# 启动seahub,首次启动需要设置管理员# run seahub server: ./seahub.sh { start| stop | restart }
启用Apache反向代理
# 启用代理功能sudo a2enmod rewrite proxy_http# 增加防火墙规则sudo ufw allow 8000sudo ufw allow 8082# 修改代理配置cd /etc/apache2/sites-enabledsudo cp 000-default.conf 000-default.conf.baksudo vim 000-default.conf# 修改如下:# ServerName www.myseafile.com ServerAdmin webmaster@localhost DocumentRoot /var/www/html Alias /media /home/demo/haiwen/seafile-server-latest/seahub/media RewriteEngine On # 修改完毕后重启apache服务sudo /etc/init.d/apache2 restart# 至此,已经可以用web登陆Seafile。Require all granted # # seafile fileserver # ProxyPass /seafhttp http://127.0.0.1:8082 ProxyPassReverse /seafhttp http://127.0.0.1:8082 RewriteRule ^/seafhttp - [QSA,L] # # seahub # SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 ProxyPass / http://127.0.0.1:8000/ ProxyPassReverse / http://127.0.0.1:8000/ ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined
添加自启动功能
# 新建seafile服务sudo vim /etc/systemd/system/seafile.service# 内容[Unit]Description=Seafile# add mysql.service or postgresql.service depending on your database to the line belowAfter=network.target[Service]Type=oneshotExecStart=/home/demo/haiwen/seafile-server-latest/seafile.sh startExecStop=/home/demo/haiwen/seafile-server-latest/seafile.sh stopRemainAfterExit=yesUser=demoGroup=demo[Install]WantedBy=multi-user.target# 新建seahub服务sudo vim /etc/systemd/system/seahub.service[Unit]Description=Seafile hubAfter=network.target seafile.service[Service]# change start to start-fastcgi if you want to run fastcgiExecStart=/home/demo/haiwen/seafile-server-latest/seahub.sh startExecStop=/home/demo/haiwen/seafile-server-latest/seahub.sh stopUser=demoGroup=demoType=oneshotRemainAfterExit=yes[Install]WantedBy=multi-user.target# 启用服务sudo systemctl enable seafile.servicesudo systemctl enable seahub.servicesudo systemctl daemon-reload
"Ubuntu18如何搭建Seafile7.0版本"的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注网站,小编将为大家输出更多高质量的实用文章!
文件
文件夹
代理
服务
内容
配置
版本
功能
更多
案例
知识
过程
提示
实用
学有所成
接下来
参考资料
名字
名称
困境
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
数据库逻辑检索式
数据库integrity
网络安全与知识产权保护
广西的软件开发公司
php服务器管理地址吗
软件开发干不了干实施行不
日企软件开发国内有名
阴阳师网易服务器
网络安全宣传片名称
低压笔记本可以做软件开发吗
论文查重用的是什么数据库
历史上重大的网络安全事件
云服务器维护和管理收费
当今社会网络安全辩论赛
软件开发项目经理招聘信息
重庆渝中区蔬菜软件开发
芜湖山趣网络技术
济宁均益网络技术
微信服务器保存聊天记录多久
广东erp软件开发市场价
应用服务器与管理的摘要
服务器请求超时
王牌战争多久更新一次服务器
服务器出错500
国家网络安全宣传作文题目
linux 服务器 权限
软件开发入门简单
网络安全攻防对抗联赛
举例说明软件开发的工作流程
扫描仪不能连接dhcp服务器