"CentOS7 자빅스 서버 3.0 설치"의 두 판 사이의 차이

 
(같은 사용자의 중간 판 하나는 보이지 않습니다)
189번째 줄: 189번째 줄:
</source>
</source>


==방화벽 오픈==
==(Optional) 방화벽 오픈==
<source lang='console'>
<source lang='console'>
[root@zabbix1 ~]# systemctl stop firewalld
[root@zabbix1 ~]# firewall-cmd --permanent --zone=public --add-port=80/tcp
[root@zabbix1 ~]#  
success
[root@zabbix1 ~]# firewall-cmd --reload
[root@zabbix1 ~]# firewall-cmd --list-ports
80/tcp
</source>
</source>


199번째 줄: 202번째 줄:


==같이 보기==
==같이 보기==
* [[같이보기]]
* [[자빅스]]
* [[같이보기]]
* [[같이보기]]
* [[같이보기]]


==참고==
==참고==

2018년 1월 11일 (목) 18:07 기준 최신판

CentOS7 자빅스 서버 3.0 설치

1 사전작업[ | ]

2 자빅스 Repo 등록[ | ]

[root@zabbix1 ~]# yum install http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
... (생략)
===============================================================================
 Package         Arch    Version       Repository                         Size
===============================================================================
Installing:
 zabbix-release  noarch  3.0-1.el7     /zabbix-release-3.0-1.el7.noarch   20 k

Transaction Summary
===============================================================================
Install  1 Package

Total size: 20 k
Installed size: 20 k
Is this ok [y/d/N]: y
... (생략)
Installed:
  zabbix-release.noarch 0:3.0-1.el7                                            

Complete!

3 Zabbix 서버 설치[ | ]

[root@zabbix1 ~]# yum install zabbix-server-mysql zabbix-web-mysql
... (생략)
===========================================================================================
 Package                      Arch        Version                       Repository    Size
===========================================================================================
Installing:
 zabbix-server-mysql          x86_64      3.0.14-1.el7                  zabbix       1.8 M
 zabbix-web-mysql             noarch      3.0.14-1.el7                  zabbix       5.3 k
Installing for dependencies:
 OpenIPMI-libs                x86_64      2.0.19-15.el7                 base         502 k
 OpenIPMI-modalias            x86_64      2.0.19-15.el7                 base          15 k
 apr                          x86_64      1.4.8-3.el7_4.1               updates      103 k
 apr-util                     x86_64      1.5.2-6.el7                   base          92 k
 dejavu-fonts-common          noarch      2.33-6.el7                    base          64 k
 dejavu-sans-fonts            noarch      2.33-6.el7                    base         1.4 M
 fontpackages-filesystem      noarch      1.44-8.el7                    base         9.9 k
 fping                        x86_64      3.10-4.el7                    epel          46 k
 httpd                        x86_64      2.4.6-67.el7.centos.6         updates      2.7 M
 httpd-tools                  x86_64      2.4.6-67.el7.centos.6         updates       88 k
 iksemel                      x86_64      1.4-6.el7                     epel          50 k
 libX11                       x86_64      1.6.5-1.el7                   base         606 k
 libX11-common                noarch      1.6.5-1.el7                   base         164 k
 libXau                       x86_64      1.0.8-2.1.el7                 base          29 k
 libXpm                       x86_64      3.5.12-1.el7                  base          55 k
 libpng                       x86_64      2:1.5.13-7.el7_2              base         213 k
 libtool-ltdl                 x86_64      2.4.2-22.el7_3                base          49 k
 libxcb                       x86_64      1.12-1.el7                    base         211 k
 libxslt                      x86_64      1.1.28-5.el7                  base         242 k
 libzip                       x86_64      0.10.1-8.el7                  base          48 k
 mailcap                      noarch      2.1.41-2.el7                  base          31 k
 net-snmp-libs                x86_64      1:5.7.2-28.el7                base         748 k
 php                          x86_64      5.4.16-43.el7_4               updates      1.4 M
 php-bcmath                   x86_64      5.4.16-43.el7_4               updates       57 k
 php-cli                      x86_64      5.4.16-43.el7_4               updates      2.7 M
 php-common                   x86_64      5.4.16-43.el7_4               updates      565 k
 php-gd                       x86_64      5.4.16-43.el7_4               updates      127 k
 php-ldap                     x86_64      5.4.16-43.el7_4               updates       52 k
 php-mbstring                 x86_64      5.4.16-43.el7_4               updates      505 k
 php-mysql                    x86_64      5.4.16-43.el7_4               updates      101 k
 php-pdo                      x86_64      5.4.16-43.el7_4               updates       98 k
 php-xml                      x86_64      5.4.16-43.el7_4               updates      125 k
 t1lib                        x86_64      5.1.2-14.el7                  base         166 k
 unixODBC                     x86_64      2.3.1-11.el7                  base         413 k
 zabbix-web                   noarch      3.0.14-1.el7                  zabbix       2.3 M
Updating for dependencies:
 openssl                      x86_64      1:1.0.2k-8.el7                base         492 k
 openssl-libs                 x86_64      1:1.0.2k-8.el7                base         1.2 M

Transaction Summary
===========================================================================================
Install  2 Packages (+35 Dependent packages)
Upgrade             (  2 Dependent packages)

Total download size: 19 M
Is this ok [y/d/N]: y
... (생략)
Installed:
  zabbix-server-mysql.x86_64 0:3.0.14-1.el7     zabbix-web-mysql.noarch 0:3.0.14-1.el7    

Dependency Installed:
  OpenIPMI-libs.x86_64 0:2.0.19-15.el7         OpenIPMI-modalias.x86_64 0:2.0.19-15.el7   
  apr.x86_64 0:1.4.8-3.el7_4.1                 apr-util.x86_64 0:1.5.2-6.el7              
  dejavu-fonts-common.noarch 0:2.33-6.el7      dejavu-sans-fonts.noarch 0:2.33-6.el7      
  fontpackages-filesystem.noarch 0:1.44-8.el7  fping.x86_64 0:3.10-4.el7                  
  httpd.x86_64 0:2.4.6-67.el7.centos.6         httpd-tools.x86_64 0:2.4.6-67.el7.centos.6 
  iksemel.x86_64 0:1.4-6.el7                   libX11.x86_64 0:1.6.5-1.el7                
  libX11-common.noarch 0:1.6.5-1.el7           libXau.x86_64 0:1.0.8-2.1.el7              
  libXpm.x86_64 0:3.5.12-1.el7                 libpng.x86_64 2:1.5.13-7.el7_2             
  libtool-ltdl.x86_64 0:2.4.2-22.el7_3         libxcb.x86_64 0:1.12-1.el7                 
  libxslt.x86_64 0:1.1.28-5.el7                libzip.x86_64 0:0.10.1-8.el7               
  mailcap.noarch 0:2.1.41-2.el7                net-snmp-libs.x86_64 1:5.7.2-28.el7        
  php.x86_64 0:5.4.16-43.el7_4                 php-bcmath.x86_64 0:5.4.16-43.el7_4        
  php-cli.x86_64 0:5.4.16-43.el7_4             php-common.x86_64 0:5.4.16-43.el7_4        
  php-gd.x86_64 0:5.4.16-43.el7_4              php-ldap.x86_64 0:5.4.16-43.el7_4          
  php-mbstring.x86_64 0:5.4.16-43.el7_4        php-mysql.x86_64 0:5.4.16-43.el7_4         
  php-pdo.x86_64 0:5.4.16-43.el7_4             php-xml.x86_64 0:5.4.16-43.el7_4           
  t1lib.x86_64 0:5.1.2-14.el7                  unixODBC.x86_64 0:2.3.1-11.el7             
  zabbix-web.noarch 0:3.0.14-1.el7            

Dependency Updated:
  openssl.x86_64 1:1.0.2k-8.el7             openssl-libs.x86_64 1:1.0.2k-8.el7            

Complete!

4 DB 초기 설정[ | ]

  • 자빅스 데이터베이스 생성
[root@zabbix1 ~]# mysql -uroot -pP@ssw0rd
... (생략)
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by 'P@ssw0rd';
MariaDB [(none)]> quit
Bye
[root@zabbix1 ~]#
  • 자빅스 테이블 생성
[root@zabbix1 ~]# zcat /usr/share/doc/zabbix-server-mysql-3.0.*/create.sql.gz | mysql -uzabbix -p zabbix
Enter password: P@ssw0rd
[root@zabbix1 ~]#

5 자빅스 서버 설정[ | ]

[root@zabbix1 ~]# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=P@ssw0rd

6 자빅스 서버 시작, 활성화[ | ]

[root@zabbix1 ~]# systemctl start zabbix-server
[root@zabbix1 ~]# systemctl enable zabbix-server
Created symlink from /etc/systemd/system/multi-user.target.wants/zabbix-server.service to /usr/lib/systemd/system/zabbix-server.service.
[root@zabbix1 ~]# netstat -tnlp | grep zabbix_server
tcp        0      0 0.0.0.0:10051           0.0.0.0:*               LISTEN      14128/zabbix_server 
tcp6       0      0 :::10051                :::*                    LISTEN      14128/zabbix_server

7 PHP 설정[ | ]

[root@zabbix1 ~]# vi /etc/httpd/conf.d/zabbix.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 Europe/Riga
php_value date.timezone Asia/Seoul

8 (Optional) SELinux 설정[ | ]

  • SELinux가 enforcing mode라면...
setsebool -P httpd_can_connect_zabbix on

9 아파치 시작[ | ]

[root@zabbix1 ~]# systemctl start httpd
[root@zabbix1 ~]# systemctl enable httpd
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
[root@zabbix1 ~]#

10 (Optional) 방화벽 오픈[ | ]

[root@zabbix1 ~]# firewall-cmd --permanent --zone=public --add-port=80/tcp
success
[root@zabbix1 ~]# firewall-cmd --reload
[root@zabbix1 ~]# firewall-cmd --list-ports 
80/tcp

11 웹 접속 확인[ | ]

12 같이 보기[ | ]

13 참고[ | ]

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