# - bof - # # - - # # - Documentation - # https://computingforgeeks.com/how-to-install-nextcloud-on-ubuntu-debian/ https://docs.nextcloud.com/server/20/admin_manual/installation/example_ubuntu.html https://www.linuxbabe.com/cloud-storage/setup-nextcloud-server-ubuntu-16-04-apache-mariadb-php7 # :1 # - - # # - Software installation - # sudo apt update; sudo apt install php-cli php-fpm php-json php-intl php-imagick php-pdo \ php-mysql php-zip php-gd php-mbstring php-curl php-xml \ php-pear php-bcmath libapache2-mod-php; # :1.1 # - - # # - Download nextcloud - # cd ~/Downloads; wget https://download.nextcloud.com/server/releases/latest-23.zip; #wget https://download.nextcloud.com/server/releases/nextcloud-23.0.2.zip; # :1.2 # - - # # - Unzip it - # unzip latest-23.zip; ;unzip nextcloud-23.0.2.zip; # :1.3 # - - # # - Copy nexcloud to WebServer - # sudo mv nextcloud /Data/WebServer/; # sudo cp -r nextcloud /Data/WebServer/nextcloud; # sudo cp -r nextcloud /DataPool/WebServer/nextcloud; # :1.4 # - - # # - Change nextcloud owner & user folder properties - # sudo chown -R www-data:www-data /Data/WebServer/nextcloud; sudo chown -R www-data:www-data /DataPool/WebServer/nextcloud; # :2 # - - # # - MySQL - # # :2.1 # - - # # - If using phpmyadmin - # 192.168.0.100/phpmyadmin 192.168.1.100/phpmyadmin # :2.2 # - - # # - If using tilix - # mysql -u cvandemberg -pAdmin22; mysql -u cvandemberg -pAdmin22 -h 192.168.0.100; mysql -u cvandemberg -pAdmin22 -h www.acecom.one; mysql -u is_derayo -pAdmin22; mysql -u is_derayo -pAdmin22 -h 192.168.1.100; mysql -u is_derayo -pAdmin22 -h www.isdevelopment.us; # :2.3 # - - # # - Create nextclud DB & user - # CREATE DATABASE nextcloud; CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'Admin22'; GRANT ALL PRIVILEGES ON *.* TO 'nextcloud'@'localhost' WITH GRANT OPTION; CREATE USER 'nextcloud'@'%' IDENTIFIED BY 'Admin22'; GRANT ALL PRIVILEGES ON *.* TO 'nextcloud'@'%' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'localhost' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON *.* TO 'nextcloud'@'%' WITH GRANT OPTION; FLUSH PRIVILEGES; exit # :2.4 # - - # # - Tilix - # # - MySQL secure installation - # sudo mysql_secure_installation; VALIDATE PASSWORD COMPONENT can be used to test passwords and improve security. It checks the strength of password and allows the users to set only those passwords which are secure enough. Would you like to setup VALIDATE PASSWORD component? n Change the password for root? n Remove anonymous users? y Disallow root login remotely? n Remove test database and access to it? y Reload privilege tables now? y # - Restart MySQL - # sudo systemctl restart mysql; Goto :4 # :3 # - - # # - PostgreSQL - # # :3.1 # - - # # - If using phpmyadmin - # 192.168.1.100/phppgadmin 192.168.1.101/phppgadmin # :3.2 # - - # # - If using tilix - # sudo -u cvandemberg psql -d postgres -h 192.168.0.100; sudo -u cvandemberg psql -d postgres -h www.acecom.one; psql -U postgres -d postgres -h www.acecom.one; sudo -u is_derayo psql -d postgres -h 192.168.1.100; sudo -u is_derayo psql -d postgres -h 192.168.1.200; sudo -u is_derayo psql -d postgres -h www.isdevelopment.us; psql -U postgres -d postgres -h www.isdevelopment.us; # :3.3 # - - # # - Create nextclud DB & user - # CREATE DATABASE nextcloud; # - Open nexcloud database - # \c nextcloud CREATE ROLE nextcloud WITH LOGIN PASSWORD 'Admin22' SUPERUSER CREATEROLE CREATEDB REPLICATION BYPASSRLS; GRANT ALL PRIVILEGES ON DATABASE nextcloud TO nextcloud; GRANT ALL ON ALL TABLES IN SCHEMA public TO nextcloud; GRANT ALL PRIVILEGES ON DATABASE nextcloud TO cvandemberg; GRANT ALL ON ALL TABLES IN SCHEMA public TO cvandemberg; GRANT ALL PRIVILEGES ON DATABASE nextcloud TO is_derayo; GRANT ALL ON ALL TABLES IN SCHEMA public TO is_derayo; GRANT ALL PRIVILEGES ON DATABASE nextcloud TO postgres; GRANT ALL ON ALL TABLES IN SCHEMA public TO postgres; \q # :4 # - - # # - Nextcloud configuration - # # :4.1 # - - # # - Restart apache - # sudo a2enmod rewrite; sudo systemctl restart apache2; # :4.2 # - - # # - Nexcloud config files - # sudo vim /etc/apache2/sites-available/nextcloud.conf; #ServerAdmin cvandemberg@hotmail.com ServerAdmin is_derayo@hotmail.com DocumentRoot "/Data/WebServer/nextcloud" #ServerName nextcloud #ServerName nextcloud.www.acecom.one ServerName nextcloud.www.isdevelopment.us ServerAlias /nextcloud "/Data/WebServer/nextcloud/" ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined Options +FollowSymlinks AllowOverride All Require all granted Dav off SetEnv HOME /Data/WebServer/nextcloud SetEnv HTTP_HOME /Data/WebServer/nextcloud # :4.3 # - - # # - Enable nexcloud website - # sudo a2ensite nextcloud; #sudo a2dissite nextcloud; sudo a2enmod rewrite headers env dir mime; #sudo a2dismod -f headers env dir mime; sudo systemctl restart apache2; # :4.4 # - - # # - Access nextcloud (first time) - # 192.168.0.100/nextcloud 192.168.1.100/nextcloud # :4.5 # - - # # - Configuring nextcloud website (first time) - # # - Create an admin account - # cvandemberg / is_derayo Admin22 Data folder (Automatic provided) /Data/WebServer/nextcloud Configure the database MySQL/MariaDB PostgreSQL nextcloud Admin22 nextcloud localhost # - eof - # # - Do no continue - # # - - # # - Very important - # The config.php file will be created automaticly the first time you access the nextcloud website. You can edit it after the system has created it, not before. # - - # # - Change IP address on UbuntuServer - # # - Modify IP # on nexcloud config.php file - # sudo vim /Data/WebServer/nextcloud/config/config.php; 'oc8h71g3f9vx', 'passwordsalt' => '2N/neCy85ciC88KVJuRraHVLEQrD+3', 'secret' => 'HHLrjLFlrmQkLx5/SItxohhdV3hTmfa8jhjof6Y3bakmO8W9', 'trusted_domains' => array ( 0 => '192.168.1.100', 'www.isdevelopment.us', ), 'datadirectory' => '/Data/WebServer/nextcloud/data', 'overwrite.cli.url' => 'http://192.168.1.100/nextcloud', 'dbtype' => 'mysql', 'version' => '13.0.5.2', 'dbname' => 'nextcloud', 'dbhost' => 'localhost', 'dbport' => '', 'dbtableprefix' => 'oc_', 'mysql.utf8mb4' => true, 'dbuser' => 'nextcloud', 'dbpassword' => 'Admin22', 'installed' => true, ); # - - # # - Very important do this after the file was modified - # sudo chown www-data:www-data /Data/WebServer/nextcloud/config/config.php; # - eof - #