centos7.4安装配置Zabbix3.4.8

vi /etc/selinux/config
SELINUX=disabled
:wq!

systemctl stop firewalld
systemctl disable firewalld
yum install iptables-services -y

vi /etc/sysconfig/iptables

-A INPUT -p tcp --dport 3306 -j ACCEPT
-A INPUT -p tcp --dport 80 -j ACCEPT
-A INPUT -p tcp --dport 10050 -j ACCEPT
-A INPUT -p tcp --dport 10051 -j ACCEPT
-A INPUT -p udp --dport 10050 -j ACCEPT
-A INPUT -p udp --dport 10051 -j ACCEPT

vi /etc/locale.conf 
LANG
="zh_CN.UTF-8"
:wq
!
reboot
yum install telnet vim wget
-y
yum install openssh
-clients
yum install
-y gcc gcc-c++ openssl-devel
yum install vixie
-cron
yum install mariadb
-server mariadb -y
systemctl start mariadb
systemctl enable mariadb
rpm
-ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
yum install zabbix-server-mysql zabbix-web-mysql -y
创建数据库
mysqladmin
-uroot -p password 2wsxzaq1
Enter password:
//直接回车
mysql -uroot -p2wsxzaq1
GRANT ALL PRIVILEGES ON
*.* TO 'root'@'%'IDENTIFIED BY '2wsxzaq1' WITH GRANT OPTION;
flush privileges;
create database zabbix character
set utf8 collate utf8_bin;
grant all privileges on zabbix.
* to zabbix@localhost identified by '2wsxzaq1';
导入数据
zcat
/usr/share/doc/zabbix-server-mysql-3.4.8/create.sql.gz | mysql -uzabbix -p2wsxzaq1 zabbix
grep
-n '^'[a-Z] /etc/zabbix/zabbix_server.conf

38:LogFile=/var/log/zabbix/zabbix_server.log
49:LogFileSize=0 72:PidFile=/var/run/zabbix/zabbix_server.pid
82:SocketDir=/var/run/zabbix
101:DBName=zabbix
117:DBUser=zabbix
330:SNMPTrapperFile=/var/log/snmptrap/snmptrap.log
448:Timeout=4
490:AlertScriptsPath=/usr/lib/zabbix/alertscripts
500:ExternalScripts=/usr/lib/zabbix/externalscripts
536:LogSlowQueries=3000
vi /etc/zabbix/zabbix_server.conf
DBPassword
=2wsxzaq1
:wq
!
systemctl enable zabbix
-server
systemctl start zabbix
-server
vim
/etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia
/Shanghai
systemctl start httpd
systemctl enable httpd
http://192.168.153.142/zabbix/
默认用户名:Admin,密码:zabbix
 

 

posted @ 2018-04-11 01:48  myway_liang  阅读(386)  评论(0编辑  收藏  举报