Centos 6.5 + Zabbix 3.0

來源:互聯網
上載者:User

標籤:centos 6.5   zabbix 3.0   


CentOS 6.5 + LAMP 安裝Zabbix 3.0 


關閉:iptables&Selinux服務


#iptables -F

#iptables -nv -L 


查看SELinux狀態:

/usr/sbin/sestatus -v      ##如果SELinux status參數為enabled即為開啟狀態

SELinux status:                 enabled


#getenforce                 ##也可以用這個命令檢查

#setenforce 0                  ##設定SELinux 成為permissive模式


修改Selinux配置,重啟生效:

#vim /etc/selinux/config

將SELINUX=enforcing改為SELINUX=disabled



#################################LAMP##################################################

Linux版本:

CentOS 6.5 X86_64


Apache版本:

Server version: Apache/2.2.15 (Unix)

Server built:   May 11 2016 19:28:33


MySQL版本:

mysql  Ver 14.14 Distrib 5.1.73, for redhat-linux-gnu (x86_64) using readline 5.1


PHP版本:( zabbix_3.0 要求php版本至少在5.4以上 )


PHP 5.4.45 (cli) (built: Oct 16 2015 11:24:58) 

Copyright (c) 1997-2014 The PHP Group

Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies


1.安裝LAMP


安裝PHP5.4

rpm -Uvh http://repo.webtatic.com/yum/el6/latest.rpm   


# yum install httpd httpd-devel

# yum install mysql mysql-server

# yum install php54w php54w-cli php54w-common php54w-devel php54w-pear php54w-gd php54w-mbstring php54w-mysql php54w-xml php54w-bcmath


測試web&mysql服務:

# service httpd start

# service mysqld start


#############################Zabbix 3.0安裝#######################################################



CentOS/RHEL 6:


wget http://repo.zabbix.com/zabbix/3.0/rhel/6/x86_64/zabbix-release-3.0-1.el6.noarch.rpm


或如下:

# rpm -Uvh http://repo.zabbix.com/zabbix/3.0/rhel/6/x86_64/zabbix-release-3.0-1.el6.noarch.rpm


# yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-java-gateway


登入資料庫,建立帳號和設定許可權:


mysql> use mysql;

mysql>create database zabbix character set utf8;

mysql> GRANT ALL PRIVILEGES on zabbix.* to [email protected]ocalhost IDENTIFIED BY ‘密碼‘;

mysql> FLUSH PRIVILEGES;

mysql> quit


匯入Zabbix資料庫模板:

# cd /usr/share/doc/zabbix-server-mysql-3.0.0

# zcat create.sql.gz | mysql -uroot zabbix


修改Zabbix設定檔的資料庫對應參數:

# vi /etc/zabbix/zabbix_server.conf

DBHost=localhost

DBName=zabbix

DBUser=zabbix

DBPassword=密碼


啟動Zabbix服務進程:


#server zabbix-server start 

#ss -tnl

[[email protected] ~]# ss -tnl | grep :10051

LISTEN     0      128                      :::10051                   :::*     

LISTEN     0      128                       *:10051                    *:*


修改php.ini參數:


#vim /etc/php.ini 


max_execution_time 300 (預設為30)

memory_limit 128M   

post_max_size 16M  

upload_max_filesize 2M 

max_input_time 300 (預設為60)

always_populate_raw_post_data -1 

date.timezone = RPC (預設為空白)


重啟httpd服務,並訪問Zabbix-web服務:

#service httpd restart 

http://zabbix-web-hostIP/zabbix 




############################################可選配置#############################################################


增加zabbix使用者和組


#groupadd zabbix

#useradd -g zabbix -m zabbix


本文出自 “藍的寫” 部落格,請務必保留此出處http://shadowhk.blog.51cto.com/2903709/1812246

Centos 6.5 + Zabbix 3.0

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.