950dc8a
=Custom in Fedora/EPEL=
083fd6f
a6b4c61
==Pinger files==
a6b4c61
a6b4c61
Since /tmp is not a good place to spool files, the pinger files shall now reside
a6b4c61
in /var/lib/zabbixsrv/tmp. This directory is automatically created and proxy and
a6b4c61
server configuration files are changed accordingly from 2.0.8 on.
a6b4c61
9738113
0080f2e
==Web configuration==
083fd6f
b5dcec3
Web configuration resides in /etc/zabbix/web. The configuration file can be
b5dcec3
created manually or by walking through the frontend setup tool, as soon as your
b5dcec3
httpd configuration allows. The directory also contains maintenance.inc.php!
083fd6f
5ec74b3
0080f2e
==Log files==
083fd6f
5ec74b3
Log files are located in /var/log/zabbix for the agent and /var/log/zabbixsrv.
5ec74b3
for server and proxy.
083fd6f
083fd6f
0080f2e
==No htaccess files==
083fd6f
083fd6f
Fedora ships an Apache configuration file instead. This solutions performs
083fd6f
better and is easier to maintain.
083fd6f
083fd6f
5ec74b3
==Two users and groups==
083fd6f
083fd6f
There's a certain security risk involved, running agent and proxy/server as the
083fd6f
same user. This package therefore introduces an additional zabbixsrv user, used
083fd6f
for proxy and server. Please check the permissions of your scripts and group
083fd6f
memberships, if necessary.
083fd6f
083fd6f
0080f2e
==Using the Alternatives system instead of conflicting sub-packages==
083fd6f
083fd6f
You can now install Zabbix proxies or servers compiled for different database
0080f2e
back-ends on the same system. While this is not intended to happily switch back
083fd6f
and forth, it allows you to:
083fd6f
083fd6f
- Stop the daemon
0080f2e
- "Run alternatives --config zabbix-server" or
0080f2e
  "alternatives --config zabbix-proxy"
083fd6f
- Make your choice
083fd6f
- If you're using systemd, run systemctl reload
083fd6f
- Adjust the configuration file
083fd6f
- Start the daemon
0080f2e
- In some cases you have to use "restart" instead of "start".
0080f2e
  The reason is not yet clear to me.
083fd6f
0080f2e
"Alternatives" considers the first installed implementation of server or proxy as
0080f2e
default, respectively.
083fd6f
0080f2e
Don't forget to reconfigure the front-end when you switch the server to a
083fd6f
different DB implementation!
083fd6f
083fd6f
9738113
==How to run multiple instances of a Zabbix daemon with init scripts==
9738113
9738113
If you want to run multiple instances on the same host, do the following:
9738113
5ec74b3
- Copy or symlink the init scripts 
9738113
- Create a file of the same name as the new init script in /etc/sysconfig
9738113
- Define CFG_FILE="</path/to/daemon_config_file>" in this file
9738113
- Create the file defined as CFG_FILE and adjust settings; in particular:
9738113
 - DB settings if you set up multiple instances of server and proxy daemons;
9738113
   IMPORTANT: Two daemons using the same database at the same time could act
9738113
   destructive!
9738113
 - PidFile
9738113
 - ListenPort and/or ListenIP, if you plan for simultaneous operation;
9738113
   Don't forget to review your firewall settings!
9738113
 - LogFile, if you don't use syslog
9738113
- Optionally run the following to register the new instance as a service and
9738113
  start it up automatically:
9738113
  chkconfig --add <init_script_name>
9738113
  chkconfig <init_script_name> on
9738113
- service <init_script_name> start
9738113
9738113
0080f2e
==Configuration changes==
083fd6f
bdd9ab7
Zabbix 2.0 and later place configuration files directly in /etc. Symlinks preserve
0080f2e
compatibility. maintenance.inc.php moved from /usr/share/zabbix/conf to
bdd9ab7
/etc/zabbix/web. Be careful not to replace the symlinks with files by mistake,
bdd9ab7
as the agent will not pick them up!
083fd6f
083fd6f
907930f
==Media scripts and external scripts==
083fd6f
907930f
The directories for external scripts and media scripts have moved to
907930f
/var/lib/zabbixsrv. Symlinks preserve compatibility.
083fd6f
083fd6f
/var/lib/zabbix is now intended for scripts run by the agent. Please move your
083fd6f
server or proxy scripts to /var/lib/zabbixsrv. Be sure to check permissions and
083fd6f
ownership.
083fd6f
083fd6f
0080f2e
==No Java bridge==
083fd6f
e704152
The Zabbix Java bridge can not be included now, due to missing dependencies.
083fd6f
cacc717
cacc717
=SELinux=
cacc717
cacc717
The settings necessary for you vary, depending on how you set up your system/s.
cacc717
Most of the time, the only adjustments necessary should be on the machine that
cacc717
holds the frontend:
cacc717
cacc717
#Allow to connect the frontend to a database by other means than sockets
cacc717
setsebool -P httpd_can_network_connect_db 1
cacc717
cacc717
#Allow the frontend to create a connection to the server listening port
cacc717
#That's the check the frontend uses to see whether the server is running.
cacc717
#This option effectively supersedes the previous
cacc717
setsebool -P httpd_can_network_connect 1
cacc717
cacc717
Using sebools is a somewhat coarse method of allowing things.
cacc717
A more fine-grained approach for the latter would be to grab an actual
cacc717
avc denial from the audit log, pipe it through audit2allow, put it in a
cacc717
module package and load that:
cacc717
cacc717
echo "avc:  denied  { name_connect } for  pid=20619 comm="httpd" dest=10051 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:zabbix_port_t:s0 tclass=tcp_socket" | audit2allow -M zabbix_conn_httpd; sudo semodule -i zabbix_conn_httpd.pp
cacc717
cacc717
If you're using ping from the frontend:
cacc717
cacc717
echo "avc:  denied  { setpgid } for  pid=31880 comm="zabbix_server_p" scontext=system_u:system_r:zabbix_t:s0 tcontext=system_u:system_r:zabbix_t:s0 tclass=process" | audit2allow -M zabbix_ping_frontend; sudo semodule -i zabbix_ping_frontend.pp
083fd6f
e704152
bdd9ab7
=Additional packaging changes in Fedora/EPEL since 3.0=
bdd9ab7
bdd9ab7
==Configuration files contain the actual defaults==
bdd9ab7
Previously, the defaults in the config file were replaced by settings that
bdd9ab7
are suitable for Fedora. For non-mandatory settings, the daemon would default
bdd9ab7
to the hardcoded setting though, which is confusing. To make this
bdd9ab7
obvious, the original default settings are left in place and additional lines
bdd9ab7
added instead.
bdd9ab7
bdd9ab7
==Daemons are running in the foreground mode==
bdd9ab7
Systemd is more happy with this and it also solves the problem for the pidfile
bdd9ab7
setting, described in BZ #1220392. It is related to the above-mentioned.
bdd9ab7
bdd9ab7
==Minimal PHP configuration==
bdd9ab7
The httpd configuration contains the minimal settings necessary to operate
bdd9ab7
the frontend. Please refer to the manual for details:
bdd9ab7
https://www.zabbix.com/documentation/3.0/manual/installation/install
bdd9ab7
bdd9ab7
Make sure to review these settings!
bdd9ab7
5ec74b3
5ec74b3
=Additional packaging changes in Fedora/EPEL since 2.0=
5ec74b3
5ec74b3
==Zabbix 2.2 conflicts 1.8 and 2.0==
5ec74b3
5ec74b3
Please see the below section for the reason!
5ec74b3
5ec74b3
5ec74b3
==Agent init script/unit file name==
5ec74b3
For the sake of consistency between distributions, the agent init script,
5ec74b3
respectively the systemd unit file, was renamed to zabbix-agentd -- mind the
5ec74b3
trailing "d"! Symlinks with the old names are in place. Keep in mind, if
5ec74b3
you created a configuration file in /etc/sysconfig, the sourced file must
5ec74b3
the name of the init script you invoke! Consequently, if you decide to use
5ec74b3
zabbix-agentd in the future, copy or symlink this file.
5ec74b3
5ec74b3
5ec74b3
==zabbixsrv now has its own user group==
5ec74b3
5ec74b3
zabbixsrv used to be a member of the zabbix user group. Completely fresh
5ec74b3
installations will create the zabbixsrv group and assign it as the primary
5ec74b3
group. If the user zabbixsrv already exists (upgrade from 2.0), the user group
5ec74b3
is replaced.
5ec74b3
5ec74b3
5ec74b3
==Log and lock file locations, group membership==
5ec74b3
5ec74b3
All logs used to be in /var/log/zabbix. With zabbixsrv having its own
5ec74b3
user group, the logs are now split between /var/log/zabbix for the agent and
5ec74b3
/var/log/zabbixsrv for server and proxy.
5ec74b3
5ec74b3
5ec74b3
=Additional packaging changes in Fedora/EPEL since 1.8=
5ec74b3
5ec74b3
==Zabbix 2.0 packages conflict Zabbix 1.8; 2.2 conflicts 1.8 and 2.0==
5ec74b3
5ec74b3
This measure was taken because this major version introduces various database
5ec74b3
schema changes. A silent update would render Zabbix non-operational and possibly
5ec74b3
break the database. Besides that, Zabbix 2.0/2.2 server only works with the
5ec74b3
respective major versions of servers and proxies. Distributed setups must
5ec74b3
therefore be updated at the same time to keep working.
5ec74b3
5ec74b3
http://www.zabbix.com/documentation/2.0/manual/appendix/compatibility
5ec74b3
http://www.zabbix.com/documentation/2.2/manual/appendix/compatibility
5ec74b3
083fd6f
--------------------------------------------------------------------------------
083fd6f
5ec74b3
=Guide for upgrading to 2.2 from 2.0=
5ec74b3
5ec74b3
https://www.zabbix.com/documentation/2.2/manual/installation/upgrade
5ec74b3
https://www.zabbix.com/documentation/2.2/manual/installation/upgrade_notes_220
5ec74b3
5ec74b3
Be sure to read the upgrades notes of the latest minor release too!
5ec74b3
5ec74b3
- Review all rpmnew and rpmsave files; merge where necessary
5ec74b3
- Review permissions, ownerships and group memberships for zabbixsrv
5ec74b3
- Migrate server and proxy logs to the new location, if you want
5ec74b3
- Back up the Zabbix database (really!)
5ec74b3
- Remove custom database changes, if any
5ec74b3
- Make sure the database user has sufficing permissions
5ec74b3
  (ALTER TABLE, DROP INDEX, DROP TABLE, ...)
5ec74b3
- Start the server
5ec74b3
- Check the server log for progress and possible errors
5ec74b3
  The schema conversion should finish within minutes or hours
5ec74b3
5ec74b3
5ec74b3
Volker Fröhlich volker27@gmx.at Jan  5 2013