우분투16 zabbix 서버 설치

  다른 뜻에 대해서는 CentOS 자빅스 서버 설치 문서를 참조하십시오.
우분투16 Zabbix 설치
우분투16 자빅스 서버 설치

1 사전작업

  • 우분투 버전 확인
root@zetawiki:~# cat /etc/issue
Ubuntu 16.04.2 LTS \n \l

2 PPA 추가 (서버, 에이전트 공통)

wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb
dpkg -i zabbix-release_3.2-1+xenial_all.deb
apt update

3 서버 설치

3.1 zabbix 서버 패키지 설치

root@server:~# apt install zabbix-server-mysql zabbix-frontend-php zabbix-agent
... (생략)

3.2 MySQL(또는 MariaDB) 설정

root@server:~# mysql -uroot -p
Enter password: 디비패스워드
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by '자빅스디비패스워드';
Query OK, 0 rows affected (0.01 sec)

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> quit;
Bye
root@server:~#
root@server:~# zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql zabbix -uzabbix -p
Enter password: 자빅스디비패스워드
root@server:~#

3.3 설정파일 수정

root@server:~# vi /etc/zabbix/zabbix_server.conf
LogFile=/var/log/zabbix/zabbix_server.log
LogFileSize=0
PidFile=/var/run/zabbix/zabbix_server.pid
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=자빅스디비패스워드
Timeout=4
AlertScriptsPath=/usr/lib/zabbix/alertscripts
ExternalScripts=/usr/lib/zabbix/externalscripts
FpingLocation=/usr/bin/fping
Fping6Location=/usr/bin/fping6
LogSlowQueries=3000

3.4 서비스 시작·활성화

root@server:~# systemctl start zabbix-server
root@server:~# systemctl enable zabbix-server
Synchronizing state of zabbix-server.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install enable zabbix-server

3.5 아파치 설정

  • zabbix에 관한 아파치 설정파일 수정
root@server:~# vi /etc/apache2/conf-enabled/zabbix.conf
... (생략)
    <IfModule mod_php5.c>
        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 Europe/Riga
        php_value date.timezone Asia/Seoul
    </IfModule>
    <IfModule mod_php7.c>
        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 Europe/Riga
        php_value date.timezone Asia/Seoul
... (생략)
  • 아파치 시작
root@server:~# systemctl start apache2
root@server:~#

4 에이전트 설치

wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb
dpkg -i zabbix-release_3.2-1+xenial_all.deb
apt update
apt install zabbix-agent
systemctl start zabbix-agent

5 같이 보기

6 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}