Updated CentOS images

This commit is contained in:
Alexey Pustovalov 2020-04-26 21:36:05 +03:00
parent 04c4ae6606
commit cd0773fba3
17 changed files with 48 additions and 22 deletions

View File

@ -196,7 +196,7 @@ services:
- mysql-server
- zabbix-server
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
interval: 10s
timeout: 5s
retries: 3
@ -249,7 +249,7 @@ services:
- mysql-server
- zabbix-server
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
interval: 10s
timeout: 5s
retries: 3

View File

@ -212,7 +212,7 @@ services:
- mysql-server
- zabbix-server
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
interval: 10s
timeout: 5s
retries: 3
@ -269,7 +269,7 @@ services:
- mysql-server
- zabbix-server
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
interval: 10s
timeout: 5s
retries: 3

View File

@ -199,7 +199,7 @@ services:
- postgres-server
- zabbix-server
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
interval: 10s
timeout: 5s
retries: 3
@ -252,7 +252,7 @@ services:
- postgres-server
- zabbix-server
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
interval: 10s
timeout: 5s
retries: 3

View File

@ -204,7 +204,7 @@ services:
- postgres-server
- zabbix-server
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
interval: 10s
timeout: 5s
retries: 3
@ -258,7 +258,7 @@ services:
- postgres-server
- zabbix-server
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
interval: 10s
timeout: 5s
retries: 3

View File

@ -33,4 +33,3 @@ serverurl = unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket
[include]
files = /etc/supervisor/conf.d/*.conf

View File

@ -17,7 +17,7 @@ stdout_logfile = /dev/stdout
stdout_logfile_maxbytes = 0
[program:snmptrapd]
command = /usr/sbin/%(program_name)s -m '+ALL' -M /usr/share/snmp/mibs/:/var/lib/zabbix/mibs -f -n -Lo -p /var/run/snmptrapd.pid -C -c /etc/snmp/%(program_name)s.conf
command = /usr/sbin/%(program_name)s -m '+ALL' -M /usr/share/snmp/mibs/:/var/lib/zabbix/mibs -f -n -Lo -p /var/run/snmptrapd.pid -C -c /etc/snmp/%(program_name)s.conf udp:0.0.0.0:1162
auto_start = true
autorestart = true
priority = 100

View File

@ -1,17 +1,17 @@
; supervisor config file
[unix_http_server]
file = /var/run/supervisor.sock ; (the path to the socket file)
file = /tmp/supervisor.sock ; (the path to the socket file)
chmod = 0700 ; sockef file mode (default 0700)
username = zbx
password = password
[supervisord]
logfile = /dev/stdout ; (main log file;default $CWD/supervisord.log)
pidfile = /var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
pidfile = /tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir = /tmp ; ('AUTO' child log dir, default $TEMP)
critical = critical
user = root
;user = zabbix
logfile_maxbytes = 0
logfile_backupcount = 0
loglevel = info
@ -23,7 +23,7 @@ loglevel = info
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl = unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket
serverurl = unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket
; The [include] section can just contain the "files" setting. This
; setting can list multiple files (separated by whitespace or

View File

@ -57,6 +57,10 @@ file_env() {
unset "$fileVar"
}
prepare_system() {
echo "** Preparing the system"
}
escape_spec_char() {
local var_value=$1
@ -199,6 +203,10 @@ prepare_web_server() {
fi
}
clear_deploy() {
echo "** Cleaning the system"
}
prepare_zbx_web_config() {
local server_name=""

View File

@ -31,6 +31,12 @@ RUN set -eux && \
php-mbstring \
php-mysql \
php-xml && \
rm -f "/etc/httpd/conf.d/default.conf" && \
rm -f "/etc/httpd/conf.d/ssl.conf" && \
sed -ri \
-e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \
-e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \
"/etc/httpd/conf/httpd.conf" && \
sed -i 's/Listen 80/Listen 8080/g' /etc/httpd/conf/httpd.conf && \
yum -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
@ -72,6 +78,9 @@ RUN set -eux && \
chown --quiet -R zabbix:root /etc/httpd/ /etc/php.d/ /etc/php.ini && \
chgrp -R 0 /etc/httpd/ /etc/php.d/ /etc/php.ini && \
chmod -R g=u /etc/httpd/ /etc/php.d/ /etc/php.ini && \
chown --quiet -R zabbix:root /run/httpd/ /var/lib/php/session/ && \
chgrp -R 0 /run/httpd/ /var/lib/php/session/ && \
chmod -R g=u /run/httpd/ /var/lib/php/session/ && \
yum -y history undo `yum -q history | sed -n 3p |column -t | cut -d' ' -f1` && \
yum -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \

View File

@ -0,0 +1,3 @@
<IfModule !mpm_netware_module>
PidFile "/tmp/httpd.pid"
</IfModule>

View File

@ -57,6 +57,10 @@ file_env() {
unset "$fileVar"
}
prepare_system() {
echo "** Preparing the system"
}
escape_spec_char() {
local var_value=$1
@ -178,7 +182,7 @@ check_db_connect() {
}
prepare_web_server() {
APACHE_SITES_DIR=/etc/apache2/conf.d
APACHE_SITES_DIR=/etc/httpd/conf.d
echo "** Adding Zabbix virtual host (HTTP)"
if [ -f "$ZABBIX_ETC_DIR/apache.conf" ]; then
@ -199,6 +203,10 @@ prepare_web_server() {
fi
}
clear_deploy() {
echo "** Cleaning the system"
}
prepare_zbx_web_config() {
local server_name=""

View File

@ -32,6 +32,7 @@ RUN set -eux && \
php-xml \
supervisor && \
rm -f /etc/nginx/conf.d/*.conf && \
rm -f /etc/php-fpm.d/www.conf && \
yum -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /etc/udev/hwdb.bin /root/.pki

View File

@ -12,7 +12,6 @@
; Relative path can also be used. They will be prefixed by:
; - the global prefix if it's been set (-p argument)
; - /usr otherwise
include = /etc/php-fpm.d/*.conf
;;;;;;;;;;;;;;;;;;
; Global Options ;

View File

@ -6,4 +6,3 @@ max_input_time=300
always_populate_raw_post_data=-1
max_input_vars=10000
; date.timezone=Europe/Riga
;session.save_path=/var/lib/php/

View File

@ -1,5 +1,5 @@
server {
listen 80;
listen 8080;
server_name zabbix;
index index.php;
@ -51,7 +51,7 @@ server {
}
location ~ .php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_pass unix:/tmp/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name;

View File

@ -1,5 +1,5 @@
server {
listen 443 ssl http2;
listen 8443 ssl http2;
server_name zabbix;
server_name_in_redirect off;
@ -75,7 +75,7 @@ server {
}
location ~ .php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_pass unix:/tmp/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name;

View File

@ -247,7 +247,7 @@ prepare_zbx_web_config() {
ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php"
PHP_CONFIG_FILE="/etc/php7/conf.d/99-zabbix.ini"
PHP_CONFIG_FILE="/etc/php.d/99-zabbix.ini"
update_config_var "$PHP_CONFIG_FILE" "max_execution_time" "${ZBX_MAXEXECUTIONTIME:-"600"}"
update_config_var "$PHP_CONFIG_FILE" "memory_limit" "${ZBX_MEMORYLIMIT:-"128M"}"