zabbix3.0 on CentOS7
11856 단어 zabbix
목적
Centos7에 Zabbix3.0 설치
환경
설정
CentOS
$ sudo localectl set-locale LANG=ja_JP.utf8
$ localectl status
System Locale: LANG=ja_JP.utf8
VC Keymap: us
X11 Layout: us
$ timedatectl list-timezones | grep Tokyo
Asia/Tokyo
$ sudo timedatectl set-timezone Asia/Tokyo
$ timedatectl status
$ hostnamectl set-hostname <hostname>
$ sudo useradd <user>
$ sudo passwd <user>
$ sudo usermod -G wheel <user>
$ cat /etc/group
(snip)
wheel:x:10:centos,<user>
(snip)
$ sudo visudo
(snip)
## Allows people in group wheel to run all commands
%wheel ALL=(ALL) ALL
(snip)
/etc/login.defs(snip)
#Only wheelgroup can login
SU_WHEEL_ONLY yes
(snip)
/etc/pam.d/su#アンコメントしてgroup=wheelを記述
#%PAM-1.0
auth sufficient pam_rootok.so
# Uncomment the following line to implicitly trust users in the "wheel" group.
#auth sufficient pam_wheel.so trust use_uid
# Uncomment the following line to require a user to be in the "wheel" group.
auth required pam_wheel.so use_uid group=wheel
auth substack system-auth
auth include postlogin
account sufficient pam_succeed_if.so uid = 0 use_uid quiet
account include system-auth
password include system-auth
session include system-auth
session include postlogin
session optional pam_xauth.so
zabbix3.0
MySQL 리포지토리
$ sudo localectl set-locale LANG=ja_JP.utf8
$ localectl status
System Locale: LANG=ja_JP.utf8
VC Keymap: us
X11 Layout: us
$ timedatectl list-timezones | grep Tokyo
Asia/Tokyo
$ sudo timedatectl set-timezone Asia/Tokyo
$ timedatectl status
$ hostnamectl set-hostname <hostname>
$ sudo useradd <user>
$ sudo passwd <user>
$ sudo usermod -G wheel <user>
$ cat /etc/group
(snip)
wheel:x:10:centos,<user>
(snip)
$ sudo visudo
(snip)
## Allows people in group wheel to run all commands
%wheel ALL=(ALL) ALL
(snip)
(snip)
#Only wheelgroup can login
SU_WHEEL_ONLY yes
(snip)
#アンコメントしてgroup=wheelを記述
#%PAM-1.0
auth sufficient pam_rootok.so
# Uncomment the following line to implicitly trust users in the "wheel" group.
#auth sufficient pam_wheel.so trust use_uid
# Uncomment the following line to require a user to be in the "wheel" group.
auth required pam_wheel.so use_uid group=wheel
auth substack system-auth
auth include postlogin
account sufficient pam_succeed_if.so uid = 0 use_uid quiet
account include system-auth
password include system-auth
session include system-auth
session include postlogin
session optional pam_xauth.so
$ sudo yum list installed | grep maria
mariadb-libs.x86_64 1:5.5.47-1.el7_2 @updates
$ sudo yum remove mariadb-libs.x86_64
$ wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
$ sudo rpm -Uvh mysql57-community-release-el7-7.noarch.rpm
$ sudo yum install mysql-community-client
RDS
서버에 접속하는 밸러미터 그룹의 파라미터 편집으로 로그 취득할 수 있도록 플래그 1을 세운다
zabbix 프런트 엔드의 일본어 문자 화 대책으로서 명시적으로 utf8로 한다
mysql> show variables like 'character_set%';
+--------------------------+-------------------------------------------+
| Variable_name | Value |
+--------------------------+-------------------------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /rdsdbbin/mysql-5.7.10.R1/share/charsets/ |
+--------------------------+-------------------------------------------+
8 rows in set (0.10 sec)
mysql>
zabbix-server
$ sudo rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
$ sudo yum install zabbix-server-mysql zabbix-web-mysql zabbix-web-japanese zabbix-agent zabbix-get
$ cd /usr/share/doc/zabbix-server-mysql-3.0.1
$ zcat create.sql.gz | mysql -h <rds-endpoint> <db> -u <user> -p
/etc/zabbix/zabbix_server.conf
82a83,84
> DBHost=<rds-endpoint>
>
115a118,119
>
> DBPassword=<rds-password>
/etc/httpd/conf.d/zabbix.conf
(snip)
<Directory "/usr/share/zabbix">
Options FollowSymLinks
AllowOverride None
Require all granted
<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
</IfModule>
</Directory>
(snip)
/etc/php.ini
384c384
< max_execution_time = 30
---
> max_execution_time = 300
394c394
< max_input_time = 30
---
> max_input_time = 300
698c698
< ; always_populate_raw_post_data = On
---
> always_populate_raw_post_data = -1
878c878
< ; date.timezone = Europe/Riga
---
> date.timezone = Asia/Tokyo
/etc/zabbix/zabbix_agentd.conf
96a97
>
104a106,107
> ListenPort=10050
>
147c150
< Hostname=Zabbix server
---
> #Hostname=Zabbix server
155c158
< # HostnameItem=system.hostname
---
> HostnameItem=system.hostname
/var/www
$ sudo ln -s /usr/share/zabbix zabbix
/etc/httpd/conf/httpd.conf
119c119
< DocumentRoot "/var/www/html"
---
> DocumentRoot "/var/www/zabbix"
125c125
< AllowOverride None
---
> AllowOverride All
131c131
< <Directory "/var/www/html">
---
> <Directory "/var/www/zabbix">
144c144
< Options Indexes FollowSymLinks
---
> Options FollowSymLinks
151c151
< AllowOverride None
---
> AllowOverride All
$ sudo systemctl enable httpd.service && sudo systemctl enable zabbix-server.service && sudo systemctl enable zabbix-agent.service
$ sudo systemctl start httpd && sudo systemctl start zabbix-server && sudo systemctl start zabbix-agent
Reference
이 문제에 관하여(zabbix3.0 on CentOS7), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/ldr/items/649e8e5a8903d773aa87텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)