zabbix4.0 deployment of open source monitoring

--- --- restore content begins

1. Install depend on the environment

yum -y install telnet net-tools python-paramiko dejavu-sans-fonts python-setuptools python-devel sendmail mailx net-snmp net-snmp-devel net-snm-utils freetype-devel libpng-devel perl unbound libtasnl-devel pll-kit-devel OpenIPMI unix0DBC libevent-devel mysql-devel libxml2-devel libssh2-devel OpenIPMI-devel openldap-devel curl-devel unixODBC-devel wget gcc gcc-c++

2. Download

 zabbix-4.0.12.tar.gz包

3. Create a folder zabbix

 mkdir /zabbix

4. decompression

 tar -zxf zabbix-4.0.12.tar.gz

5. Go to the unzipped folder

 cd /zabbix-4.0.12

6. Configure

 ./configure --prefix=/home/zabbix/ --enable-server --enable-agent --enable-java --with-mysql --with-  unixodbc --with-libxml2 --with-net-snmp --with-ssh2 --with-openipmi --with-ldap --with-libcurl --with-iconv --with-ssh2 --with-openipmi --with-ldap

7. compile and install

 make && make install

8. Check zabbix version and whether the installation is successful

 /zabbix/sbin/zabbix_server -V

9. Install mysql database

 yum -y install mariadb-server

10. Start the database

  systemctl start mariadb

11. mysql database be initialized

  mysql_secure_installation

12. enter the database, create a database zabbix

  create database zabbix character set utf8 collate utf8_bin;

13. Create a user access to the database zabbix

  grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix@lfl123';

14. The import table structure zabbix

  mysql -uzabbix -pzabbix@lfl123 zabbix</root/zabbix-4.0.12/database/mysql/schema.sql

  mysql -uzabbix -pzabbix@lfl123 zabbix</root/zabbix-4.0.12/database/mysql/images.sql

  mysql -uzabbix -pzabbix@lfl123 zabbix</root/zabbix-4.0.12/database/mysql/data.sql

15. Modify zabbix_serve.conf profile

  vim /zabbix/etc/zabbix_server.conf

  检查DBUser=zabbix DBName=zabbix DBPassword=zabbix密码 DBHost=localhost

16. Create zabbix user and the user to join the user group

  groupadd --system zabbix

  useradd --system -g zabbix -s /sbin/nologin -c "Zabbix" zabbix

17.启动zabbix服务

 /zabbix/sbin/zabbix_server -c /zabbix/etc/zabbix_server.conf

18.更改zabbix配置文件

  vim/zabbix/etc/zabbix_agentd.conf

19.启动zabbix客户端

 /zabbix/sbin/zabbix_agentd -c /zabbix/etc/zabbix_agentd.conf

20.安装zabbix rpm包源

 rpm -ivh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm

21.安装zabbix web前端

 yum -y install zabbix-web-mysql

22.修改php配置文件

  vim /etc/php.ini

  max_execution_time = 300

  max_input_time = 300

  max_input_vars = 10000

  memory_limit = 128M

  post_max_size = 16M

  always_populate_raw_post_data = -1

 date.timezone ="Asia/Shanghai"

23.启动httpd服务

 systemctl start httpd

25.ip/zabbix访问web 

 

 

 

 

  

 

 

 

 

 

 

---恢复内容结束---

Guess you like

Origin www.cnblogs.com/lfl17718347843/p/linux.html