2017年3月6日月曜日

Zabbix Install MariaDB/MySQL end in 10 minutes. (CentOS7 MariaDB 10.1)


Let's install zabbix 3.0 based on CentOS 7, In case of zabbix 3.0.LTS
Please see
http://www.zabbix.com/jp/life_cycle_and_release_policy
for support period.
I'll intall MariaDB and MySQL equality.

1. yum update is a choice.
# yum update -y

2. Register repo of MariaDB
# vi /etc/yum.repos.d/MariaDB.repo
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
Gpgcheck=1

3. Install corresponding Application.(MariaDB, apache, zabbix)
 # yum install mariadb mariadb-server -y
# yum install httpd -y
# rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
     If you want to install another version of zabbix, Please see http://repo.zabbix.com/zabbix/
# yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent -y
# yum install zabbix-get zabbix-sender -y

4. Set up MariaDB
①run MariaDB.
# systemctl start mariadb
②Fill DB
# mysql -uroot
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
MariaDB [(none)]> exit
③Input Zabbix Data
   I'll choose -uzabbix instead -uzabbix
# zcat /usr/share/doc/zabbix-server-mysql-3.0.7/create.sql.gz | mysql -uzabbix zabbix -p
Enter password: zabbix

5. Set up MariaDB and Apache Auto start
# systemctl enable mariadb
# systemctl enable httpd

6. Set up Selinux disabled
If you don't set up this. Can't recognize Zabbix server.
# vi /etc/selinux/config
SELINUX=enforcing => SELINUX=disabled
reboot

7. Set up port of firewalld
    Web Port Open.
# firewall-cmd --add-port=80/tcp --zone=public --permanent
    Zabbix Server → Zabbix Agent:10050
# firewall-cmd --add-port=10050/tcp --zone=public --permanent
    Zabbix Agent → Zabbix Server:10051
# firewall-cmd --add-port=10051/tcp --zone=public --permanent
    Set up firewalld and restart
# firewall-cmd --reload
 In case of internal network, if you don't need firewalld.
# systemctl stop firewalld
# systemctl disable firewalld

8. Set up timezone
# vi /etc/httpd/conf.d/zabbix.conf
# php_value date.timezone Europe/Riga
php_value date.timezone Asia/Seoul

9. Restart Apache
# systemctl restart httpd

10. Connect to web Page
http://localhost/zabbix
①Set up scrren























②Check module

















In case of not set up date.timezone, an error comes out like about.
Please see No.8

③Set up DB






Put the password which you used in No.4.
I put Zabbix.

④Set up the server name.
write the name of Zabbix server in name place.
In put Park.zabbix.




Default User:Admin
     Password:zabbix


You can check two parts.
if yellow parts of "Zabbix is not running" comes out.
ⅰ.Check Zabbix Server run.
ⅱ.Check Selinux in No.6

Set up Zabbix server conf file
# vi /etc/zabbix/zabbix_server.conf
DBPassword=zabbix

# systemctl start zabbix-server
# systemctl enable zabbix-server
# systemctl start zabbix-agent
# systemctl enable zabbix-agent



Zabbix Install is completed.

0 件のコメント: