操作系统 / 系统运维

自建私有网盘-DzzOffice

浅时光 · 9月27日 · 2020年 9374次已读

一、程序简介

DzzOffice是一套开源办公套件,适用于企业、文章来源(Source):https://www.dqzboy.com团队搭建自己的 类似“Google企业应用套件”、“微软Office365”的企业协同办公平台。

文章来源(Source):https://www.dqzboy.com

官网地址:http://www.dzzoffice.com/

LNMP环境一键部署脚本,可在本文底部获取!!
文章来源(Source):https://www.dqzboy.com

二、功能介绍

开源社区版本包含如下功能:

  • 网盘:企业、团队文件集中管理
  • 文档:在线Word协作工具
  • 表格:在线Excel协作工具
  • 演示文稿:在线PPT协作工具
  • 记录:能够多人参与协作的记录本
  • 新闻:文章系统,可用于企业新闻、通知等用途
  • 通讯录:企业人员联系方式查询
  • 文集:通过树形目录有序管理文档
  • 相册:企业图片管理工具
  • 任务板:任务管理、团队协作工具
  • 讨论板:企业内部论坛
  • 表单:表单、问卷工具
  • FTP/SFTP:文件上传等
  • 应用市场:在线安装自己所需组件,支持一键安装

三、文章来源(Source):https://www.dqzboy.com环境准备

1、关闭防火墙

# 检查防火墙是否运行
firewall-cmd --state
 
# 如果防火墙运行,则执行下面的命令关闭
systemctl stop firewalld && systemctl disable firewalld && systemctl status firewalld
 
#检查SELinux是否运行,必须关闭
getenforce
 
#如果SELinux运行,则执行下面的命令将永久其关闭
sed -ri 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
setenforce 0 && getenforce

2、安装工具

yum -y install gcc gcc-c++ libaio make cmake zlib-devel openssl-devel pcre pcre-devel wget git curl lynx lftp mailx mutt rsync ntp net-tools vim lrzsz screen sysstat yum-plugin-security yum-utils createrepo bash-completion zip unzip bzip2 tree tmpwatch pinfo man-pages lshw pciutils gdisk system-storage-manager git  gdbm-devel sqlite-devel

四、安装部署

1、部署Nginx

1.1:下载安装

[[email protected] ~]# mkdir /opt/soft
[[email protected] ~]# cd /opt/soft/
[[email protected] soft]# rpm -ivh nginx-1.18.0-1.el7.ngx.x86_64.rpm

1.2:修改配置

[[email protected] ~]# vim /etc/nginx/nginx.conf
#user  nobody;
worker_processes auto;
worker_cpu_affinity auto;
worker_rlimit_nofile 65535;

events {
    use epoll;
    worker_connections 65535;
    accept_mutex on;
    multi_accept on;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    tcp_nopush on;
    tcp_nodelay on;
    server_tokens on;
    keepalive_timeout  65;
    charset utf-8;
    types_hash_max_size 2048;
    client_max_body_size 500M;	//上传文件大小标准
    client_body_timeout 120;	//上传文件超时时间
    gzip on;
    gzip_min_length 1k;
    gzip_vary on;
    gzip_proxied any;
    gzip_comp_level 6;
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
include /etc/nginx/conf.d/*.conf;
}

[[email protected] ~]# vim /etc/nginx/nginx.conf
#user  nobody;
worker_processes 4;   #根据实际CPU核数配置
worker_cpu_affinity auto;
worker_rlimit_nofile 65535;

events {
    use epoll;
    worker_connections 65535;
    accept_mutex on;
    multi_accept on;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    tcp_nopush on;
    tcp_nodelay on;
    server_tokens on;
    keepalive_timeout  65;
    charset utf-8;
    types_hash_max_size 2048;
    client_max_body_size 16M;
    gzip on;
    gzip_min_length 1k;
    gzip_vary on;
    gzip_proxied any;
    gzip_comp_level 6;
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
include /etc/nginx/conf.d/*.conf;
}


#将下面默认的配置内容全部删除,然后将下面的配置文件复制黏贴进去,注意文件存储路径修改为自己存储的路径
[[email protected] ~]# echo >  /etc/nginx/conf.d/default.conf
[[email protected] ~]# vim /etc/nginx/conf.d/default.conf
server {
    listen       80;
    server_name  localhost;

    root   /var/www/dzzoffice;	#dzzoffice文件存储的路径
    location / {
        index  index.php index.html index.htm;
    }
    location ~ \.php$ {
        fastcgi_pass   127.0.0.1:9000;		#php服务的地址
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        fastcgi_connect_timeout  300;
        fastcgi_send_timeout  300;
        fastcgi_read_timeout  300;
        include        fastcgi_params;
    }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }
}

[[email protected] ~]# mkdir -p /var/www/dzzoffice
[[email protected] ~]# chown -R nginx. /var/www/dzzoffice

1.3:启动程序

[[email protected] ~]# systemctl start nginx
[[email protected] ~]# systemctl enable nginx
[[email protected] ~]#  firewall-cmd --permanent --zone=public --add-port=80/tcp
[[email protected] ~]# firewall-cmd --reload

2、部署MySQL

2.1:下载

[[email protected] soft]# wget http://mirror.centos.org/centos/6/os/x86_64/Packages/libaio-0.3.107-10.el6.x86_64.rpm

[[email protected] soft]# wget https://mirrors.tuna.tsinghua.edu.cn/mysql/yum/mysql-5.7-community-el7-x86_64/mysql-community-common-5.7.30-1.el7.x86_64.rpm 

[[email protected] soft]# wget https://mirrors.tuna.tsinghua.edu.cn/mysql/yum/mysql-5.7-community-el7-x86_64/mysql-community-libs-5.7.30-1.el7.x86_64.rpm

[[email protected] soft]# wget https://mirrors.tuna.tsinghua.edu.cn/mysql/yum/mysql-5.7-community-el7-x86_64/mysql-community-libs-compat-5.7.30-1.el7.x86_64.rpm

[[email protected] soft]# wget https://mirrors.tuna.tsinghua.edu.cn/mysql/yum/mysql-5.7-community-el7-x86_64/mysql-community-devel-5.7.30-1.el7.x86_64.rpm

[[email protected] soft]# wget https://mirrors.tuna.tsinghua.edu.cn/mysql/yum/mysql-5.7-community-el7-x86_64/mysql-community-client-5.7.30-1.el7.x86_64.rpm

[[email protected] soft]# wget https://mirrors.tuna.tsinghua.edu.cn/mysql/yum/mysql-5.7-community-el7-x86_64/mysql-community-server-5.7.30-1.el7.x86_64.rpm

2.2:安装

[[email protected] soft]# rpm -ivh libaio-0.3.107-10.el6.x86_64.rpm
[[email protected] soft]# yum -y install mysql-community-*

2.3:启动

[[email protected] soft]# systemctl start mysqld
[[email protected] soft]# systemctl enable mysqld

2.4:配置

#重置ROOT密码
[[email protected] ~]# cat /var/log/mysqld.log |grep password
[[email protected] ~]# mysql -uroot -p
Enter password:

mysql> set global validate_password_policy=0;
mysql> set global validate_password_number_count=0; 
mysql> set global validate_password_special_char_count=0; 
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'dqz123.';

#创建DzzOffice库
mysql> CREATE DATABASE `dzzoffice` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

#我这里直接使用root账号了,建议生产环境单独创建一个DzzOffice的用户

3、部署PHP

  • 安装方式YUM安装,版本7.4

3.1:添加YUM源

[[email protected] ~]# yum -y install epel-release
[[email protected] ~]# rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
 

#安装依赖
[[email protected] ~]# rpm -Uvh http://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libargon2-20161029-3.el7.x86_64.rpm
[[email protected] ~]# yum install libargon2

3.2:安装程序

[[email protected] ~]# yum --enablerepo=remi install php74-php php74-php-pear php74-php-bcmath php74-php-pecl-jsond-devel php74-php-mysqlnd php74-php-gd php74-php-common php74-php-fpm php74-php-intl php74-php-cli php74-php php74-php-xml php74-php-opcache php74-php-pecl-apcu php74-php-pdo php74-php-gmp php74-php-process php74-php-pecl-imagick php74-php-devel php74-php-mbstring php74-php-zip php74-php-ldap php74-php-imap php74-php-pecl-mcrypt

[[email protected] ~]# vim /etc/profile
export PATH=/opt/remi/php74/root/usr/bin:$PATH
[[email protected] ~]# source /etc/profile

[[email protected] ~]# ln -sv /opt/remi/php74/root/bin/php /usr/bin/php

[[email protected] ~]# php -v

3.3:修改配置

#如果你运行的是nginx而不是apache,修改
[[email protected] ~]# vim /etc/opt/remi/php73/php-fpm.d/www.conf
#更改为nginx用户和组
user = nginx
group = nginx

#修改php文件上传大小限制,dzzoffice建议50M以上
[[email protected] ~]# vim /etc/opt/remi/php74/php.ini
upload_max_filesize= 50M  //这个是文件上传大小限制
post_max_size=50M  //这个是post请求大小限制

3.4:启动服务

[[email protected] ~]# systemctl start php74-php-fpm.service
[[email protected] ~]# systemctl enable php74-php-fpm.service

4、部署DzzOffi文章来源(Source):https://www.dqzboy.comce

4.1:下载部署

自建私有网盘-DzzOffice-浅时光博客
  • 上面github与码云都可以进行下载,比如我这里通过github去下载
自建私有网盘-DzzOffice-浅时光博客
  • 将下载好的程序包解压到Nginx的代码存储目录下
[[email protected] soft]# tar -xf dzzoffice-2.02.1.tar.gz
[[email protected] soft]# mv dzzoffice-2.02.1/* /var/www/dzzoffice/

[[email protected] soft]# chown -R nginx. /var/www/dzzoffice/

#重载Nginx配置
[[email protected] soft]# nginx -s reload

4.2:访问安装

  • 因为上面我们是通过nginx代理托管的,所以直接输入IP地址进行访问安装
自建私有网盘-DzzOffice-浅时光博客
自建私有网盘-DzzOffice-浅时光博客
自建私有网盘-DzzOffice-浅时光博客
自建私有网盘-DzzOffice-浅时光博客
自建私有网盘-DzzOffice-浅时光博客
自建私有网盘-DzzOffice-浅时光博客
自建私有网盘-DzzOffice-浅时光博客
自建私有网盘-DzzOffice-浅时光博客
自建私有网盘-DzzOffice-浅时光博客
自建私有网盘-DzzOffice-浅时光博客
自建私有网盘-DzzOffice-浅时光博客

4.3:应用安装

自建私有网盘-DzzOffice-浅时光博客
文章来源(Source):https://www.dqzboy.com
  • 下图为我已经安装好的程序,如果没有安装则会显示文章来源(Source):https://www.dqzboy.com【安装】按钮,安装完成后选择启用即可
自建私有网盘-DzzOffice-浅时光博客

脚本使用方法

1、注意:脚本执行完成后,php运行用户也会自动更改Nginx用户;最后会将MySQL默认root登入密码显示出来

2、将脚本上传到服务器中,并赋予执行权限,然后通过以下命令执行;注意:必须用root用户执行

chmod +x lnmp_install
./lnmp_install

脚本部署的版本如下:

1、Nginx:1.18.0

2、MySQL:5.7.30

3、PHP:php74






文件名称:LNMP环境一键部署脚本

更新日期:2020-08-04

文件大小:24k文章来源(Source):https://www.dqzboy.com

广

点击下载

自建私有网盘-DzzOffice-浅时光博客
2 条回应
  1. 益达未知2020-10-29 · 11:06

    打不开安装页面啊,显示404

    • 浅时光
      浅时光上海2020-10-31 · 14:18

      那说明你Nginx配置的有问题

本站已安全运行: | 耗时 0.439 秒 | 查询 114 次 | 内存 20.05 MB