Changes

From SME Server
Jump to navigationJump to search
4,233 bytes added ,  22:35, 5 March 2020
no edit summary
Line 39: Line 39:  
  signal-event yum-modify
 
  signal-event yum-modify
 
  yum install {{#var:smecontribname}} --enablerepo=smecontribs,epel,fws
 
  yum install {{#var:smecontribname}} --enablerepo=smecontribs,epel,fws
 +
signal-event webapps-update
 
  service php-fpm start
 
  service php-fpm start
 
  service php71-php-fpm start
 
  service php71-php-fpm start
Line 107: Line 108:  
|enabled,disabled
 
|enabled,disabled
 
|
 
|
 +
|-
 +
|MaxUploadSize
 +
|4096M
 +
|number
 +
|if a number will be converted to Megabytes, otherwise use the usual suffix : 2T for 2 terrabytes etc...
 +
|-
 +
|MemoryLimit
 +
|528M
 +
|number
 +
|if a number will be converted to Megabytes, otherwise use the usual suffix : 2T for 2 terrabytes etc...
 
|-
 
|-
 
|Shares
 
|Shares
Line 136: Line 147:     
=== Command line ===
 
=== Command line ===
if you happen to need tweaking your installation, here is how to access the command line for Nextcloud on SME, considering we use PHP SCL.
+
if you happen to need tweaking your installation, here is how to access the command line for Nextcloud on SME, we made it easier for you, just log as root and use the OCC command (using capitals), This command will execute for you what you need as the www user, using the needed version of php. Here two examples: <syntaxhighlight lang="bash">
 +
OCC maintenance:mode --off
 +
OCC maintenance:repair
   −
The following is an example to disable maintenance mode and repair installation. The key point are :
+
</syntaxhighlight>to seek for additional command consult Nextcloud documentation : https://docs.nextcloud.com/server/13.0.0/admin_manual/configuration_server/occ_command.html
* to connect as www user
+
 
* cd to nextcloud foldet
+
=== Uninstall ===
* use the scl syntax to select php71 or higher
+
yum remove {{#var:smecontribname}}  {{#var:contribname}}
 +
 
 +
=== Use a dedicated domain to connect to Nextcloud ===
 +
<syntaxhighlight lang="bash">
 +
db domains set cloud.mydomain.com domain Description "Nextcloud" Content Primary Nameservers internet TemplatePath WebAppVirtualHost DocumentRoot /usr/share/nextcloud RequireSSL enabled letsencryptSSLcert enabled
 +
signal-event domain-create cloud.mydomain.com
 +
 
 +
#only if you use a Let's Encrypt certificate
 +
expand-template /etc/dehydrated/domains.txt
 +
dehydrated -c
 +
 
 +
#to let nextcloud accept this domain
 +
OCC "config:system:set trusted_domains 10 --value=cloud.mydomain.com "
 +
</syntaxhighlight>
 +
 
 +
=== Mount with davfs on Fedora Clients ===
 +
While you might love the easy setup of the gnome client for nextcloud, you might encounter some frustration of having your favourite applications not showing nextcloud as mounted and needing to find it to sometime not being able to access it.
 +
 
 +
Here is a workaround
 +
 
 +
First as root<syntaxhighlight lang="bash">
 +
dnf install davfs2 -y
 +
usermod -aG davfs2 $YOURUSER
 +
echo "use_locks 0" >> /etc/davfs2/davfs2.conf
 +
echo "https://example.com/nextcloud/remote.php/webdav /home/$YOURUSER/nextcloud davfs user,rw,auto 0 0
 +
" >> /etc/fstab
 +
 
 +
 
 +
</syntaxhighlight>then you should log out /log in with your user in order to have the group membership. You can also just do "su -l USERNAME"
 +
 
 +
then as your user (replace your_password by your password, or a token;):<syntaxhighlight lang="bash">
 +
mkdir ~/nextcloud
 +
mkdir ~/.davfs2
 +
echo "https://example.com/nextcloud/remote.php/webdav your_Nextcloud_username your_password" >> ~/.davfs2/secrets
 +
chmod 0600 ~/.davfs2/secrets
 +
</syntaxhighlight>then just mount ! <syntaxhighlight lang="bash">
 +
mount ~/nextcloud
 +
</syntaxhighlight>
 +
 
 +
From there you can tweak the cache configuration to make it easier for you if you are far from the server, default cache size is 50MiByte, you could increase it to let's say 3 GiByte in ~/.davfs2/davfs2.conf for your user <syntaxhighlight lang="bash">
 +
cache_size 3G
 +
</syntaxhighlight>you should see the folder mount at every logon from now on!  if you do not want that, change "auto" in the fstab by "noauto".
 +
 
 +
Then add the following in ~/bash_profile or ~/bash_rc. You could user also mount -a and to try to put something in /etc/gdm/PostLogin/" instead<syntaxhighlight lang="bash">
 +
mount /home/username/nextcloud
 +
 
 +
 
 +
 
 +
</syntaxhighlight>And Finally to umount in  gdm using "sudo vim /etc/gdm/PostSession/"<syntaxhighlight lang="bash">
 +
if [ ${USERNAME} = "myuser" ];then
 +
  umount -fl /home/myuser/nextcloud
 +
fi
 +
</syntaxhighlight>
 +
 
 +
Adapted from those sources:
 +
* http://www.tuxfixer.com/mount-webdav-remote-storage-in-fedora-linux-via-davfs2/
 +
* https://docs.nextcloud.com/server/13/user_manual/files/access_webdav.html
 +
 
 +
=== Known issues ===
 +
 
 +
==== failure to do online upgrade from 13.0.2 ====
 +
The following extra files have been found:    assets
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
su www -s /bin/bash
   
cd /usr/share/nextcloud/
 
cd /usr/share/nextcloud/
scl enable php71 'php occ maintenance:mode --off'
+
rm -rf assets
scl enable php71 'php occ maintenance:repair'
+
yum update smeserver-nextcloud --enablerepo=smecontribs
exit
+
signal-event nextcloud-update
 +
</syntaxhighlight>then proceed to online web upgrade
 +
 
 +
==== issue upgrading from 13.0.2 to 15.0.0 RPM ====
 +
Nextcloud is only build to upgrade from one major release to the next. If you try to install the nextcloud-15 rpm while you already have installed the nextcloud-13, you might have encounter the following issue.
 +
 
 +
'''“Updates between multiple major versions are unsupported”'''
   −
</syntaxhighlight>to seek for additional command consult Nextcloud documentation : https://docs.nextcloud.com/server/13.0.0/admin_manual/configuration_server/occ_command.html
+
<tt>goto usr/share/nextcloud</tt>
 +
 
 +
copy everything except <tt>/data</tt> and <tt>/config</tt> to temp folder
 +
 
 +
download intermediate version of '''nextcloud''' from <nowiki>https://nextcloud.com/changelog/</nowiki>
 +
 
 +
unzip and copy files to /usr/share/nextcloud, dont overwrite /data or /config
 +
 
 +
change ownership in /usr/share/nextcloud chown -R apache:www .
 +
 
 +
goto <nowiki>https://yoururl/nextcloud</nowiki> and run the updater
 +
 
 +
logon to nextcloud and make sure it is all working as expected
   −
=== Uninstall ===
+
repeat above for each major update until you are one update from the latest major update. At that point you can follow the usual process. source (https://bugs.contribs.org/show_bug.cgi?id=10670#c3)
yum remove {{#var:smecontribname}}  {{#var:contribname}}
      
=== Bugs ===
 
=== Bugs ===
Super Admin, Wiki & Docs Team, Bureaucrats, Interface administrators, Administrators
3,230

edits

Navigation menu