私有云盘的搭建(owncloud、seafile)_seafile私有云搭建-程序员宅基地

技术标签: 运维  linux  服务器  

序号 主机 系统 作用 备注
1 stu:192.168.3.81 rockylinux8.6最小化安装 owncloud云盘
2 stu:192.168.3.82 rockylinux8.6最小化安装 seafile云盘

一、owncloud

1、关闭selinux及防火墙

sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
systemctl disable firewalld
reboot

2、安装软件包

yum install  -y  httpd php php-mysqlnd mariadb-server mariadb vim net-tools \
  bash-completion  bzip2
systemctl start httpd.service
systemctl start mariadb.service
mysql_secure_installation

3、安装owncloud

下载地址

https://download.owncloud.com/server/stable/owncloud-complete-latest.tar.bz2

wget -P /var/www/html https://download.owncloud.com/server/stable/owncloud-complete-latest.tar.bz2
cd /var/www/html
bzip2 -d owncloud-complete-latest.tar.bz2
tar -xvf owncloud-complete-latest.tar
chown -R apache:apache /var/www/html/owncloud/
mysql -uroot -ppassword
create database owncloud;
GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'%' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
exit

访问:http://192.168.3.81/owncloud/index.php

rpm -qa | grep php

dnf module switch-to php:7.4 -y
rpm -qa | grep php

 访问:http://192.168.3.81/owncloud/index.php

dnf install -y php-zip php-intl php-gd

 重新访问:http://192.168.3.81/owncloud/index.php

 安装完成后登录,下载客户端

 创建用户并修改密码

 设置客户端

 

 

 二、seafile云盘搭建

1、 关闭selinux及防火墙

sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
systemctl disable firewalld
reboot

2、安装软件包

dnf -y install vim net-tools bash-completion wget
yum install python3 python3-setuptools python3-pip python3-devel mysql-devel gcc -y
yum install nginx mariadb-server mariadb -y
pip3 install -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host \
      mirrors.aliyun.com pip2pi
pip3 install --upgrade pip
pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy==1.4.3 \
    django-pylibmc django-simple-captcha python3-ldap mysqlclient
systemctl start mariadb
mysql_secure_installation

3、安装seafile

mkdir /opt/seafile
useradd seafile
chown -R seafile:seafile /opt/seafile
su - seafile
cd /opt/seafile/
wget https://s3.eu-central-1.amazonaws.com/download.seadrive.org/seafile-server_8.0.8_x86-64.tar.gz
tar -xvf seafile-server_8.0.8_x86-64.tar.gz
cd seafile-server-8.0.8/
./setup-seafile-mysql.sh

 

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

su

vim /etc/nginx/conf.d/seafile.conf

log_format seafileformat '$http_x_forwarded_for $remote_addr [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" $upstream_response_time';

server {
    listen 80;
    server_name 192.168.3.82;

    proxy_set_header X-Forwarded-For $remote_addr;

    location / {
         proxy_pass         http://127.0.0.1:8000;
         proxy_set_header   Host $host;
         proxy_set_header   X-Real-IP $remote_addr;
         proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
         proxy_set_header   X-Forwarded-Host $server_name;
         proxy_read_timeout  1200s;

         # used for view/edit office file via Office Online Server
         client_max_body_size 0;

         access_log      /var/log/nginx/seahub.access.log seafileformat;
         error_log       /var/log/nginx/seahub.error.log;
    }

# If you are using [FastCGI](http://en.wikipedia.org/wiki/FastCGI),
# which is not recommended, you should use the following config for location `/`.
#
#    location / {
#         fastcgi_pass    127.0.0.1:8000;
#         fastcgi_param   SCRIPT_FILENAME     $document_root$fastcgi_script_name;
#         fastcgi_param   PATH_INFO           $fastcgi_script_name;
#
#         fastcgi_param  SERVER_PROTOCOL     $server_protocol;
#         fastcgi_param   QUERY_STRING        $query_string;
#         fastcgi_param   REQUEST_METHOD      $request_method;
#         fastcgi_param   CONTENT_TYPE        $content_type;
#         fastcgi_param   CONTENT_LENGTH      $content_length;
#         fastcgi_param  SERVER_ADDR         $server_addr;
#         fastcgi_param  SERVER_PORT         $server_port;
#         fastcgi_param  SERVER_NAME         $server_name;
#         fastcgi_param   REMOTE_ADDR         $remote_addr;
#        fastcgi_read_timeout 36000;
#
#         client_max_body_size 0;
#
#         access_log      /var/log/nginx/seahub.access.log;
#        error_log       /var/log/nginx/seahub.error.log;
#    }

    location /seafhttp {
        rewrite ^/seafhttp(.*)$ $1 break;
        proxy_pass http://127.0.0.1:8082;
        client_max_body_size 0;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;

        proxy_connect_timeout  36000s;
        proxy_read_timeout  36000s;
        proxy_send_timeout  36000s;

        send_timeout  36000s;

        access_log      /var/log/nginx/seafhttp.access.log seafileformat;
        error_log       /var/log/nginx/seafhttp.error.log;
    }
    location /media {
        root /opt/seafile/seafile-server-latest/seahub;
    }
}
nginx -t
nginx -s reload
systemctl restart nginx

http://192.168.3.82

 

更换用户登录,登录需要修改密码

 下载客户端

下载 - Seafile

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/w975121565/article/details/127514843

智能推荐

2021SC@SDUSC 山大智云 1.综述_sdcus-程序员宅基地

文章浏览阅读377次。2021SC@SDUSC 山大智云 1.综述2021SC@SDUSC0.项目简介"山大智云"是以网盘功能为基础的在线应用系统。以seafile开源版本为基础,拓展网盘的应用功能和场景化的业务适配。该项目已事先校园统一认证,文件锁,在线编辑预览,全文搜索,文件病毒扫描,审计,离线上传等功能。1.项目配置1.0 安装Ubuntu18.041.1 安装Dockerapt install docker.server1.2 创建Docker容器docker run -it -p 8000:800_sdcus

fdisk 分区及格式化-程序员宅基地

文章浏览阅读251次。# 对分区sdb操作, m 帮助fdisk /dev/sdb建好分区,格式化文件系统:挂载:mount /dev/sdb4 /3转载于:https://www.cnblogs.com/listenerln/p/7388655.html_fdisk可以格式化分区吗

bunsenlasb中文Linux,在线试用 200 多种 Linux 和 Unix 操作系统-程序员宅基地

文章浏览阅读178次。只要打开该网站,选择你需要的 Linux/Unix 发行版,然后开始试用!-- Sk(作者)不久前我们介绍过 OSBoxes ,该网站提供了一系列免费且开箱即用的 Linux 和 Unix 虚拟机。你可以在你的 Linux 系统中下载这些虚拟机并用 VirtualBox 或 VMWare workstation 试用。今天,我偶然发现一个名叫 “DistroTest” 的类似服务。与 OSBoxe..._bunsenlabs

Linux芯片级移植与底层驱动(基于3.7.4内核) --中断控制器_cpsid if-程序员宅基地

文章浏览阅读327次。3. 中断控制器驱动在Linux内核中,各个设备驱动可以简单地调用request_irq()、 enable_irq()、disable_irq()、local_irq_disable()、local_irq_enable()等通用API完 成中断申请、使能、禁止等功能。在将Linux移植到新的SoC时,芯片供应商需要提供该部分API的底层支持。local_irq_disabl_cpsid if

从10万到百亿营收的背后 | 同程旅游CTO V课堂实录_ctov;-程序员宅基地

文章浏览阅读2.7k次。转载酷饭网 http://qoofan.com/read/RnMkBREqGD.html前言在 10 多年的同程创业历程中,张海龙经历了从 5 人到万人的扩张、融资等过程,他对电子商务、O2O、在线旅游、创业历程、文化打造、技术团队提升等也有较深的理解和心得。作为同程旅游联合创始人暨现任CTO,张海龙全面负责着同程网一千多人的研发团队管理及同程研发中心的_ctov;

我看不懂,但我大受震撼!-程序员宅基地

文章浏览阅读235次。大家好,我是极客重生,9月开始了,又到了看书的季节。经典的书籍不在乎多,而在乎认真读完,领悟作者(大师)的真谛,经典书,就是值得反复阅读的书,每次阅读都可以获得新的认知!看一看有没有你喜欢..._linux操作系统知识地图2.0 pdf

随便推点

tomcat的classpath设置_tomcat配置classpath-程序员宅基地

文章浏览阅读560次。在tomcat启动的时候,tomcat不会用JDK的classpath,这个是在tomcat启动的catalina.sh里面设置的。如果需要把自己的目录加进去的话,在下面加一句。CLASSPATH:自己的目录。_tomcat配置classpath

DNS主从服务器详细配置_主dns和从dns怎么设置-程序员宅基地

文章浏览阅读517次。DNS域名的分层结构:根域 国家域 顶级域 二级域 主机名DNS解析过程:DNS的解析过程是分层解析的,一般客户机将解析的请求发送给它的DNS服务器,DNS服务器首先是从根DNS服务器开始改进域名解析请求,根将com域的IP反馈给客户机的本地DNS服务器,本地DNS服务器访问com域服务器,com域服务器反馈baidu域的IP给本地DNS服务器,本地DNS服务器访问baidu域服务器询问WWW域服务器的IP,baidu域服务器给DNS服务器反馈www域的ip,这时本地DNS服务器得到www.baid_主dns和从dns怎么设置

栈实现综合计算器(中缀表达式)_栈计算器中缀-程序员宅基地

文章浏览阅读123次。代码实现package com.springboot.数据结构.stack;/** * @author: 牧羊 * @Date: 2020/4/29 15:28 * 栈实现综合计算器(中缀表达式) */public class Calculator { public static void main(String[] args) { String..._栈计算器中缀

Qt-装饰者模式_qt装饰模式-程序员宅基地

文章浏览阅读1.1k次,点赞2次,收藏4次。1. 定义装饰者模式 装饰者模式动态地将责任附加到对象上。若要扩展功能,装饰者提供了比继承更有弹性的替代方案。装饰者和被装饰对象有共同的超类型你可以用一个或多个装饰者包装一个对象。既然装饰者和被装饰对象有相同的类型,所以在任何需要原始对象(被包装)的场合,可以用装饰过的对象代替它。装饰者可以在所委托被装饰者的行为之前与/或之后,加上自己的行为,以达到特定的目的。对象可以在任_qt装饰模式

how2j学习日志——J2EE(2018年3月28日)-程序员宅基地

文章浏览阅读152次。1.开始跟着站长学习J2EE,首页是简单的Tomcat安装和部署,我从官网上下载的是7.0.85版本,修改server.xml中的默认端口号为80。80端口是web服务的默认端口,因此在浏览器上输入127.0.0.1就行了,不需要再输入端口号。2.由于我把之前的继承包WampServer卸载了,因此去官网上重新下载了一个MySql服务器,版本是5.1.38(64位)。选择cu..._howj2ee

面向对象的三大特征_面向对象的三大特性-程序员宅基地

文章浏览阅读9.8k次,点赞5次,收藏37次。面向对象的三大特征——封装、继承、多态_面向对象的三大特性