From QmailToaster
Jump to navigation Jump to search

Nextcloud Install

Assumes EL8, Apache, MySQL, & PHP installed
Assumes Firewall ports are opened

Necessary php packages
dnf -y install epel-release
dnf config-manager --set-enabled powertools
dnf -y install
dnf -y module reset php
dnf module install php:remi-8.1
dnf install php-mbstring php-gd php-pecl-zip php-xml php-json unzip php php-cli php-mysqlnd php-zip php-devel \
            php-gd php-mcrypt php-curl php-xml php-pear php-bcmath php-json php-pdo php-pecl-apcu \
            php-pecl-apcu-devel php-ldap

Modify /etc/php.ini
file_uploads = On
allow_url_fopen = On
memory_limit = 512M
upload_max_filesize = 500M
post_max_size = 600M 
max_execution_time = 300
display_errors = Off
date.timezone = America/Denver

Modify /etc/php.d/10-opcache.ini
opcache.enable = 1
opcache.interned_strings_buffer = 8
opcache.max_accelerated_files = 10000
opcache.memory_consumption = 128
opcache.save_comments = 1
opcache.revalidate_freq = 1

Nextcloud package
unzip -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='your password'
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;"

Restart Apache
systemctl restart httpd

Admin Configuration (remember mysql username, password, and db)

After admin is configured
Add users
Add Groupware (Mail, Contacts, Calendar, Desktop, TOTP two-factor authentication)

Users create there own account

Secure Nextcloud with SSL