Home  >  Article  >  Computer Tutorials  >  Docker deployment NextCloud personal network disk reference tutorial

Docker deployment NextCloud personal network disk reference tutorial

WBOY
WBOYforward
2024-02-19 16:33:02707browse

1. Introduction to NextCloud

NextCloud Introduction

NextCloud is a client-server software that can build personal network storage space. It functions similarly to Dropbox, but NextCloud is open source software that anyone can install and use on their own server.

NextCloud Features

  • Suitable for storing personal files
  • Solving the problem of enterprise sensitive data storage
  • Solve network disk collaboration issues
  • High security, data is internal, no ads
  • Supports multiple plug-in installations, classes can be configured according to needs
  • Support internal user management, permission access, and email authentication system
  • Collaborative editing of online documents, online flow chart drawing, and use of mind maps
  • 2. Check Docker status

    Check Docker service status

    // 1) 低版本 Docker 安装
    yum install docker -y
    
    ----
    // 
    // 2) 高版本 Docker 安装
    curl -fsSL https://get.docker.com/ | sh
    
    ----
    // 关闭防火墙
    systemctl disable --now firewalld
    setenforce 0
    
    // 启用 Docker
    systemctl enable --now docker
    

    Check Docker version

    docker version
    

    3. Install Docker-compose

    Install Docker-compose

    curl -L https://github.com/docker/compose/releases/download/v2.2.2/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
    

    Add execution permissions to the Docker-compose file

    chmod +x /usr/local/bin/docker-compose
    

    View Docker-compose version

    docker-compose version
    

    4. Install NextCloud

    Write the Docker-compose.yaml file

    mkdir -p /docker/nextcloud && cd /docker/nextcloud
    
    [root@blog nextcloud] vim docker-compose.yaml 
    version: '3'
    services:
     nextcloud:
     image: nextcloud
     container_name: nextcloud_web
     links:
    - nextcloud-db:nextcloud-db
     environment:
    - uid=1000
    - gid=1000
    - upload_max_size=5g
    - apc_shm_size=128m
    - opcache_mem_size=128
    - cron_period=15m
    - tz=aisa/shanghai
    - admin_user=admin
    - admin_password=P@ssw0rd123456
    - domain=localhost
    - db_type=mysql
    - MYSQL_PASSWORD=P@ssw0rd123456
    - MYSQL_DATABASE=nextcloud
    - MYSQL_USER=nextcloud
    - MYSQL_HOST=192.168.80.8:3307
     volumes:
    - /docker/nextcloud/data:/var/www/html
     expose:
    - 80
     ports:
    - 8081:80
     restart: always
    
    
     nextcloud-db:
     image: mariadb:10
     container_name: nextcloud_db
     volumes:
    - /docker/nextcloud/db:/var/lib/mysql
     environment:
    - MARIADB_ROOT_PASSWORD=P@ssw0rd123456
    - MARIADB_DATABASE=nextcloud
    - MARIADB_USER=nextcloud
    - MARIADB_PASSWORD=P@ssw0rd123456
     restart: always
     ports:
    - 3307:3306
    
    docker-compose up -d
    

    View NextCloud container status

    docker ps -a
    

    5. Close the database in read-only mode

    Enter database

    yum install mysql -y
    
    mysql -h192.168.80.8 -P3307 -uroot -pP@ssw0rd123456
    

    Docker 部署 NextCloud 个人网盘参考教程image.png

    Close innodb_read_only_compressed global variable

    SET GLOBAL innodb_read_only_compressed=OFF;
    

    6. Log in to NextCloud

    Login to Nextcloud

    Create Administrator Account

    Docker 部署 NextCloud 个人网盘参考教程image.png

    login successful

    Docker 部署 NextCloud 个人网盘参考教程Docker 部署 NextCloud 个人网盘参考教程

    View Files

    Docker 部署 NextCloud 个人网盘参考教程image.png

    View photos

    Docker 部署 NextCloud 个人网盘参考教程

    The above is the detailed content of Docker deployment NextCloud personal network disk reference tutorial. For more information, please follow other related articles on the PHP Chinese website!

    Statement:
    This article is reproduced at:mryunwei.com. If there is any infringement, please contact admin@php.cn delete