Resource icon

Scripted installation of Nextcloud 28 in iocage jail 2018-03-23

Linge

Dabbler
Joined
Feb 27, 2021
Messages
14
I had already done it before, but got the same error. I am posting my commands, hope this will be clearer.

Code:
root@truenas[/mnt/Miror2x500Julien/nextcloud/install]# git clone https://github.com/danb35/freenas-iocage-nextcloud
Cloning into 'freenas-iocage-nextcloud'...
…
Resolving deltas: 100% (485/485), done.
root@truenas[...loud/install/freenas-iocage-nextcloud]# cd freenas-iocage-nextcloud/.git
root@truenas[...install/freenas-iocage-nextcloud/.git]# nano nextcloud-config
  GNU nano 4.8                                        nextcloud-config                                                 
JAIL_IP="192.168.1.17"
DEFAULT_GW_IP="192.168.1.1"
POOL_PATH="/mnt/Miror2x500Julien/nextcloud"
TIME_ZONE="__________"
HOST_NAME="___________"
STANDALONE_CERT=1

root@truenas[...install/freenas-iocage-nextcloud/.git]# script nextcloud.log ./nextcloud-jail.sh
Script started, output file is nextcloud.log
script: ./nextcloud-jail.sh: No such file or directory

Script done, output file is nextcloud.log
root@truenas[...install/freenas-iocage-nextcloud/.git]# ls
branches                HEAD                    info                    nextcloud.log           refs
config                  hooks                   logs                    objects
description             index                   nextcloud-config        packed-refs
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,737
Don't do this: cd freenas-iocage-nextcloud/.git
Do this: cd freenas-iocage-nextcloud
 

Linge

Dabbler
Joined
Feb 27, 2021
Messages
14
Just tried it, again same issue.

Code:
root@truenas[...loud/install/freenas-iocage-nextcloud]# pwd
/mnt/Miror2x500Julien/nextcloud/install/freenas-iocage-nextcloud
root@truenas[...loud/install/freenas-iocage-nextcloud]# ls
.git                    nextcloud-config
root@truenas[...loud/install/freenas-iocage-nextcloud]# script nextcloud.log ./nextcloud-jail.sh
Script started, output file is nextcloud.log
script: ./nextcloud-jail.sh: No such file or directory
Script done, output file is nextcloud.log 
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,737
The freenas-iocage-nextcloud directory should not be empty after cloning. Try a git checkout master inside the directory.
 

Linge

Dabbler
Joined
Feb 27, 2021
Messages
14
The freenas-iocage-nextcloud directory should not be empty after cloning
That's what I thought too, but I didn't know how to check it.

Code:
root@truenas[...loud/install/freenas-iocage-nextcloud]# git checkout master
Already on 'master'
Your branch is up to date with 'origin/master'.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,737
I don't know what @danb35 did to his repo - the "master" branch is empty. Try git checkout master-fixed.

Your road to enlightenment would have been to check the repo in your browser and then e.g. the list of all branches:
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,456
I don't know what @danb35 did to his repo
I kind of broke it--I somehow set the remote URL for a different repo to match this one (and I'm still not sure how that happened), which resulted in its being in a very confused state. The master-fixed branch is indeed correct, and maybe one day I can figure out how to get the master branch to look like it again.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,737
Just merge the branch into master, then :wink:
 

Linge

Dabbler
Joined
Feb 27, 2021
Messages
14
Ok thanks, it's seems to be working. To sum up:
I clone the github master repository :
Code:
git clone https://github.com/danb35/freenas-iocage-nextcloud

I switch to the new branch with:
Code:
git checkout master-fixed

I pull the repository from the last branch:
Code:
git clone https://github.com/danb35/freenas-iocage-nextcloud


Am I correct? Is there a faster way, or should i just wait for danb35 to merge the repositories?
 

Linge

Dabbler
Joined
Feb 27, 2021
Messages
14
I found the faster way :
Code:
 git clone https://github.com/danb35/freenas-iocage-nextcloud --branch master-fixed
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,737
The second git clone was not necessary, either. Clone, checkout, done. Or your last version, yes.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,456
Just merge the branch into master, then :wink:
Not that easy (or, more likely, I don't know the correct incantation to make git do it), as it represents the state of the master branch some commits ago. Do you know how to make git do this?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,737
According to the all-knowing, all-seeing Trash Heap it should work like this - I just tried locally, but I cannot git push, of course.
Code:
git checkout master-fixed
git merge -s ours --no-commit master
git commit -m 'Repair master branch'
git checkout master
git merge master-fixed
 

InGenetic

Contributor
Joined
Dec 18, 2013
Messages
183
hi mr.danb35
i want to ask about my freenas with nextcloud on jail , is that ok , if change the ip of lan and the ip of nextcloud jail ( because it's dhcp ip from router )
now the lan ip is : 192.168.0.xx , i wanna change to 192.168.9.xx but the public ip address still not change, still same public ip address but on different router and different lan ip address ?

i will destroy the freenas and nextcloud on jail ? or not ? is it safe to do that ?

please advice.

Thank you .
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,456
So you're only changing the internal IP address? In that case, you shouldn't need to do anything special with the jail other than changing its configuration to reflect the new address.
 

xames

Patron
Joined
Jun 1, 2020
Messages
235
After a recent update over the gui, my instance say is in maneteinance mode, i try to resolve inside jail and with commands: su -m www -c '/usr/local/bin/php /usr/local/www/nextcloud/occ maintenance:mode --on' but says:

PHP Fatal error: allow memory size of ... bytes exchausted ...bla bla simplecontainer.php on line 133.

And now i don't know how to proceed

The last time i try to install this update happens the same but with a restart of the nextcloud is ok with the old version, but now no.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,737
Edit /usr/local/etc/php.ini and adjust the memory_size parameter.
 
Top