差别
这里会显示出您选择的修订版和当前版本之间的差别。
| 两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
| 软件:nextcloud [2025/10/22 01:13] – admin | 软件:nextcloud [2025/10/26 19:50] (当前版本) – [Nginx配置] admin | ||
|---|---|---|---|
| 行 3: | 行 3: | ||
| 网盘 | 网盘 | ||
| - | 网络快捷安装 | + | ===== 安装环境依赖 |
| - | + | ||
| - | <code -> | + | |
| - | sudo apt install snap | + | |
| - | sudo snap install nextcloud | + | |
| - | # | + | |
| - | snap changes nextcloud | + | |
| - | </ | + | |
| - | + | ||
| - | 传统安装部署 | + | |
| - | + | ||
| - | php安装 | + | |
| - | + | ||
| - | ^ **Module** ^ **Required** ^ **Recommended** ^ **For Specific App** ^ **Description** ^ | + | |
| - | | ctype | ✓ | | + | |
| - | | curl | ✓ | | + | |
| - | | intl | | ✓ | | Improves translations and sorting | | + | |
| - | | sodium | | ✓ | | Argon2 password hashing | | + | |
| - | | ldap | | + | |
| - | | smbclient | | + | |
| - | | ftp | | + | |
| - | | imap | | + | |
| - | | gmp | | + | |
| - | | exif | | + | |
| - | | apcu | | ✓ | | Performance caching | | + | |
| - | | memcached | | ✓ | | Performance caching | | + | |
| - | | redis | | ✓ | | Transactional File Locking | | + | |
| - | | imagick | | + | |
| - | | avconv/ | + | |
| - | | Open/ | + | |
| - | | pcntl | | + | |
| - | | phar | | + | |
| - | + | ||
| - | 安装环境依赖 | + | |
| <code -> | <code -> | ||
| 行 43: | 行 10: | ||
| </ | </ | ||
| - | SQL配置 | + | ===== SQL配置 |
| <code -> | <code -> | ||
| - | sudo mysql | + | # |
| - | CREATE USER 'username' | + | mysql -u root -p |
| - | CREATE DATABASE IF NOT EXISTS nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; | + | # |
| - | GRANT ALL PRIVILEGES ON nextcloud.* TO 'username' | + | CREATE DATABASE IF NOT EXISTS nextcloud_db CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; |
| + | CREATE USER 'admin' | ||
| + | GRANT ALL PRIVILEGES ON nextcloud_db.* TO 'admin' | ||
| FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
| quit; | quit; | ||
| </ | </ | ||
| - | Nginx配置 | + | ===== Nginx配置 |
| NGINX configuration — Nextcloud latest Administration Manual latest documentation | NGINX configuration — Nextcloud latest Administration Manual latest documentation | ||
| [[https:// | [[https:// | ||
| + | |||
| + | vi / | ||
| <code nginx nextcloud.conf> | <code nginx nextcloud.conf> | ||
| 行 64: | 行 35: | ||
| upstream php-handler { | upstream php-handler { | ||
| - | server 127.0.0.1: | + | |
| - | | + | server unix:/ |
| } | } | ||
| 行 87: | 行 58: | ||
| server { | server { | ||
| - | listen 443 ssl http2; | + | |
| - | listen [::]:443 ssl http2; | + | |
| # With NGinx >= 1.25.1 you should use this instead: | # With NGinx >= 1.25.1 you should use this instead: | ||
| - | | + | listen 443 ssl; |
| - | | + | listen [::]:443 ssl; |
| - | | + | http2 on; |
| server_name cloud.example.com; | server_name cloud.example.com; | ||
| 行 100: | 行 71: | ||
| # Use Mozilla' | # Use Mozilla' | ||
| # https:// | # https:// | ||
| - | ssl_certificate | + | ssl_certificate |
| - | ssl_certificate_key /etc/ssl/ | + | ssl_certificate_key /etc/nginx/ |
| # Prevent nginx HTTP Server Detection | # Prevent nginx HTTP Server Detection | ||
| 行 274: | 行 245: | ||
| } | } | ||
| </ | </ | ||
| + | |||
| + | |||
| + | ===== Nextcloud部署 ===== | ||
| 现在下载最新 Nextcloud 版本的存档: | 现在下载最新 Nextcloud 版本的存档: | ||
| 行 288: | 行 262: | ||
| <code -> | <code -> | ||
| - | tar -xjvf nextcloud-x.y.z.tar.bz2 | + | scp .\nextcloud.zip user@127.0.0.1:/ |
| - | unzip nextcloud-x.y.z.zip | + | |
| - | sudo cp -r nextcloud /var/www | + | unzip nextcloud.zip |
| + | sudo mv ./nextcloud /var/www/ | ||
| sudo chown -R www-data: | sudo chown -R www-data: | ||
| </ | </ | ||
| + | |||
| + | 浏览器访问向导安装 | ||
| + | |||
| + | 管理员 admin | ||
| + | |||
| + | 密码 123456 | ||
| + | |||
| + | 路径默认 / | ||
| + | |||
| + | 数据库用户 admin | ||
| + | |||
| + | 数据库密码 123456 | ||
| + | |||
| + | 数据库名称 nextcloud_db | ||
| + | |||
| + | 数据库地址 localhost: | ||