NextCloud是一个能够搭建个人网络存储空间的客户端-服务器软件。它的功能类似于Dropbox,但NextCloud是开源软件,任何人都可以在自己的服务器上安装和使用。
// 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
docker version
curl -L https://github.com/docker/compose/releases/download/v2.2.2/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
docker-compose version
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
docker ps -a
yum install mysql -y mysql -h192.168.80.8 -P3307 -uroot -pP@ssw0rd123456
image.png
SET GLOBAL innodb_read_only_compressed=OFF;
创建管理员账户
image.png
登录成功
image.png
以上是Docker 部署 NextCloud 个人网盘参考教程的详细内容。更多信息请关注PHP中文网其他相关文章!