centos+zabbix(基於lamp)

來源:互聯網
上載者:User

標籤:linux

LANM 基礎組件

yum install gcc gcc-c++ autoconf automake make –y

裝php apache  資料庫用mariadb

yum install php php-gd php-mysql php-bcmath php-mbstring php-xml curl curl-devel net-snmp   net-snmp-devel perl-DBI –y

yum install httpd –y

yum install mariadb* -y

修改httpd.conf

ServerName 為本機ip:80

DirectoryIndex,新增index.php

設定開機啟動

systemctl enable httpd

systemctl enable mariadb

修改PHP相關參數:
max_execution_time = 300
max_input_time = 300
memory_limit = 128M
upload_max_filesize = 2M
date.timezone = Asia/Shanghai
post_max_size = 28M
always_populate_raw_post_data -1

 

 

 

建立zabbix資料庫

mysql –uroot  -p

create database zabbix character set utf8; (建立資料庫和類型)

insert into mysql.user(Host,User,Password)values(‘localhost‘,‘zabbix‘,password(‘zabbix‘)); (建立資料庫使用者密碼)

 

 

grant 許可權1,許可權2,…許可權n on 資料庫名稱.表名稱 to 使用者名稱@使用者地址 identified by ‘串連口令’;

 grant all on zabbix.*  to  ‘zabbix‘@‘127.0.0.1‘ identified by ‘zabbix‘ with grant option;  (授權所有表)
grant all on zabbix.* to ‘zabbix‘@‘localhost‘ identified by ‘zabbix‘ with grant option; (授權所有表)

flush privileges;  (更新資料)

 

安裝zabbix Server 3.0.1

rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm  (裝入repo)

 

 

yum install zabbix-server-mysql zabbix-web-mysql  

yum install zabbix-agent

匯入資料庫

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

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

編輯zabbix server文檔

 

# vi /etc/zabbix/zabbix_server.conf

DBHost=localhost

DBName=zabbix

DBUser=zabbix

DBPassword=zabbix

 

systemctl start zabbix-server

systemctl start zabbix-agent

 

web修改可以支援中文

修改你的 locales.inc.php  原本是false 改成true

‘zh_CN‘ => [‘name‘ => _(‘Chinese (zh_CN)‘),     ‘display‘ => true],

修改字型

修改你的defines.inc.php

 

650) this.width=650;" src="http://s5.51cto.com/wyfs02/M01/7F/3C/wKioL1cXT6SAXJ8yAAAKGoIkIbA727.png" style="float:none;" title="圖片1.png" alt="wKioL1cXT6SAXJ8yAAAKGoIkIbA727.png" />

650) this.width=650;" src="http://s5.51cto.com/wyfs02/M00/7F/3E/wKiom1cXTuSREqoNAAAJXO_VIug952.png" style="float:none;" title="圖片2.png" alt="wKiom1cXTuSREqoNAAAJXO_VIug952.png" />


郵件警示

安裝mailx

配置Zabbix服務端外部郵箱

vi /etc/mail.rc #編輯,添加以下資訊

set from=xxx@163.com smtp=smtp.163.com

set smtp-auth-user= xxx@163.com smtp-auth-password=密碼

set smtp-auth=login

 

650) this.width=650;" src="http://s3.51cto.com/wyfs02/M00/7F/3C/wKioL1cXT8yAv1h_AAB2UrqiWn8430.png" title="圖片3.png" alt="wKioL1cXT8yAv1h_AAB2UrqiWn8430.png" /> 

 

 

 感謝各大版主提供資料參考


centos+zabbix(基於lamp)

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.