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?
-
@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.
-
@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?
-
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.
-
@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
-
@JaredBusch Does NetInstall allow you to pick and choose packages during the setup?
-
@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 -
@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.
-
I am going to blow up my nextcloud vm and start with the Fedora netinstall.
-
@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-minimalIf you want to learn Salt, then continue with this post as you have been.
-
@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-minimalIf you want to learn Salt, then continue with this post as you have been.
I will do both Thanks for this.
-
@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
-
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
-
Do this...
systemctl restart redis systemctl status redis
-
I notice you’re using swapfile. Is this script based on the Fedora instance that vultr provides?
-
@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...
-
@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.
-
@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'. -
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.
-
I just copied & pasted your files per instuction.
Did I miss a step somewhere?