在甲骨文云上安装nextcloud
#!/bin/bash
# Update apt
sudo apt update
# Install snapd
sudo apt install snapd
# Install Nextcloud via snap
sudo snap install nextcloud
# Manually install Nextcloud with admin pw "kizens"
sudo nextcloud.manual-install admin kizens
# Set trusted domain for Nextcloud
sudo nextcloud.occ config:system:set trusted_domains 1 --value=cloud.yourdomain.com
# Open ports 80 and 443
sudo iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
sudo iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
# Save the iptables rules
sudo iptables-save > /etc/iptables/rules.v4
# sudo iptables-restore </etc/iptables/rules.v4
sudo iptables-restore < /etc/iptables/rules.v4
# Enable HTTPS with Let's Encrypt
sudo nextcloud.enable-https lets-encrypt
# Restart Nextcloud
sudo snap restart nextcloud
--将以上代码逐行执行 或 save as nextcloud-setup.sh
注意修改初始密码kizens
以及绑定域名为你自己的域名 cloud.yourdomain.com
请在域名注册商处修改2级域名的A记录,指向甲骨文云主机的公网IP
然后执行,以下2行命令,第一行是修改文件属性,第二行是执行该批处理文件
chmod +x nextcloud-setup.sh
sudo ./nextcloud-setup.sh