Merge branch 'ent-fix-docker-image-from' into 'develop'
Adapted to centos7 See merge request artica/pandorafms!4732
This commit is contained in:
commit
a4d7653cf9
|
@ -20,22 +20,30 @@ RUN cd /tmp/pandorafms/pandora_agents/unix && \
|
||||||
# Set the server's name in Apache's configuration file to avoid warnings.
|
# Set the server's name in Apache's configuration file to avoid warnings.
|
||||||
RUN sed -i "s/#ServerName.*/ServerName localhost:80/" /etc/httpd/conf/httpd.conf
|
RUN sed -i "s/#ServerName.*/ServerName localhost:80/" /etc/httpd/conf/httpd.conf
|
||||||
|
|
||||||
|
COPY my.cnf /etc/my.cnf
|
||||||
|
|
||||||
# Install the Pandora FMS Console.
|
# Install the Pandora FMS Console.
|
||||||
RUN service mysqld start && \
|
RUN rm -rf /var/lib/mysql && mkdir -p /var/lib/mysql && \
|
||||||
/usr/bin/mysqladmin -u root password "$DB_PASS" && \
|
mkdir -p /var/log/mysql/ && chown mysql. /var/log/mysql && \
|
||||||
service httpd start && \
|
chown mysql. -R /var/lib/mysql && \
|
||||||
cp -r /tmp/pandorafms/pandora_console /var/www/html && \
|
sudo -u mysql mysqld --initialize --explicit_defaults_for_timestamp && \
|
||||||
chown -R apache.apache /var/www/html/pandora_console/ && \
|
sudo -u mysql mysqld --daemonize & \
|
||||||
python /tmp/pandorafms/tests/install_console.py
|
sleep 15 && \
|
||||||
|
mysql_default_pass=$(cat /var/log/mysql/mysqld.log | grep "temporary password" | awk '{print $NF}') && \
|
||||||
|
mysqladmin -u root -p"$mysql_default_pass" --user=root password 'pandora' && \
|
||||||
|
httpd -k start && \
|
||||||
|
cp -r /tmp/pandorafms/pandora_console /var/www/html && \
|
||||||
|
chown -R apache.apache /var/www/html/pandora_console/ && \
|
||||||
|
python /tmp/pandorafms/tests/install_console.py
|
||||||
|
|
||||||
# Redirect HTTP requests to / to the Pandora FMS Console.
|
# Redirect HTTP requests to / to the Pandora FMS Console.
|
||||||
RUN echo '<meta http-equiv="refresh" content="0;url=/pandora_console">' > /var/www/html/index.html
|
RUN echo '<meta http-equiv="refresh" content="0;url=/pandora_console">' > /var/www/html/index.html
|
||||||
|
|
||||||
# Create the entrypoint script.
|
# Create the entrypoint script.
|
||||||
RUN echo -e '#/bin/bash\n \
|
RUN echo -e '#/bin/bash\n \
|
||||||
service mysqld start &&\n \
|
sudo -u mysql mysqld --daemonize &&\n \
|
||||||
service httpd start &&\n \
|
httpd -k start &&\n \
|
||||||
service crond start &&\n \
|
/usr/sbin/crond &&\n \
|
||||||
/etc/init.d/pandora_agent_daemon start && \
|
/etc/init.d/pandora_agent_daemon start && \
|
||||||
/etc/init.d/pandora_server start && \
|
/etc/init.d/pandora_server start && \
|
||||||
tail -f /var/log/pandora/pandora_server.log' \
|
tail -f /var/log/pandora/pandora_server.log' \
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
[mysqld]
|
||||||
|
pid-file=/var/run/mysqld/mysqld.pid
|
||||||
|
log-error=/var/log/mysql/mysqld.log
|
||||||
|
datadir=/var/lib/mysql
|
||||||
|
socket=/var/lib/mysql/mysql.sock
|
||||||
|
user=mysql
|
||||||
|
character-set-server=UTF8MB4
|
||||||
|
skip-character-set-client-handshake
|
||||||
|
# Mysql optimizations for Pandora FMS
|
||||||
|
# Please check the documentation in http://pandorafms.com for better results
|
||||||
|
|
||||||
|
max_allowed_packet = 32M
|
||||||
|
innodb_buffer_pool_size = 256M
|
||||||
|
innodb_lock_wait_timeout = 120
|
||||||
|
innodb_file_per_table
|
||||||
|
innodb_flush_log_at_trx_commit = 2
|
||||||
|
innodb_flush_method = O_DIRECT
|
||||||
|
innodb_log_file_size = 64M
|
||||||
|
innodb_log_buffer_size = 16M
|
||||||
|
#innodb_io_capacity = 100
|
||||||
|
#thread_cache_size = 8
|
||||||
|
thread_stack = 256K
|
||||||
|
max_connections = 130
|
||||||
|
|
||||||
|
key_buffer_size=128K
|
||||||
|
read_buffer_size=128K
|
||||||
|
read_rnd_buffer_size=128K
|
||||||
|
sort_buffer_size=256K
|
||||||
|
join_buffer_size=2M
|
||||||
|
|
||||||
|
sql_mode=""
|
||||||
|
|
||||||
|
# testing
|
||||||
|
#innodb_lru_scan_depth = 256
|
||||||
|
#innodb_page_cleaners = 8
|
||||||
|
#innodb_buffer_pool_instances = 4
|
||||||
|
|
||||||
|
skip_name_resolve
|
||||||
|
innodb=1
|
||||||
|
thread_cache_size = 120
|
||||||
|
table_definition_cache = 4000
|
||||||
|
table_open_cache = 4000
|
||||||
|
|
||||||
|
[mysqld_safe]
|
||||||
|
log-error=/var/log/mysql/mysqld.log
|
||||||
|
pid-file=/var/run/mysqld/mysqld.pid
|
Loading…
Reference in New Issue