ZABIX Installation Configuration Sinicized

Get set

First go to the official website
https://www.zabbix.com/documentation/3.2/manual/installation/install_from_packages/repository_installation

Here you install some trusted certificates, or components, based on your own system.

In order to be able to use it quickly, I did not go into it.

After the installation is completed,
Now you are ready to install Zabbix server with MySQL or server with PostreSQL, agent and proxy.

zabbix needs mysql or postresql as database support. I choose mysql which I am familiar with.

mysql

https://www.zabbix.com/documentation/3.2/manual/installation/install_from_packages/server_installation_with_mysql#debianubuntu

If you haven't installed mysql before, there won't be any other problems here. If you've installed it on a machine before, there may be a slight problem. But since you have installed it, don't be afraid to encounter problems, you have to believe that we will solve it.

apt-get install zabbix-server-mysql zabbix-frontend-php

I suggest you install it separately, first install mysql, and then install php.
So which link has a problem, easy to locate and solve, otherwise too many log s, not clear.

mysql is about 180M (previously installed). During the process, you are prompted to enter the password of root, that is, the password of mysql root. This must be remembered. It is very troublesome to lose.

mysql start/running, process 12501
Setting up libiksemel3 (1.2-4.2) ...
Setting up libopenipmi0 (2.0.18-0ubuntu7.2) ...
Setting up fping (3.8-1) ...
Setting up zabbix-server-mysql (1:3.2.7-1+trusty) ...
Setting up libhtml-template-perl (2.95-1) ...
Setting up mysql-common-5.6 (5.6.33-0ubuntu0.14.04.1) ...
Setting up snmpd (5.7.2~dfsg-8.1ubuntu3.2) ...
update-rc.d: warning:  stop runlevel arguments (1) do not match snmpd Default-Stop values (0 1 6)
 * Starting network management services:                                                                            Processing triggers for libc-bin (2.19-0ubuntu6.9) ...
Processing triggers for ureadahead (0.100.0-16) ...

I made no mistake here. A warning doesn't matter.

php

That's the separate installation mentioned above.

apt-get install zabbix-frontend-php

About 50M.

apache2_invoke: Enable module php5
 * Restarting web server apache2                                                                                    AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 219.228.12.113. Set the 'ServerName' directive globally to suppress this message
                                                                                                             [ OK ]
Setting up php5 (5.5.9+dfsg-1ubuntu4.21) ...
Setting up zabbix-frontend-php (1:3.2.7-1+trusty) ...
update-alternatives: using /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf to provide /usr/share/zabbix/fonts/graphfont.ttf (zabbix-frontend-font) in auto mode
Enabling conf zabbix.
To activate the new configuration, you need to run:
  service apache2 reload
Processing triggers for libc-bin (2.19-0ubuntu6.9) ...

There is no error message, but the prompt is to configure the file.

Create mysql tables

shell> mysql -uroot -p<root_password>
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '<password>';
mysql> quit;

The root password you created when you installed mysql

I don't know exactly what it is, but I used zabbix.

Then initialize and execute

zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uzabbix -p zabbix

You will be prompted to enter your password, because I used zabbix above, so I also enter zabbix here.
Then the terminal didn't seem to respond, so I waited a little here to see the performance of the machine. I waited about 5 seconds to complete the initialization.

Configure zabbix_server

# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=<password>

Just now I used zabbix.

# service zabbix-server start
# update-rc.d zabbix-server enable

Start the service and set it to boot.

zabbix php configuration

vi /etc/zabbix/apache.conf

php_value max_execution_time 300
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time 300
php_value always_populate_raw_post_data -1
php_value date.timezone Asia/Shanghai

The previous configuration item already exists, just change the time zone of the last line to Asia/Shanghai.
And remove the comment. It's best to configure both PHP5 and php7

Front Configuration

https://www.zabbix.com/documentation/3.2/manual/installation/install#installing_frontend

Visit
http://ip/zabbix/setup.php

No problem, just click on the next step.
Need to be configured
The password of the Configure DB connection page
My name is zabbix.

Later default is OK.

The default username password for zabbix after completion is
Admin/zabbix

Note that Admin should be capitalized

Call out Chinese Options

modify

whereis zabbix
vim /usr/share/zabbix/include/locales.inc.php

'zh_CN' => ['name' => _('Chinese (zh_CN)'),     'display' => true]

If it's true, it can't be chosen.

Install Chinese Packet for System

apt-get install language-pack-zh-hant language-pack-zh-hans

To configure

 sudo vi /etc/environment
 Add language and coding settings to the file:

LANG="zh_CN.UTF-8"
LANGUAGE="zh_CN:zh:en_US:en"

restart

sudo dpkg-reconfigure locales
service apache2 restart

Now you can check, but if you draw, there will still be spaces in Chinese characters, because there is no font.

mkdir test
cd test
 wget http://dx.sc.chinaz.com/Files/DownLoad/font2/dd.rar
 apt-get install unrar
 unrar x dd.rar
 cd dd
cp msyh.ttf /usr/share/zabbix/fonts/
vim /usr/share/zabbix/include/defines.inc.php

modify

define('ZBX_GRAPH_FONT_NAME', 'graphfont'); // font file name 

by

define('ZBX_GRAPH_FONT_NAME', 'msyh'); // font file name

Restart Completion

Keywords: Zabbix MySQL PHP Database

Added by sstoveld on Thu, 06 Jun 2019 00:20:47 +0300