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.1k
    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 @scottalanmiller
      last edited by

      @scottalanmiller Thanks. I did remove the empty install_completed file and the update went through the process until it asked if I wanted to leave maintenance mode and it indicated I should because I was using the web interface. That is when i got the update needed message i screenshot above.

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

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

        @FATeknollogee Yes. I created a dedicated CentOS 7 VM for the master and created a VM with Fedora 25 for the nextcloud minion.

        Any specific reason for using 1x CentOS and 1x Fedora 25 vm?

        wrx7mW scottalanmillerS 2 Replies Last reply Reply Quote 0
        • wrx7mW
          wrx7m @FATeknollogee
          last edited by

          @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

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

            @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.

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

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

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

              @FATeknollogee Yes. I created a dedicated CentOS 7 VM for the master and created a VM with Fedora 25 for the nextcloud minion.

              Any specific reason for using 1x CentOS and 1x Fedora 25 vm?

              One is for Salt and the other is for NextCloud. Fedora is fully updated for NextCloud. CentOS is great for stable Salt Master.

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

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

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

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

                @FATeknollogee Yes. I created a dedicated CentOS 7 VM for the master and created a VM with Fedora 25 for the nextcloud minion.

                Any specific reason for using 1x CentOS and 1x Fedora 25 vm?

                One is for Salt and the other is for NextCloud. Fedora is fully updated for NextCloud. CentOS is great for stable Salt Master.

                Do you gain or lose anything if both vm's were Fedora 25?

                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:

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

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

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

                  @FATeknollogee Yes. I created a dedicated CentOS 7 VM for the master and created a VM with Fedora 25 for the nextcloud minion.

                  Any specific reason for using 1x CentOS and 1x Fedora 25 vm?

                  One is for Salt and the other is for NextCloud. Fedora is fully updated for NextCloud. CentOS is great for stable Salt Master.

                  Do you gain or lose anything if both vm's were Fedora 25?

                  Perfectly fine. No need for CentOS for Salt Master.

                  1 Reply Last reply Reply Quote 0
                  • 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
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 10
                                            • 11
                                            • 3 / 11
                                            • First post
                                              Last post