redhat:other-redhat:nextcloud-server-redhat

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
redhat:other-redhat:nextcloud-server-redhat [2020/06/04 20:15] michaelredhat:other-redhat:nextcloud-server-redhat [2021/05/21 08:12] (current) – [Installation und Konfiguration Pakete] michael
Line 18: Line 18:
 # yum -y install epel-release # yum -y install epel-release
 # yum -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm # yum -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
-# yum update -y 
  
 +# yum update -y
 # yum install -y vim wget curl setroubleshoot policycoreutils-python-utils setools yum-utils bzip2 # yum install -y vim wget curl setroubleshoot policycoreutils-python-utils setools yum-utils bzip2
 +
 +# yum module reset php
 +# dnf module install php:remi-7.4
 </code> </code>
  
Line 31: Line 34:
 ==== Installation der Package-dependencies ==== ==== Installation der Package-dependencies ====
 <code> <code>
-# yum install httpd mariadb-server redis php73-php-pecl-redis5 php73-php-pecl-imagick php73-php php73-php-cli php73-php-fpm php73-php-xml php73-php-intl php73-php-json php73-php-common php73-php-mysqlnd php73-php-opcache php73-php-process php73-php-mbstring php73-php-pecl-apcu php73-php-pecl-zip php73-php-gd+# yum install httpd mariadb-server redis php-pecl-redis5 php-pecl-imagick php-intl php-common php-pecl-apcu php-fpm php-cli php-devel php-gd php-mysqlnd php-pear php-xml php-mbstring php-json php-pecl-apcu php-pecl-apcu-devel php-pecl-imagick-devel php-intl php-opcache php-zip php-bcmath php-process php-gmp php-pecl-selinux
 </code> </code>
  
Line 52: Line 55:
 # vim /etc/httpd/conf.d/nextcloud.conf # vim /etc/httpd/conf.d/nextcloud.conf
 </code> <sxh bash; first-line: 1> </code> <sxh bash; first-line: 1>
-ServerName cloud.blackgate.org +Listen 7030
-ServerTokens Prod +
-ServerSignature Off+
  
-SetEnvIf X-Forwarded-Proto "^https$" HTTPS=on+<VirtualHost *:7030> 
 +    ServerAdmin michu@michu-it.com 
 +    ServerName cloud.michu-it.com
  
-#Redirect 301 /.well-known/carddav https://cloud.blackgate.org/remote.php/dav +    TimeOut 300 
-#Redirect 301 /.well-known/caldav https://cloud.blackgate.org/remote.php/dav+    ProxyTimeOut 300
  
-<Directory "/var/www/html/nextcloud"> +    SetEnvIf X-Forwarded-Proto "^https$HTTPS=on 
-     Options +FollowSymlinks +    ServerSignature Off
-     AllowOverride All+
  
-     <IfModule mod_dav.c> +    ErrorLog "/var/log/httpd/nextcloud-error_log" 
-         Dav off +    CustomLog "/var/log/httpd/nextcloud-access_log" combined
-     </IfModule>+
  
-     SetEnv HOME /var/www/html/nextcloud +    DocumentRoot "/var/www/html/nextcloud"
-     SetEnv HTTP_HOME /var/www/html/nextcloud+
  
-     Require all granted +    <Directory "/var/www/html/nextcloud"> 
-</Directory>+        DirectoryIndex index.html index.php 
 +        Options SymLinksifOwnerMatch 
 +        AllowOverride All 
 +       <IfModule mod_dav.c> 
 +            Dav off 
 +       </IfModule> 
 +        SetEnv HOME /var/www/html/nextcloud 
 +        SetEnv HTTP_HOME /var/www/html/nextcloud
  
-<IfModule reqtimeout_module> +        Require all granted 
-    RequestReadTimeout body=0 +    </Directory>
-</IfModule> +
-Header set X-Content-Type-Options: "nosniff" +
-Header set X-Frame-Options: "sameorigin"+
  
-#------------------------------------------------------------------------------ +    <IfModule reqtimeout_module
-#                   phpMyAdmin VirtualHost Configuration +        RequestReadTimeout body=0 
-#------------------------------------------------------------------------------ +    </IfModule>
-Listen 81 +
-<VirtualHost *:81+
-     ServerName cloud.blackgate.org +
-     ServerAdmin webmaster@localhost +
-     DocumentRoot /var/www/html/php_my_admin+
  
-     <Directory "/var/www/html/php_my_admin"> +    Header set X-Content-Type-Options: "nosniff
-             Options -Indexes +FollowSymLinks +    Header set X-Frame-Options: "sameorigin" 
-             AllowOverride None +    Header always set Content-Security-Policy "connect-src 'self' analytics.michu-it.com:443"
-             Require ip 192.168.+
-             Require ip 127.0.0.1 +
-             Require ip ::1 +
-     </Directory>+
  
 </VirtualHost> </VirtualHost>
Line 116: Line 111:
  
 <code> <code>
-php73 --ini |grep Loaded+/usr/bin/php -| grep 'Loaded Configuration File'
 </code> </code>
 +
 <sxh bash; gutter: false;> <sxh bash; gutter: false;>
-Loaded Configuration File:         /etc/php.ini+Loaded Configuration File => /etc/php.ini
 </sxh> </sxh>
  
Line 125: Line 121:
  
 <code> <code>
-# sed -i "s/post_max_size = 8M/post_max_size = 6000M/" /etc/opt/remi/php73/php.ini +# sed -i "s/post_max_size = 8M/post_max_size = 6000M/" /etc/php.ini 
-# sed -i "s/upload_max_filesize = 2M/upload_max_filesize = 6000M/" /etc/opt/remi/php73/php.ini+# sed -i "s/upload_max_filesize = 2M/upload_max_filesize = 6000M/" /etc/php.ini 
 + 
 +# sed -i "s/max_execution_time = .*/max_execution_time = 7200/" /etc/php.ini 
 +# sed -i "s/max_input_time = .*/max_input_time = 7200/" /etc/php.ini 
 +# sed -i "s/memory_limit = .*/memory_limit = 1024M/" /etc/php.ini 
 + 
 +# sed -i "s/;listen.owner = nobody/listen.owner = apache/" /etc/php-fpm.d/www.conf 
 +# sed -i "s/;listen.group = nobody/listen.group = apache/" /etc/php-fpm.d/www.conf 
 +# sed -i "s/;listen.mode = 0660/listen.mode = 0660/" /etc/php-fpm.d/www.conf
  
-# sed -i "s/max_execution_time = .*/max_execution_time 7200/" /etc/opt/remi/php73/php.ini +# sed -i "s/pm.max_children = .*/pm.max_children 120/" /etc/php-fpm.d/www.conf 
-# sed -i "s/max_input_time = .*/max_input_time 7200/" /etc/opt/remi/php73/php.ini +# sed -i "s/pm.start_servers = .*/pm.start_servers 12/" /etc/php-fpm.d/www.conf 
-# sed -i "s/memory_limit = .*/memory_limit 1024M/" /etc/opt/remi/php73/php.ini+# sed -i "s/pm.min_spare_servers = .*/pm.min_spare_servers 6/" /etc/php-fpm.d/www.conf 
 +# sed -i "s/pm.max_spare_servers = .*/pm.max_spare_servers = 18/" /etc/php-fpm.d/www.conf
  
-# sed -i "s/;opcache.enable_cli=0/opcache.enable_cli=1/" /etc/opt/remi/php73/php.d/10-opcache.ini +# sed -i "s/;opcache.enable_cli=0/opcache.enable_cli=1/" /etc/php.d/10-opcache.ini 
-# sed -i "s/opcache.max_accelerated_files=4000/opcache.max_accelerated_files=10000/" /etc/opt/remi/php73/php.d/10-opcache.ini +# sed -i "s/opcache.max_accelerated_files=4000/opcache.max_accelerated_files=10000/" /etc/php.d/10-opcache.ini 
-# sed -i "s/;opcache.revalidate_freq=2/opcache.revalidate_freq=1/" /etc/opt/remi/php73/php.d/10-opcache.ini +# sed -i "s/;opcache.revalidate_freq=2/opcache.revalidate_freq=1/" /etc/php.d/10-opcache.ini 
-# sed -i "s/;opcache.save_comments=1/opcache.save_comments=1/" /etc/opt/remi/php73/php.d/10-opcache.ini+# sed -i "s/;opcache.save_comments=1/opcache.save_comments=1/" /etc/php.d/10-opcache.ini
 </code> </code>
  
Line 152: Line 157:
 # ls -lZ /var/www/html/ # ls -lZ /var/www/html/
  
-# sed -i "s/;upload_tmp_dir =/upload_tmp_dir = \/var\/www\/html\/upload-tmp/" /etc/opt/remi/php73/php.ini+# sed -i "s/;upload_tmp_dir =/upload_tmp_dir = \/var\/www\/html\/upload-tmp/" /etc/php.ini
  
 </code> </code>
Line 266: Line 271:
 # mount -a # mount -a
 # df -h # df -h
 +
 +# chown -R apache: /mnt/blackSTORAGE
 +# chmod 775 /mnt/blackSTORAGE
 </code> </code>
 </WRAP> </WRAP>
Line 295: Line 303:
 # setsebool -P httpd_can_sendmail on           ->   Um Emails aus Nextcloud heraus senden zu können! # setsebool -P httpd_can_sendmail on           ->   Um Emails aus Nextcloud heraus senden zu können!
 # setsebool -P httpd_can_network_connect on    ->   Wird gebraucht, dass CURL in PHP funktioniert!! # setsebool -P httpd_can_network_connect on    ->   Wird gebraucht, dass CURL in PHP funktioniert!!
 +# setsebool -P domain_can_mmap_files 1         ->   Für neue Collabora_Onlin version
 +# setsebool -P httpd_use_fusefs on             ->   aktivieren! Für neue Collabora_Onlin version und anderes...
 +
 </code> </code>
  
Line 301: Line 312:
 '' ''
 <code># semanage fcontext -a -t httpd_sys_script_exec_t '/var/www/html/nextcloud/apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin/x2t'</code> <code># semanage fcontext -a -t httpd_sys_script_exec_t '/var/www/html/nextcloud/apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin/x2t'</code>
 +
 +Ab Nextcloud 19:
 +
 +<code># semanage fcontext -a -t httpd_sys_script_exec_t '/var/www/html/nextcloud/apps/richdocumentscode/collabora/Collabora_Online.AppImage'</code>
 </WRAP> </WRAP>
  
Line 324: Line 339:
  
 <code> <code>
-# systemctl enable php73-php-fpm.service --now+# systemctl enable php-fpm.service --now
 # systemctl enable httpd --now # systemctl enable httpd --now
  
-# systemctl status httpd php73-php-fpm+# systemctl status httpd php-fpm
 </code> </code>
 </WRAP> </WRAP>
Line 423: Line 438:
 <WRAP center round important 100%> <WRAP center round important 100%>
 ''**Install Caching Deps:**'' ''**Install Caching Deps:**''
-<code># yum install redis php73-php-pecl-redis5 php73-php-pecl-apcu -y+ 
 +<code># yum install redis php-pecl-redis5 php-pecl-apcu php-phpiredis -y
  
 # sed -i "s/port 6379/port 0/" /etc/redis.conf # sed -i "s/port 6379/port 0/" /etc/redis.conf
Line 457: Line 473:
 # |  |  |  |  | # |  |  |  |  |
 # *  *  *  *  * user-name  command to be executed # *  *  *  *  * user-name  command to be executed
-*/5 *  *  *  *  apache  /usr/bin/php73 -f /var/www/html/nextcloud/cron.php > /dev/null 2>&1+*/5 *  *  *  *  apache  /usr/bin/php -f /var/www/html/nextcloud/cron.php > /dev/null 2>&1
 </sxh> </sxh>
 </WRAP> </WRAP>
Line 522: Line 538:
 Type=simple Type=simple
 TimeoutStartSec=30s TimeoutStartSec=30s
-ExecStartPre=-/usr/bin/podman rm "collabora-server"+ExecStartPre=-/usr/bin/podman rm -f "collabora-server"
  
 ExecStart=/usr/bin/podman run --name collabora-server -p 9980:9980 -e DOMAIN=cloud.blackgate.org collabora/code ExecStart=/usr/bin/podman run --name collabora-server -p 9980:9980 -e DOMAIN=cloud.blackgate.org collabora/code
Line 642: Line 658:
 Type=simple Type=simple
 TimeoutStartSec=30s TimeoutStartSec=30s
-ExecStartPre=-/usr/bin/podman rm "onlyoffice-server"+ExecStartPre=-/usr/bin/podman rm -f "onlyoffice-server"
  
 ExecStart=/usr/bin/podman run --name onlyoffice-server -p 8080:80 onlyoffice/documentserver ExecStart=/usr/bin/podman run --name onlyoffice-server -p 8080:80 onlyoffice/documentserver
  • redhat/other-redhat/nextcloud-server-redhat.1591294530.txt.gz
  • Last modified: 2020/06/04 20:15
  • by michael