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

    Install NextCloud 11 on Fedora 25 with SaltStack

    IT Discussion
    nextcloud nextcloud 11 fedora linux fedora 25 redis mariadb salt saltstack devops scott alan miller sam salt administration
    14
    201
    41.0k
    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.
    • wrx7mW
      wrx7m @JaredBusch
      last edited by

      @JaredBusch said in Install NextCloud 11 on Fedora 25 with SaltStack:

      @wrx7m said in Install NextCloud 11 on Fedora 25 with SaltStack:

      @FATeknollogee I am more comfortable with CentOS and am using the minimal install version. It is lightweight and a small footprint "out of the box". The iso is under 700MB and the Fedora 25 iso is 1.9GB. I would have gone with CentOS 7 for nextcloud but it doesn't have PHP 7.x

      You downloaded the wrong Fedora ISO.

      You can get PHP 7 on CentOS 7 easily if you choose to trust Remi.

      @scottalanmiller disagrees with that method because it breaks the support chain. Which is the only reason to use CentOS 7 in his opinion.

      Which Fedora 25 Server ISO should I have downloaded?

      JaredBuschJ 1 Reply Last reply Reply Quote 0
      • wrx7mW
        wrx7m
        last edited by

        This is the link to the one I downloaded - https://getfedora.org/en/server/download/

        The only other one I could find is the netinstall version, which will just download everything else when you do the install.

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

          @wrx7m said in Install NextCloud 11 on Fedora 25 with SaltStack:

          @JaredBusch said in Install NextCloud 11 on Fedora 25 with SaltStack:

          @wrx7m said in Install NextCloud 11 on Fedora 25 with SaltStack:

          @FATeknollogee I am more comfortable with CentOS and am using the minimal install version. It is lightweight and a small footprint "out of the box". The iso is under 700MB and the Fedora 25 iso is 1.9GB. I would have gone with CentOS 7 for nextcloud but it doesn't have PHP 7.x

          You downloaded the wrong Fedora ISO.

          You can get PHP 7 on CentOS 7 easily if you choose to trust Remi.

          @scottalanmiller disagrees with that method because it breaks the support chain. Which is the only reason to use CentOS 7 in his opinion.

          Which Fedora 25 Server ISO should I have downloaded?

          NetInstall
          0_1493846238169_upload-84f3cee2-fa82-4904-b034-3225699ce891

          wrx7mW 1 Reply Last reply Reply Quote 1
          • wrx7mW
            wrx7m @JaredBusch
            last edited by

            @JaredBusch Does NetInstall allow you to pick and choose packages during the setup?

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

              @wrx7m said in Install NextCloud 11 on Fedora 25 with SaltStack:

              @JaredBusch Does NetInstall allow you to pick and choose packages during the setup?

              Of course.

              See this thread.
              https://mangolassi.it/topic/13498/how-to-install-fedora-25-minimal

              wrx7mW 1 Reply Last reply Reply Quote 1
              • wrx7mW
                wrx7m @JaredBusch
                last edited by

                @JaredBusch If only I had come across that when I was trying to find out if there was a minimal version of Fedora 25 LOL. Thanks for that.

                1 Reply Last reply Reply Quote 0
                • wrx7mW
                  wrx7m
                  last edited by

                  I am going to blow up my nextcloud vm and start with the Fedora netinstall.

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

                    @wrx7m said in Install NextCloud 11 on Fedora 25 with SaltStack:

                    I am going to blow up my nextcloud vm and start with the Fedora netinstall.

                    If you are only after Nextcloud, here is my guide for that.
                    https://mangolassi.it/topic/13573/install-nextcloud-11-03-on-fedora-25-minimal

                    If you want to learn Salt, then continue with this post as you have been.

                    wrx7mW 1 Reply Last reply Reply Quote 1
                    • wrx7mW
                      wrx7m @JaredBusch
                      last edited by

                      @JaredBusch said in Install NextCloud 11 on Fedora 25 with SaltStack:

                      @wrx7m said in Install NextCloud 11 on Fedora 25 with SaltStack:

                      I am going to blow up my nextcloud vm and start with the Fedora netinstall.

                      If you are only after Nextcloud, here is my guide for that.
                      https://mangolassi.it/topic/13573/install-nextcloud-11-03-on-fedora-25-minimal

                      If you want to learn Salt, then continue with this post as you have been.

                      I will do both 🙂 Thanks for this.

                      1 Reply Last reply Reply Quote 0
                      • travisdh1T
                        travisdh1 @scottalanmiller
                        last edited by

                        @scottalanmiller said in Install NextCloud 11 on Fedora 25 with SaltStack:

                        Let's try this...

                        install_network_packages:
                          pkg.installed:
                            - pkgs:
                              - wget
                              - unzip
                              - firewalld
                              - net-tools
                              - php 
                              - mariadb 
                              - mariadb-server 
                              - mod_ssl
                              - php-pecl-apcu
                              - httpd 
                              - php-xml 
                              - php-gd 
                              - php-pecl-zip
                              - php-mbstring
                              - redis
                              - php-pecl-redis
                              - php-process
                              - php-pdo
                              - certbot
                              - php-mysqlnd
                              - policycoreutils
                              - policycoreutils-python
                              - policycoreutils-python-utils
                              - dnf-automatic
                              - python2-certbot-apache
                          archive:
                            - extracted
                            - name: /var/www/html/
                            - source: https://download.nextcloud.com/server/releases/nextcloud-11.0.2.zip
                            - source_hash: md5=720cb50f98a94f2888f2d07d5d4e91b4
                            - archive_format: zip
                            - if_missing: /var/www/html/nextcloud 
                        
                        /swapfile:
                          cmd.run:
                            - name: |
                                [ -f /swapfile ] || dd if=/dev/zero of=/swapfile bs=1M count={{ grains["mem_total"] * 2 }}
                                chmod 0600 /swapfile
                                mkswap /swapfile
                                swapon -a
                            - unless:
                              - file /swapfile 2>&1 | grep -q "Linux/i386 swap"
                          mount.swap:
                            - persist: true
                        
                        configure_swappiness:
                          file.append:
                            - name: /etc/sysctl.conf
                            - text: vm.swappiness = 10
                        
                        /var/www/html/:
                          file.directory:
                            - user: apache
                            - group: apache
                            - recurse:
                              - user
                              - group
                        
                        /etc/httpd/conf.d/ssl.conf:
                          file.managed:
                            - source: 
                              - salt://ssl.conf
                            - user: root
                            - group: root
                            - mode: 644
                        
                        /data:
                          file.directory:
                            - user: apache
                            - group: apache
                        
                        /var/run/redis:
                          file.directory:
                            - user: redis
                            - group: redis
                        
                        /etc/redis.conf:
                          file.managed:
                            - source:
                              - salt://redis.conf
                            - user: root
                            - group: root
                            - mode: 644
                        
                        httpd:
                          pkg.installed: []
                          service.running:
                            - enable: True
                            - require:
                              - pkg: httpd
                        
                        mariadb:
                          pkg.installed: []
                          service.running:
                            - enable: True
                            - require:
                              - pkg: mariadb
                        
                        redis:
                          pkg.installed: []
                          service.running:
                            - enable: True
                            - require:
                              - pkg: redis
                        
                        FedoraServer:
                          firewalld.present:
                            - name: FedoraServer
                            - block_icmp:
                              - echo-reply
                              - echo-request
                            - default: False
                            - masquerade: True
                            - ports:
                              - 443/tcp
                              - 22/tcp
                              - 9090/tcp
                        
                        permissive:
                          selinux.mode
                        
                        install-foo:
                          cmd.run:
                            - name: |
                                cd /var/www/html/nextcloud
                                setenforce 0
                                sudo -u apache php occ maintenance:install --database="mysql" --database-name "nextcloud" --database-user "root" --database-pass "" --admin-user "admin" --admin-pass "superdupercrazysecretepasswordthatnooneknows" --data-dir "/data"
                                sed -i "/0 => 'localhost',/a \ \ \ \ 1 => '*'," config/config.php
                                sed -i "/'installed' => true,/a \ \ 'memcache.local' => '\\\OC\\\Memcache\\\APCu',\n\ \ 'filelocking.enabled' => true,\n\ \ 'memcache.locking' => '\\\OC\\\Memcache\\\Redis',\n\ \ 'redis' => array(\n\ \ \ \ \ \ \ 'host' => '/var/run/redis/redis.sock',\n\ \ \ \ \ \ \ 'port' => 0,\n\ \ \ \ \ \ \ 'timeout' => 0.0,\n\ \ \ \ \ \ \ \ )," config/config.php
                                semanage fcontext -a -t httpd_sys_rw_content_t '/data'
                                restorecon '/data'
                                semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/config(/.*)?'
                                semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/apps(/.*)?'
                                semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/assets(/.*)?'
                                semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/.htaccess'
                                semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/.user.ini'
                                restorecon -Rv '/var/www/html/nextcloud/' > /dev/null
                                systemctl restart httpd
                                touch install_complete
                            - cwd: /var/www/html/nextcloud
                            - shell: /bin/bash
                            - timeout: 300
                            - creates: /var/www/html/nextcloud/install_complete
                        

                        Try this. Hopefully it fixes both your firewall and service issues.

                        This 2nd one worked for me, but I updated it to the latest NextCloud install.

                        install_network_packages:
                          pkg.installed:
                          - pkgs:
                          - wget
                          - unzip
                          - firewalld
                          - net-tools
                          - php
                          - mariadb
                          - mariadb-server
                          - mod_ssl
                          - php-pecl-apcu
                          - httpd
                          - php-xml
                          - php-gd
                          - php-pecl-zip
                          - php-mbstring
                          - redis
                          - php-pecl-redis
                          - php-process
                          - php-pdo
                          - certbot
                          - php-mysqlnd
                          - policycoreutils
                          - policycoreutils-python
                          - policycoreutils-python-utils
                          - dnf-automatic
                          - python2-certbot-apache
                          archive:
                            - extracted
                            - name: /var/www/html/
                            - source: https://download.nextcloud.com/server/releases/nextcloud-11.0.5.zip
                            - source_hash: md5=d503c4d28b8e193925f2c65ea1350e99
                            - archive_format: zip
                            - if_missing: /var/www/html/nextcloud
                        
                        /swapfile:
                          cmd.run:
                            - name: |
                                [ -f /swapfile ] || dd if=/dev/zero of=/swapfile bs=1M count={{ grains["mem_total"] * 2 }}
                            chmod 0600 /swapfile
                            mkswap /swapfile
                            swapon -a
                        - unless:
                          - file /swapfile 2>&1 | grep -q "Linux/i386 swap"
                          mount.swap:
                            - persist: true
                        
                        configure_swappiness:
                          file.append:
                            - name: /etc/sysctl.conf
                            - text: vm.swappiness = 10
                        
                        /var/www/html/:
                          file.directory:
                            - user: apache
                            - group: apache
                            - recurse:
                              - user
                              - group
                        
                        /etc/httpd/conf.d/ssl.conf:
                          file.managed:
                            - source:
                             - salt://ssl.conf
                            - user: root
                            - group: root
                            - mode: 644
                        
                        /data:
                          file.directory:
                            - user: apache
                            - group: apache
                        
                        /var/run/redis:
                          file.directory:
                            - user: redis
                            - group: redis
                        
                        /etc/redis.conf:
                          file.managed:
                            - source:
                          - salt://redis.conf
                          - user: root
                          - group: root
                          - mode: 644
                        
                        httpd:
                          pkg.installed: []
                          service.running:
                            - enable: True
                            - require:
                              - pkg: httpd
                        
                        mariadb:
                          pkg.installed: []
                          service.running:
                            - enable: True
                            - require:
                              - pkg: mariadb
                        
                        redis:
                          pkg.installed: []
                          service.running:
                            - enable: True
                            - require:
                              - pkg: redis
                        
                        FedoraServer:
                          firewalld.present:
                            - name: FedoraServer
                            - block_icmp:
                              - echo-reply
                              - echo-request
                            - default: False
                            - masquerade: True
                            - ports:
                              - 443/tcp
                              - 22/tcp
                              - 9090/tcp
                        
                        permissive:
                          selinux.mode
                        
                        install-foo:
                          cmd.run:
                            - name: |
                                cd /var/www/html/nextcloud
                                setenforce 0
                                sudo -u apache php occ maintenance:install --database="mysql" --database-name "nextcloud" --
                        database-user "root" --database-pass "" --admin-user "admin" --admin-pass 
                        "superdupercrazysecretepasswordthatnooneknows" --data-dir "/data"
                                sed -i "/0 => 'localhost',/a \ \ \ \ 1 => '*'," config/config.php
                                sed -i "/'installed' => true,/a \ \ 'memcache.local' => '\\\OC\\\Memcache\\\APCu',\n\ \ 'filelocking.enabled' => true,\n\ \ 'memcache.locking' => '\\\OC\\\Memcache\\\Redis',\n\ \ 'redis' => array(\n\ \ \ \ \ \ \ 'host' => '/var/run/redis/redis.sock',\n\ \ \ \ \ \ \ 'port' => 0,\n\ \ \ \ \ \ \ 'timeout' => 0.0,\n\ \ \ \ \ \ \ \ )," config/config.php
                            semanage fcontext -a -t httpd_sys_rw_content_t '/data'
                            restorecon '/data'
                            semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/config(/.*)?'
                            semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/apps(/.*)?'
                            semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/assets(/.*)?'
                            semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/.htaccess'
                            semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/.user.ini'
                            restorecon -Rv '/var/www/html/nextcloud/' > /dev/null
                            systemctl restart httpd
                            touch install_complete
                        - cwd: /var/www/html/nextcloud
                        - shell: /bin/bash
                        - timeout: 300
                        - creates: /var/www/html/nextcloud/install_complete
                        
                        1 Reply Last reply Reply Quote 0
                        • FATeknollogeeF
                          FATeknollogee
                          last edited by FATeknollogee

                          Trying to do this with v 12.0.3 (os is Fedora 26), but I'm getting one error...any ideas

                              ID: redis                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                          Function: service.running                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                            Result: False                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                           Comment: Service redis is already enabled, and is dead                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
                           Started: 00:32:28.386168                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                          Duration: 68.777 ms
                          
                          1 Reply Last reply Reply Quote 0
                          • scottalanmillerS
                            scottalanmiller
                            last edited by

                            Do this...

                            systemctl restart redis
                            systemctl status redis
                            
                            FATeknollogeeF 2 Replies Last reply Reply Quote 0
                            • black3dynamiteB
                              black3dynamite
                              last edited by

                              I notice you’re using swapfile. Is this script based on the Fedora instance that vultr provides?

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

                                @scottalanmiller said in Install NextCloud 11 on Fedora 25 with SaltStack:

                                Do this...

                                systemctl restart redis
                                systemctl status redis
                                

                                Thanks. I'm redoing the whole install, will report back in a few...

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

                                  @black3dynamite said in Install NextCloud 11 on Fedora 25 with SaltStack:

                                  I notice you’re using swapfile. Is this script based on the Fedora instance that vultr provides?

                                  That's where I use it, that's correct. I use the SATA based storage instances.

                                  1 Reply Last reply Reply Quote 0
                                  • FATeknollogeeF
                                    FATeknollogee @scottalanmiller
                                    last edited by

                                    @scottalanmiller
                                    â—Ź redis.service - Redis persistent key-value database
                                    Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; vendor preset: disabled)
                                    Drop-In: /etc/systemd/system/redis.service.d
                                    └─limit.conf
                                    Active: failed (Result: exit-code) since Fri 2017-10-06 09:14:55 PDT; 1s ago
                                    Process: 2063 ExecStart=/usr/bin/redis-server /etc/redis.conf --daemonize no (code=exited, status=1/FAILURE)
                                    Main PID: 2063 (code=exited, status=1/FAILURE)

                                    Oct 06 09:14:55 salt systemd[1]: Started Redis persistent key-value database.
                                    Oct 06 09:14:55 salt redis-server[2063]: *** FATAL CONFIG FILE ERROR ***
                                    Oct 06 09:14:55 salt redis-server[2063]: Reading the configuration file, at line 5
                                    Oct 06 09:14:55 salt redis-server[2063]: >>> 'Listen 443 https'
                                    Oct 06 09:14:55 salt redis-server[2063]: Bad directive or wrong number of arguments
                                    Oct 06 09:14:55 salt systemd[1]: redis.service: Main process exited, code=exited, status=1/FAILURE
                                    Oct 06 09:14:55 salt systemd[1]: redis.service: Unit entered failed state.
                                    Oct 06 09:14:55 salt systemd[1]: redis.service: Failed with result 'exit-code'.

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

                                      Okay, what do we have at line 5? I'm guessing you have it set to listen on HTTPS which will not work as the web server needs that.

                                      1 Reply Last reply Reply Quote 0
                                      • FATeknollogeeF
                                        FATeknollogee
                                        last edited by

                                        I just copied & pasted your files per instuction.

                                        Did I miss a step somewhere?

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

                                          @fateknollogee said in Install NextCloud 11 on Fedora 25 with SaltStack:

                                          I just copied & pasted your files per instuction.

                                          Did I miss a step somewhere?

                                          Under normal conditions, Redis does not run on port 443. Check the config file.

                                          1 Reply Last reply Reply Quote 0
                                          • FATeknollogeeF
                                            FATeknollogee
                                            last edited by

                                            Boys & gals....don't be a dumb ass like me & install stuff late at night when you are half awake!!! #dumbass

                                            Yes @scottalanmiller I copied/pasted the contents of ssl.conf & saved it as redis.conf !!

                                            scottalanmillerS 1 Reply Last reply Reply Quote 2
                                            • 1
                                            • 2
                                            • 7
                                            • 8
                                            • 9
                                            • 10
                                            • 11
                                            • 11 / 11
                                            • First post
                                              Last post