installation
The first release of Zabbix’s release package is the following:
1
|
wget http://repo.zabbix.com/zabbix/3.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.0-1+xenial_all.deb
|
which is then installed
1
|
dpkg –i zabbix–release_3.0–1+xenial_all.deb
|
So now the appropriate Repo has been added and you can install zabbix
1
2
|
apt update
apt install zabbix–server–pgsql zabbix–frontend–php zabbix–agent libapache2–mod–php7.0 php–bcmath php–mbstring php7.0–xml snmp–mibs–downloader
|
Create database
First, change the admin password. To do this, you first connect to the database:
1
|
sudo –u postgres psql
|
Change the password as follows
1
|
\password
|
Enter a new password twice and you are done. Now you create a new database and a new user and give it all rights on this:
1
2
3
4
|
sudo –u postgres psql
CREATE DATABASE zabbix WITH ENCODING=‘UTF-8’;
CREATE USER zabbix WITH PASSWORD ‘$password’;
GRANT ALL ON DATABASE zabbix TO zabbix;
|
Now we fill the database with content. For this, there is the file create.sql.gz , under / usr / share / doc / zabbix-server-pgsql / .
1
|
zcat /usr/share/doc/zabbix–server–pgsql/create.sql.gz | sudo –u postgres psql zabbix –h 127.0.0.1 –d zabbix
|
Change PostgreSQL configurations
If you only access the database locally, you can skip this here. But I wanted to access via pgadmin3.
By default the database only listens to localhost, ie 127.0.0.1. To change this, change the following in the /etc/postgresql/9.5/main/postgresql.conf file
1
|
# listen_addresses = ‘127.0.0.1’
|
after
1
|
listen_addresses = ‘*’
|
Now the configuration has to be edited, which regulates the authentication /etc/postgresql/9.5/main/pghba.conf . The following line was added:
1
2
|
# TYPE DATABASE USER ADDRESS METHOD
host all all all md5
|
This is of course still more beautiful and more restrictive, which was not necessary for my test installation now.
Then restart the service and afterwards you should access the database with pgadmin3
1
|
systemctl restart postgresql
|
Zabbix server in operation
For the service to run still the access data to the database had to be entered into the /etc/zabbix/zabbix_server.conf:
1
2
3
4
|
DBHost=127.0.0.1
DBName=zabbix
DBUser=zabbix
DBPassword=$password
|
Then you can activate and start the service:
1
2
3
4
|
systemctl enable zabbix–server
systemctl enable zabbix–agent
systemctl start zabbix–server
systemctl start zabbix–agent
|
Frontend configuration
The following line must be adapted in the /etc/apache2/conf-enabled/zabbix.conf file
1
|
<IfModule mod_php5.c>
|
after
1
|
<IfModule mod_php7.c>
|
The apache2 must then be restarted once
1
|
systemctl restart apache2
|
That was it. Now the frontend can be accessed via the browser http: // $ ip / zabbix and the installation completed.
What surprised me with this installation was, that I do not remember in older Zabbix installations such a “configuration expenditure” had. On the one hand the packages, which one still have to install manually, which, I think, were previously contained in the Dependencies and on the other hand the IfModule line in the apache2 configuration, which still contains php5. I mean it is now known that the php7 in Xenial has kept moving. But all in all, it can be done.
0 Comments