/[smecontribs]/rpms/smeserver-zabbix-server/contribs10/smeserver-zabbix-server-0.1-Switch-to-specific-php-fpm.patch
ViewVC logotype

Contents of /rpms/smeserver-zabbix-server/contribs10/smeserver-zabbix-server-0.1-Switch-to-specific-php-fpm.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Fri Nov 5 11:11:26 2021 UTC (2 years, 6 months ago) by brianr
Branch: MAIN
CVS Tags: smeserver-zabbix-server-0_1-29_el7_sme, smeserver-zabbix-server-0_1-28_el7_sme, smeserver-zabbix-server-0_1-25_el7_sme, smeserver-zabbix-server-0_1-27_el7_sme, smeserver-zabbix-server-0_1-26_el7_sme, smeserver-zabbix-server-0_1-30_el7_sme, smeserver-zabbix-server-0_1-31_el7_sme, HEAD
* Mon Nov 01 2021 BogusDateBot
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
  by assuming the date is correct and changing the weekday.
  Tue Mar 02 2009 --> Tue Feb 24 2009 or Mon Mar 02 2009 or Tue Mar 03 2009 or ....
  Wed Feb 07 2016 --> Wed Feb 03 2016 or Sun Feb 07 2016 or Wed Feb 10 2016 or ....

1 diff -urN smeserver-zabbix-server-0.1.old/createlinks smeserver-zabbix-server-0.1/createlinks
2 --- smeserver-zabbix-server-0.1.old/createlinks 2021-11-01 10:33:22.030037529 +0000
3 +++ smeserver-zabbix-server-0.1/createlinks 2021-11-01 15:38:51.326745050 +0000
4 @@ -8,6 +8,8 @@
5 templates2events("/etc/httpd/conf/httpd.conf", $event);
6 templates2events("/etc/zabbix/zabbix_server.conf", qw(zabbix-server-update bootstrap-console-save));
7 templates2events("/etc/zabbix/zabbix.conf.php", qw(zabbix-server-update bootstrap-console-save));
8 +
9 +
10 # new path with zabbix 4.4.6
11 templates2events("/etc/zabbix/web/zabbix.conf.php", qw(zabbix-server-update bootstrap-console-save));
12 templates2events("/etc/sudoers", $event);
13 @@ -48,12 +50,13 @@
14 /etc/zabbix/zabbix_server.conf
15 /usr/share/zabbix/.user.ini
16 /etc/systemd/system-preset/49-koozali.preset
17 + /etc/opt/remi/php74/php-fpm.d/www.conf
18
19 ));
20
21 event_services("$contrib-update", qw(
22 httpd-e-smith sigusr1
23 - php-fpm reload
24 + php74-php-fpm reload
25 zabbix-server start
26 ));
27
28 diff -urN smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98zabbix-web smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98zabbix-web
29 --- smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98zabbix-web 2021-11-01 10:33:22.023037463 +0000
30 +++ smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98zabbix-web 2021-11-01 15:28:12.969402319 +0000
31 @@ -20,7 +20,7 @@
32 Options FollowSymLinks
33
34 <FilesMatch .php>
35 - SetHandler "proxy:unix:/var/run/php-fpm/php$version.sock|fcgi://localhost"
36 + SetHandler "proxy:unix:/var/run/php-fpm/php74-zabbix-server.sock|fcgi://localhost"
37 </FilesMatch>
38
39 #AddType application/x-httpd-php .php
40 diff -urN smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20zabbix-server smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20zabbix-server
41 --- smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20zabbix-server 1970-01-01 01:00:00.000000000 +0100
42 +++ smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20zabbix-server 2021-11-02 19:12:00.318845608 +0000
43 @@ -0,0 +1,56 @@
44 +{
45 +if ($PHP_VERSION eq '74'){
46 + if ((${'zabbix-server'}{status} || 'disabled') eq 'enabled'){
47 + my $id = 'zabbix-server';
48 + my $openbasedir = '/usr/share/zabbix:/var/cache/zabbix/:/var/run/php-fpm/:/var/lib/php/zabbix/' .
49 + ':/var/lock/zabbix/:/etc/zabbix/:/usr/share/php/:/usr/share/pear/:/opt/remi/php74/root/usr/share/pear/' .
50 + ':/opt/remi/php74/root/usr/share/php/';
51 + $disablefunctions = 'system, show_source, symlink, exec, dl, shell_exec, passthru, phpinfo, ' .
52 + 'escapeshellarg, escapeshellcmd';
53 +
54 + $OUT .=<<_EOF;
55 +
56 +[php$PHP_VERSION-$id]
57 +user = www
58 +group = www
59 +listen.owner = root
60 +listen.group = www
61 +listen.mode = 0660
62 +listen = /var/run/php-fpm/php$PHP_VERSION-$id.sock
63 +pm = dynamic
64 +pm.max_children = 15
65 +pm.start_servers = 3
66 +pm.min_spare_servers = 3
67 +pm.max_spare_servers = 4
68 +pm.max_requests = 1000
69 +request_terminate_timeout = 30
70 +php_admin_value[session.save_path] = /var/lib/php/zabbix/session
71 +php_admin_value[opcache.file_cache] = /var/lib/php/zabbix/opcache
72 +php_admin_value[upload_tmp_dir] = /var/lib/php/zabbix/tmp
73 +php_admin_value[error_log] = /var/log/php/zabbix/error.log
74 +slowlog = /var/log/php/zabbix/slow.log
75 +php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f php@{ $DomainName }
76 +php_admin_flag[display_errors] = off
77 +php_admin_flag[log_errors] = on
78 +php_admin_value[error_log] = syslog
79 +php_admin_value[memory_limit] = 256M
80 +php_admin_value[max_execution_time] = 600
81 +php_admin_value[max_input_time] = 600
82 +php_admin_value[post_max_size] = 32M
83 +php_admin_value[upload_max_filesize] = 16M
84 +php_admin_value[disable_functions] = $disablefunctions;
85 +php_admin_value[open_basedir] = $openbasedir;
86 +php_admin_flag[allow_url_fopen] = on
87 +php_admin_flag[file_upload] = off
88 +php_admin_flag[session.cookie_httponly] = on
89 +php_admin_flag[allow_url_include] = off
90 +php_admin_value[session.save_handler] = files
91 +php_admin_value[always_populate_raw_post_data] = -1
92 +
93 +_EOF
94 + }
95 + else{
96 + $OUT .= '; Zabbix Server is disabled';
97 + }
98 +}
99 +}

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed