Compare commits

...
5 Commits
2 changed files with 35 additions and 19 deletions

No files matched your search

+21 -11
View File
@@ -4,31 +4,41 @@
- [☕ Gitea Installer](#gitea-installer-script) - [☕ Gitea Installer](#gitea-installer-script)
## Nextcloud installer script ## Nextcloud installer script
The lab guide is condensed into a script so Nextcloud can be installed in less than 3 minutes by executing only one command and setting the admin user credentials. The lab guide is condensed into a script so Nextcloud can be installed in less than 3 minutes by executing only one command and setting the admin user credentials.
The following components will be set up and installed automatically: The following components will be set up and installed automatically:
* php settings - php settings
* sendmail email settings - sendmail email settings
* cronjob - cronjob
* prettier URLs without index.php - prettier URLs without index.php
* Memcaching with redis and APCu - Memcaching with redis and APCu
* Client Push (notify_push) - Client Push (notify_push)
* `nextcloud-update` script - `nextcloud-update` script
* the default phone region will be set to `DE`, you may change it after the installation to a different setting - the default phone region will be set to `DE`, you may change it after the installation to a different setting
- `ncc` wrapper command for `occ` with bash completion
Connect via SSH to your Uberspace an then run: Connect via SSH to your Uberspace an then run:
``` ```sh
bash -c "$(wget -q -O - https://github.com/EV21/uberspace-helper/raw/main/nextcloud-installer.sh)" bash -c "$(wget -q -O - https://github.com/EV21/uberspace-helper/raw/main/nextcloud-installer.sh)"
``` ```
alternatively something shorter:
```sh
bash -c "$(wget -q -O - https://sh.ev21.de/uberspace/nextcloud-installer.sh)"
```
## Demo ## Demo
<!-- markdownlint-disable-next-line MD034 -->
https://user-images.githubusercontent.com/8345730/154812905-970c649d-4360-4846-961c-1d8363d662f2.mp4 https://user-images.githubusercontent.com/8345730/154812905-970c649d-4360-4846-961c-1d8363d662f2.mp4
<!-- unused
[nextcloud-installer-gif-demo]: ./presentation/uberspace-nextcloud-installer.gif [nextcloud-installer-gif-demo]: ./presentation/uberspace-nextcloud-installer.gif
-->
--- ---
@@ -43,6 +53,6 @@ The following steps will be done automatically:
Connect via SSH to your Uberspace an then run: Connect via SSH to your Uberspace an then run:
``` ```sh
bash -c "$(wget -q -O - https://github.com/EV21/uberspace-helper/raw/main/gitea-installer.sh)" bash -c "$(wget -q -O - https://github.com/EV21/uberspace-helper/raw/main/gitea-installer.sh)"
``` ```
+14 -8
View File
@@ -42,12 +42,13 @@ function install_nextcloud
echo "Installing Nextcloud" echo "Installing Nextcloud"
install_ncc install_ncc
ncc maintenance:install \ ncc maintenance:install \
--admin-user "${NEXTCLOUD_ADMIN_USER}" \ --admin-user="${NEXTCLOUD_ADMIN_USER}" \
--admin-pass "${NEXTCLOUD_ADMIN_PASS}" \ --admin-pass="${NEXTCLOUD_ADMIN_PASS}" \
--database 'mysql' --database-name "${USER}_nextcloud" \ --database='mysql' \
--database-user "${USER}" \ --database-name="${USER}_nextcloud" \
--database-pass "${MYSQL_PASSWORD}" \ --database-user="${USER}" \
--data-dir "${HOME}/nextcloud_data" --database-pass="${MYSQL_PASSWORD}" \
--data-dir="${HOME}/nextcloud_data"
ncc config:system:set trusted_domains 0 --value="$trusted_domain" ncc config:system:set trusted_domains 0 --value="$trusted_domain"
ncc config:system:set overwrite.cli.url --value="https://$trusted_domain" ncc config:system:set overwrite.cli.url --value="https://$trusted_domain"
@@ -251,11 +252,16 @@ end_of_content
function install_ncc function install_ncc
{ {
touch ~/bin/ncc touch ~/bin/ncc
cat << 'end_of_content' > ~/bin/ncc cat << end_of_content > ~/bin/ncc
#!/usr/bin/env bash #!/usr/bin/env bash
php ~/html/occ "$@" exec php /var/www/virtual/\$USER/html/occ "\$@"
end_of_content end_of_content
chmod u+x ~/bin/ncc chmod u+x ~/bin/ncc
chmod u+x ~/html/occ
ncc _completion --generate-hook --program=ncc > ~/_nextcloud_completion
echo "source \$HOME/_nextcloud_completion" >> ~/.bash_profile
# shellcheck source=/dev/null
source ~/.bash_profile
} }
function install_nextcloud_updater function install_nextcloud_updater