首页 » 网站建设 » PHPsqlind技巧_Seafile 70 搭建 onlyoffice搭建 实现在线办公

PHPsqlind技巧_Seafile 70 搭建 onlyoffice搭建 实现在线办公

访客 2024-11-18 0

扫一扫用手机浏览

文章目录 [+]

yum install wget -y

创建lnmp文件 用于安装lnmp

PHPsqlind技巧_Seafile 70 搭建  onlyoffice搭建 实现在线办公

mkdir /lnmp

PHPsqlind技巧_Seafile 70 搭建  onlyoffice搭建 实现在线办公
(图片来自网络侵删)

cd /lnmp

安装lnmp

wget http://soft.vpser.net/lnmp/lnmp1.7.tar.gz -cO lnmp1.7.tar.gz && tar zxf lnmp1.7.tar.gz && cd lnmp1.7 && ./install.sh lnmp

选择安装mysql 5.6

输入数据库密码

开启indb 一定要开启 否则无法运行seafile

安装php 7.0

默认就行

安装完成

创建 seaflie文件夹

mkdir /opt/seafile/

cd /opt/seafile/

下载seafile安装包

wget http://seafile-downloads.oss-cn-shanghai.aliyuncs.com/seafile-server_7.0.5_x86-64.tar.gz

解压seafile安装包

tar -zxvf seafile-server_7.0.5_x86-64.tar.gz

mv seafile-server-7.0.5 seafile-server 改个名字

cd seafile-server 进入安装包文件夹

安装必要依赖

yum install python python-setuptools MySQL-python python-urllib3 python-ldap -y

安装seafle程序

./setup-seafile-mysql.sh

按下回车 提示输入 名称 随便输入

输入做事器IP地址

输入 刚刚创建的数据库密码 这里不会显示 输入完直接回车

等待安装完成

安装完成

开启干系端口

开启防火墙

systemctl start firewalld

开启防火墙开机自启

systemctl enable firewalld

开放端口

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

firewall-cmd --zone=public --add-port=8080/tcp --permanent

firewall-cmd --zone=public --add-port=8081/tcp --permanent

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

firewall-cmd --zone=public --add-port=80/tcp --permanent

firewall-cmd --zone=public --add-port=8889/tcp --permanent

firewall-cmd --zone=public --add-port=10001/tcp --permanent

firewall-cmd --zone=public --add-port=12001/tcp --permanent

让端口生效

firewall-cmd --reload

启动seafile

./seafile.sh start

./seahub.sh start

创建管理员邮箱和密码

设置开机自启seafile

新建seafile.service文件

vi /etc/systemd/system/seafile.service

输入以下内容(把稳修正${seafile_dir}为你的seafile目录)

[Unit]

Description=Seafile

# add mysql.service or postgresql.service depending on your database to the line below

# 如果没有利用memcached则去掉memcached.service

After=network.target mariadb.service memcached.service

[Service]

Type=oneshot

ExecStart=/opt/seafile/seafile-server-latest/seafile.sh start

# 如果seahub利用了nginx反代,请修正为 ExecStart=/opt/seafile/seafile-server-latest/seahub.sh start-fastcgi

ExecStart=/opt/seafile/seafile-server-latest/seahub.sh start

ExecStop=/opt/seafile/seafile-server-latest/seafile.sh restart

ExecStop=/opt/seafile/seafile-server-latest/seahub.sh restart

ExecStop=/opt/seafile/seafile-server-latest/seafile.sh stop

ExecStop=/opt/seafile/seafile-server-latest/seahub.sh stop

RemainAfterExit=yes

# User 和 Group 如果未建立seafile用户和用户组,则修正为root,否则无法启动.

User=root

Group=root

[Install]

WantedBy=multi-user.target

运行systemctl daemon-reload使配置生效

systemctl daemon-reload

命令

systemctl start seafile #启动seafile

systemctl stop seafile #停滞seafile

systemctl enable seafile #设置seafile随系统启动

systemctl is-enabled seafile #检讨seafile是否已经设置为自启动

systemctl disable seafile #关闭seafile随系统启动

设置上传下载限定

vi /opt/seafile/conf/seafile.conf

# 上传文件最大为20000M.

max_upload_size=20000

# 最大下载目录限定为20000M.

max_download_dir_size=20000

添加一个端口网站 详细如下

lnmp vhost add

创建日志文件存放

touch /opt/seafile/logs/seahub.access.log

touch /opt/seafile/logs/seahub.error.log

定位到nginx下的配置文件

cd /usr/local/nginx/conf/vhost/

map $http_x_forwarded_proto $the_scheme {

default $http_x_forwarded_proto;

"" $scheme;

}

map $http_x_forwarded_host $the_host {

default $http_x_forwarded_host;

"" $host;

}

map $http_upgrade $proxy_connection {

default upgrade;

"" close;

}

server

{

listen 80;

server_name 10.25.2.220;

index index.html index.htm index.php default.html default.htm default.php;

server_name seafile.example.com;

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;

client_max_body_size 0;

access_log /opt/seafile/logs/seahub.access.log;

error_log /opt/seafile/logs/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;

}

location /onlyofficeds/ {

proxy_pass http://10.10.1.23:8889/;

proxy_http_version 1.1;

client_max_body_size 100M; # Limit Document size to 100MB

proxy_read_timeout 3600s;

proxy_connect_timeout 3600s;

proxy_set_header Upgrade $http_upgrade;

proxy_set_header Connection $proxy_connection;

proxy_set_header X-Forwarded-Host $the_host/onlyofficeds;

proxy_set_header X-Forwarded-Proto $the_scheme;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

}

}

设置默认的 端口80

cd /usr/local/nginx/conf

vi nginx.conf

重启nginx

service nginx restart

安装 wget 方便下载

yum -y install wget

下载yum源

cd /etc/yum.repos.d/

wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

刷新

yum repolist

安装docker-ce

yum -y install docker-ce

安装完成后启动 docker

systemctl start docker

systemctl enable docker

修正docker容器下载镜像地址提升下载速率 改为阿里云的

vi /etc/docker/daemon.json

添加

{

"registry-mirrors":["https://6w4lyiz2.mirror.aliyuncs.com"]

}

按下ESC 在输入 :wq 保存退出

docker运行下载onlyoffice,此处设置onlyoffice监听端口为8889

docker run -i -t -d --restart=always -p 8889:80 onlyoffice/documentserver

#--restart=always表示每次开机,只要当docker被设置为开机启动,此onlyoffice就会自动运行 等待会有点久,如果等待6分钟-10分钟还没下载完造诣 ctrl+c结束 重新运行

安装完成

查看docker镜像

docker ps

测试安装情形

访问:打开浏览器访问http://x.x.x.x:8889/welcome x.x.x.x更换本钱身的做事器IP

编辑seahub_settings.py 程序

vi /opt/seafile/conf/seahub_settings.py

在此文件下末端添加如下内容(把10.25.7.251改为自己做事器ip地址):

# Enable Only Office

ENABLE_ONLYOFFICE = True

VERIFY_ONLYOFFICE_CERTIFICATE = False

ONLYOFFICE_APIJS_URL = 'http://10.25.2.220:8889/web-apps/apps/api/documents/api.js'

ONLYOFFICE_FILE_EXTENSION = ('doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'odt', 'fodt', 'odp', 'fodp', 'ods', 'fods')

ONLYOFFICE_EDIT_FILE_EXTENSION = ('docx', 'pptx', 'xlsx','ppt','xls','doc')

设置邮箱系统 修正对付的邮件和密码

vi /opt//opt/seafile/conf/seahub_settings.py

EMAIL_USE_SSL = True

EMAIL_HOST = 'smtp.exmail.qq.com'

EMAIL_HOST_USER = 'centosm@qq.com邮箱'

EMAIL_HOST_PASSWORD = 'hQsyPfCWVYi密码'

EMAIL_PORT = '465'

DEFAULT_FROM_EMAIL = EMAIL_HOST_USER

SERVER_EMAIL = EMAIL_HOST_USER

修正端口设置(不修正的话无法在线编辑)把这里的8000端口删除

重启seafile程序

/opt/seafile/seafile-server/seafile.sh restart

/opt/seafile/seafile-server/seahub.sh restart

检讨是否成功 访问地址:做事器ip

登入账号密码

点击公共----点击添加资料库----点击新建资料库----新建一个文件夹 test

进入test,上传一个 word excel ppt pdf 检讨是能够在线编辑

标签:

相关文章

介绍皮肤设置,如何打造理想肌肤状态

随着科技的发展和人们对美的追求,皮肤设置已成为美容护肤的重要一环。如何根据皮肤类型、肤质、年龄等因素进行合理设置,已成为众多爱美人...

网站建设 2025-01-03 阅读1 评论0

介绍盖章制作,传承文化,彰显权威

自古以来,盖章在我国文化中具有重要的地位。从古代的官印、私印到现代的公章、合同章,盖章已成为一种独特的文化符号,承载着丰富的历史内...

网站建设 2025-01-03 阅读1 评论0

介绍监控破坏,技术手段与法律风险并存

随着科技的飞速发展,监控设备已遍布大街小巷,成为维护社会治安的重要手段。一些不法分子为了逃避法律制裁,开始研究如何破坏监控设备。本...

网站建设 2025-01-03 阅读1 评论0

介绍登录不上之谜,技术故障还是人为疏忽

随着互联网的普及,登录已成为人们日常生活中不可或缺的一部分。在享受便捷的登录不上这一问题也困扰着许多用户。本文将深入剖析登录不上之...

网站建设 2025-01-03 阅读1 评论0

介绍电脑键盘调出方法,让操作更高效

随着科技的发展,电脑已经成为了我们日常生活中不可或缺的工具。而电脑键盘,作为电脑输入设备,更是我们与电脑进行交流的桥梁。你是否知道...

网站建设 2025-01-03 阅读1 评论0

介绍磁力链,高效便捷的文件下载利器

在互联网高速发展的今天,文件下载已成为日常生活中不可或缺的一部分。而磁力链作为一种新型的文件下载方式,凭借其高效、便捷的特点,受到...

网站建设 2025-01-03 阅读1 评论0