ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    NextCloud Automated Installation

    IT Discussion
    linux fedora installer nextcloud script bash selinux storage cloud storage
    12
    76
    11.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JaredBuschJ
      JaredBusch
      last edited by

      Here is the diff for anyone interested.

      diff --git a/nextcloud_fedora.sh b/nextcloud_fedora.sh
      index 9f79344..cbfd88e 100644
      --- a/nextcloud_fedora.sh
      +++ b/nextcloud_fedora.sh
      @@ -31,6 +31,8 @@ echo "Enter the name of your web admin user account (ex. admin)"
       read adminuser
       echo "Enter the initial password for admin"
       read adminpass
      +echo "Enter the FQDN you setup for Nextcloud (ex. nc.domain.com)"
      +read ncfqdn
       
       export ncpath='/var/www/html/nextcloud'
       export datapath='/data'
      @@ -87,6 +89,10 @@ systemctl restart php-fpm
       cd $ncpath
       sudo -u apache php occ maintenance:install --database "mysql" --database-name "nextcloud" --database-user "ncuser" --database-pass $ncpass --admin-user $adminuser --admin-pass $adminpass --data-dir $datapath
       sudo -u apache php occ config:system:set trusted_domains 1 --value=$(ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p')
      +if [-n $ncfqdn]
      +then
      +  sudo -u apache php occ config:system:set trusted_domains 2 --value=$ncfqdn
      +fi
       
       sed -i "$ d" /var/www/html/nextcloud/config/config.php
       echo "  'memcache.locking' => '\OC\Memcache\Redis'," >> /var/www/html/nextcloud/config/config.php
      
      B 1 Reply Last reply Reply Quote 0
      • B
        bnrstnr @JaredBusch
        last edited by

        @jaredbusch said in NextCloud Automated Installation:

        If someone has time to test my pull request, that would be great.

        Testing now.

        1 Reply Last reply Reply Quote 0
        • B
          bnrstnr @JaredBusch
          last edited by

          @jaredbusch
          https://i.imgur.com/02OnzE4.png

          1 Reply Last reply Reply Quote 0
          • JaredBuschJ
            JaredBusch
            last edited by

            Looks like @scottalanmiller never tested on minimal.

            wget is not installed on your system.

            B 1 Reply Last reply Reply Quote 2
            • JaredBuschJ
              JaredBusch
              last edited by

              I also do not know why he is using unzip instead of the bz2, but meh.

              1 Reply Last reply Reply Quote 0
              • JaredBuschJ
                JaredBusch
                last edited by JaredBusch

                no clue how to easily make a second pull request without blowing out the first one..

                build a Fedora 27 instance, install wget manually, and then run the script.

                1 Reply Last reply Reply Quote 0
                • B
                  bnrstnr @JaredBusch
                  last edited by

                  @jaredbusch I doubt cockpit is the issue here, but I installed wget before running it this time...
                  -bash: [-n: command not found]

                  https://i.imgur.com/AmT4mas.png

                  JaredBuschJ 1 Reply Last reply Reply Quote 0
                  • JaredBuschJ
                    JaredBusch @bnrstnr
                    last edited by

                    @bnrstnr said in NextCloud Automated Installation:

                    @jaredbusch I doubt cockpit is the issue here, but I installed wget before running it this time...

                    No idea why you are getting the cockpit error. Nothing in the script references it.

                    -bash: [-n: command not found]

                    Damnit, I didn't put the variable in quotes..

                    JaredBuschJ 1 Reply Last reply Reply Quote 0
                    • JaredBuschJ
                      JaredBusch @JaredBusch
                      last edited by

                      @jaredbusch said in NextCloud Automated Installation:

                      @bnrstnr said in NextCloud Automated Installation:

                      @jaredbusch I doubt cockpit is the issue here, but I installed wget before running it this time...

                      No idea why you are getting the cockpit error. Nothing in the script references it.

                      -bash: [-n: command not found]

                      Damnit, I didn't put the variable in quotes..

                      Fixed that.

                      1 Reply Last reply Reply Quote 0
                      • JaredBuschJ
                        JaredBusch
                        last edited by

                        If it still doesn't like it I will switch the -n to ! -z but I thought -n was supposed to return a length and any length not zero should cause it to return true.

                        /me is not a bash scripter in general...

                        1 Reply Last reply Reply Quote 0
                        • B
                          bnrstnr
                          last edited by

                          @JaredBusch that appears to have worked, I'll try again without any input in that field.

                          Only problem I had with your script was you put dnf -y wget install I forked it and fixed it on mine and everything worked as planned.

                          JaredBuschJ 1 Reply Last reply Reply Quote 0
                          • JaredBuschJ
                            JaredBusch @bnrstnr
                            last edited by JaredBusch

                            @bnrstnr said in NextCloud Automated Installation:

                            @JaredBusch that appears to have worked, I'll try again without any input in that field.

                            Only problem I had with your script was you put dnf -y wget install I forked it and fixed it on mine and everything worked as planned.

                            damnit all to hell... jsut thought to drop that in there right quick while I was fixing the syntax...

                            1 Reply Last reply Reply Quote 0
                            • JaredBuschJ
                              JaredBusch
                              last edited by

                              ok fixed and merge req 3 made to @scottalanmiller's repo.
                              https://gitlab.com/scottalanmiller/nextcloud_fedora_installer/merge_requests/3

                              scottalanmillerS 1 Reply Last reply Reply Quote 2
                              • scottalanmillerS
                                scottalanmiller @JaredBusch
                                last edited by

                                @jaredbusch said in NextCloud Automated Installation:

                                ok fixed and merge req 3 made to @scottalanmiller's repo.
                                https://gitlab.com/scottalanmiller/nextcloud_fedora_installer/merge_requests/3

                                It is now merged.

                                1 Reply Last reply Reply Quote 0
                                • W
                                  Woti
                                  last edited by

                                  Hei,

                                  Is there no update of this script to work with Fedora 31 and Nextcloud 17?

                                  Best regards,
                                  Woti

                                  scottalanmillerS 1 Reply Last reply Reply Quote 1
                                  • scottalanmillerS
                                    scottalanmiller @Woti
                                    last edited by

                                    @Woti said in NextCloud Automated Installation:

                                    Hei,

                                    Is there no update of this script to work with Fedora 31 and Nextcloud 17?

                                    Best regards,
                                    Woti

                                    That should be easy to update. Building a test server now.

                                    1 Reply Last reply Reply Quote 1
                                    • W
                                      Woti
                                      last edited by

                                      This could be nice 👍

                                      1 Reply Last reply Reply Quote 0
                                      • scottalanmillerS
                                        scottalanmiller
                                        last edited by

                                        I've got a data center move today, but will get this completed soon.

                                        1 Reply Last reply Reply Quote 0
                                        • W
                                          Woti
                                          last edited by

                                          Would it be possible to include Collabora Online Office as selectable option?

                                          Some thoughts about the To-Do list at the end of the script?
                                          ##################################### # #
                                          ToDo

                                          1. Automate the root and db passwords randomization
                                          2. Fix SSL Warning
                                          3. Data location option
                                          4. Verify Fedora version
                                          5. Add automated system updates
                                          6. Move to BZip bolded text
                                          7. Delete installer file
                                          8. Optionally expose port 9090
                                          9. Move output to logs
                                          10. Improve verbosity of final message
                                          scottalanmillerS 1 Reply Last reply Reply Quote 0
                                          • scottalanmillerS
                                            scottalanmiller @Woti
                                            last edited by

                                            @Woti said in NextCloud Automated Installation:

                                            Would it be possible to include Collabora Online Office as selectable option?

                                            No, because it would require something completely different. Collabora gets installed on a second server, at least as we deploy it. For us, for a production deployment, it requires three VMs. One Nginx in front, then one NextCloud and one Collabora behind. So in theory a script for each, but they would be three independent scripts.

                                            It's actually so unrelated that we have a different engineer handle Collabora than the one that does NextCloud!

                                            JaredBuschJ 1 Reply Last reply Reply Quote 1
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 3 / 4
                                            • First post
                                              Last post