Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
sesipod:linux:debian-9:nextcloud15 [2019/03/14 15:15]
sesipod
sesipod:linux:debian-9:nextcloud15 [2019/04/07 07:29] (current)
sesipod
Line 1: Line 1:
 +====== Setting up Nextcloud 15! ======
 +
 +My setup is going to be base on a server with more than 4 GB of ram! If you are using a server with less than 4GB of ram you will need to make some tweaks as you go. 
 +
 +  OS: Debian 9.5
 +  CPU: 3x @ 2.5GHZ
 +  RAM: 4GB
 +  SSD: 150GB
 +
 +----
 ==== Installing required items (Apache3, Php7.2, MySQL) ==== ==== Installing required items (Apache3, Php7.2, MySQL) ====
  
Line 11: Line 21:
   apt-get install -y php7.2 php7.2-common php7.2-dom php7.2-gd php7.2-json php7.2-xml php7.2-zip php7.2-mbstring php7.2-mysql php7.2-smbclient php7.2-imagick php7.2-gmp php7.2-imap php7.2-intl php7.2-bz2 php7.2-curl php7.2-mysql php7.2-fpm php7.2-cgi php7.2-cli   apt-get install -y php7.2 php7.2-common php7.2-dom php7.2-gd php7.2-json php7.2-xml php7.2-zip php7.2-mbstring php7.2-mysql php7.2-smbclient php7.2-imagick php7.2-gmp php7.2-imap php7.2-intl php7.2-bz2 php7.2-curl php7.2-mysql php7.2-fpm php7.2-cgi php7.2-cli
  
-php 7.2 7.3-common -- replaces the follwing ​ +<color #ff7f27>php 7.2 7.3-common -- replaces the following</​color>​ 
-  PHP module ctype +  ​PHP module ctype 
-  PHP module iconv +  ​PHP module iconv 
-  PHP module posix +  ​PHP module posix 
-  PHP module iconv +  ​PHP module iconv 
-  PHP module ftp +  ​PHP module ftp 
-  PHP module fileinfo +  ​PHP module fileinfo 
-  PHP module ctype +  ​PHP module ctype 
-  PHP module exif+  ​PHP module exif
  
-php 7.2 7.3-xml -- replaces the following +<color #ff7f27>php 7.2 7.3-xml -- replaces the following</​color>​ 
-  PHP module SimpleXML +  ​PHP module SimpleXML 
-  PHP module XMLReader +  ​PHP module XMLReader 
-  PHP module XMLWriter +  ​PHP module XMLWriter
- +
-==== Enable Needed Apache2 Modules ====+
  
 ---- ----
 +==== Enable Needed Apache2 Modules ====
  
   a2enmod rewrite   a2enmod rewrite
Line 79: Line 88:
  
 ---- ----
- 
- 
- 
  
 ==== Download Nextcloud 15.0.5 ==== ==== Download Nextcloud 15.0.5 ====
Line 97: Line 103:
 ==== Set proper Apache2 Permissions ==== ==== Set proper Apache2 Permissions ====
  
-  chown -R www-data:​www-data /var/www/cloud.sesipod.info +  chown -R www-data:​www-data /var/www/nextcloud
 ---- ----
  
 ==== Setup MySQL server ==== ==== Setup MySQL server ====
  
-  mysql -e "​CREATE DATABASE ​nc_2018;"+  mysql -e "​CREATE DATABASE ​nc_2019;"
  
-  mysql -e "GRANT ALL PRIVILEGES ON nc_2018.* TO '​ncuser'​@'​localhost'​ IDENTIFIED BY '​ncpass';"​+  mysql -e "GRANT ALL PRIVILEGES ON nc_2019.* TO '​ncuser'​@'​localhost'​ IDENTIFIED BY '​ncpass';"​
  
   mysql -e "FLUSH PRIVILEGES;"​   mysql -e "FLUSH PRIVILEGES;"​
Line 127: Line 132:
  
 ---- ----
-==== Setup Redis Cache ====+==== Setup PHP APCu and Redis Cache ====
  
-  apt-get install redis-server php-redis -y+  apt-get install ​php-apcu ​redis-server php-redis -y
  
   systemctl start redis-server   systemctl start redis-server
Line 145: Line 150:
  
   '​memcache.distributed'​ => '​\OC\Memcache\Redis',​   '​memcache.distributed'​ => '​\OC\Memcache\Redis',​
-  '​memcache.local'​ => '​\OC\Memcache\Redis',+  '​memcache.local'​ => '​\OC\Memcache\APCu',
   '​memcache.locking'​ => '​\OC\Memcache\Redis',​   '​memcache.locking'​ => '​\OC\Memcache\Redis',​
   '​redis'​ => array(   '​redis'​ => array(
Line 158: Line 163:
 ==== Change PHP Memory Limit ==== ==== Change PHP Memory Limit ====
  
-  nano /etc/php/7.0/​apache2/​php.ini+  nano /etc/php/7.2/​apache2/​php.ini
  
 ctrl+w and find **memory_limit** ctrl+w and find **memory_limit**
Line 212: Line 217:
   systemctl restart apache2   systemctl restart apache2
  
-==== updating nextcloud ====+----
  
-occ command for updating NextCloud +==== Finished ====
-  sudo -u www-data php occ upgrade+
  
-----+At this point you should have All Checks Passes. Settings ​-> Overview ​
  
 +{{:​sesipod:​linux:​debian-9:​checkpass.jpg?​nolink&​600|}}
  
 +----
  
-<color #​ed1c24>​----------</​color>​+====== Extras ======
  
-====== Fixes ======+**NFS Support? How to get it working?**
  
-<color #​ed1c24>​----------</​color>​+Install the following:
  
-**Force HTTPS Logins**+  apt-get install nfs-common
  
-<color #​ffaec9>​This might also fix (Access forbidden: invalid request.)</​color>​+You should now mount NFS share directly to the VM.
  
-Add the following ​to the config file.+Create a mount point for each NFS share that you want to mount to your server.
  
-  ​nano /var/www/​nextcloud/​config/​config.php+  ​mkdir /mnt/somefolder
  
-  ​'​overwriteprotocol'​ => '​https',​+  ​nano /etc/fstab
  
-Reboot your server+  192.168.1.4:/​mnt/​RAID-Z2/​Stuff /​mnt/​somefolder nfs rw,​async,​hard,​intr,​sec=sys 0 0
  
 ---- ----
Line 259: Line 265:
 ---- ----
  
 +==== updating nextcloud ====
 +
 +occ command for updating NextCloud
 +  sudo -u www-data php occ upgrade
 +
 +----
 +
 +====== Fixes ======
 +
 +**Force HTTPS Logins**
 +
 +<color #​ffaec9>​This might also fix (Access forbidden: invalid request.)</​color>​
 +
 +Add the following to the config file.
 +
 +  nano /​var/​www/​nextcloud/​config/​config.php
 +
 +  '​overwriteprotocol'​ => '​https',​
 +
 +Reboot your server
 +
 +----
 +
 +** Missing Database sections (filecache.mtime & filecache.storage_mtime) **
 +
 +  cd /​var/​www/​nextcloud
 +
 +  sudo -u www-data php occ db:​convert-filecache-bigint
 +
 +----
  
 ** Keepweb fix ** ** Keepweb fix **
Line 289: Line 325:
  
   sudo -u www-data php /​var/​www/​nextcloud/​occ user:​resetpassword admin   sudo -u www-data php /​var/​www/​nextcloud/​occ user:​resetpassword admin
 +
 +----