Assumes Apache, MySQL, & PHP installed
Assumes Firewall ports are opened
Necessary php packages
dnf -y install php-mbstring php-gd php-pecl-zip php-xml php-json unzip
Nextcloud package
wget https://download.nextcloud.com/server/releases/latest.zip
unzip latest.zip -d /var/www/html
mkdir /var/www/html/nextcloud/data
chown -R apache:apache /var/www/html/nextcloud/*
chcon -h system_u:object_r:httpd_sys_content_t /var/www/html/nextcloud/ -R
Database Setup
MYSQLPW=$password
credfile=~/sql.cnf
echo -e "[client]\nuser=root\npassword=$MYSQLPW\nhost=localhost" > $credfile
mysql --defaults-extra-file=$credfile -e "CREATE USER nextcloud@localhost IDENTIFIED BY 'p@ssw0rd'"
mysql --defaults-extra-file=$credfile -e "GRANT ALL ON nextcloud.* TO nextcloud@localhost"
mysql --defaults-extra-file=$credfile -e "CREATE DATABASE nextcloud;"
mysql --defaults-extra-file=$credfile -e "FLUSH PRIVILEGES;"
Admin Configuration
http://nextcloud.host.tld.or.ip/nextcloud
Add users
Add Groupware (Mail, Contacts, Calendar, Desktop, TOTP two-factor authentication)
Users create there own account