这是本文档旧的修订版!
nextcloud
网盘
php安装
Module | Required | Recommended | For Specific App | Description |
---|---|---|---|---|
ctype | ✓ | Core functionality | ||
curl | ✓ | HTTP requests | ||
intl | ✓ | Improves translations and sorting | ||
sodium | ✓ | Argon2 password hashing | ||
ldap | ✓ | LDAP integration | ||
smbclient | ✓ | SMB/CIFS integration | ||
ftp | ✓ | FTP storage/authentication | ||
imap | ✓ | External user authentication | ||
gmp | ✓ (optional) | SFTP storage | ||
exif | ✓ (optional) | Image rotation in Pictures app | ||
apcu | ✓ | Performance caching | ||
memcached | ✓ | Performance caching | ||
redis | ✓ | Transactional File Locking | ||
imagick | ✓ (optional) | Image previews | ||
avconv/ffmpeg | ✓ (optional) | Video previews | ||
Open/LibreOffice | ✓ (optional) | Document previews | ||
pcntl | ✓ (optional) | Command interruption in CLI | ||
phar | ✓ (optional) | Needed for command-line updater |
安装环境依赖
sudo apt update && sudo apt upgrade sudo apt install apache2 mariadb-server libapache2-mod-php php-gd php-mysql \ php-curl php-mbstring php-intl php-gmp php-xml php-imagick php-zip
配置WEB
NGINX configuration — Nextcloud latest Administration Manual latest documentation
https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html
SQL配置
sudo mysql CREATE USER 'username'@'localhost' IDENTIFIED BY 'password'; CREATE DATABASE IF NOT EXISTS nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; GRANT ALL PRIVILEGES ON nextcloud.* TO 'username'@'localhost'; FLUSH PRIVILEGES; quit;
现在下载最新 Nextcloud 版本的存档:
转到 Nextcloud 安装页面。
转到下载 Server > Community Projects,然后下载 tar.bz2 或 .zip 存档。
这将下载名为 nextcloud-x.y.z.tar.bz2 或 nextcloud-x.y.z.zip 的文件 (其中 x.y.z 是版本号)。
下载其相应的校验和文件,例如 nextcloud-x.y.z.tar.bz2.md5, 或 nextcloud-x.y.z.tar.bz2.sha256。
验证 MD5 或 SHA256 总和:
tar -xjvf nextcloud-x.y.z.tar.bz2 unzip nextcloud-x.y.z.zip sudo cp -r nextcloud /var/www sudo chown -R www-data:www-data /var/www/nextcloud