#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中文網其他相關文章!