aa0660 发表于 2019-1-24 11:33:19

Centos 6.5 部署 Zabbix

# rpm -ivh http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm
# yum install -y mysql-community-server
# service mysqld start
# /usr/bin/mysql_secure_installation
# mysql -uroot -pabcd.1234
mysql> show databases;
+--------------------+
| Database         |
+--------------------+
| information_schema |
| mysql            |
| performance_schema |
+--------------------+
3 rows in set (0.04 sec)
# rpm -ivh epel-release-6-8.noarch.rpm
# rpm -ivh https://mirror.webtatic.com/yum/el6/latest.rpm
# yum install -y httpd php56w.x86_64 php56w-cli.x86_64 php56w-common.x86_64 php56w-devel.x86_64 \
php56w-gd.x86_64 php56w-ldap.x86_64 php56w-mbstring.x86_64 php56w-bcmath.x86_64 php56w-xml.x86_64 \
php56w-mysqlnd.x86_64 php56w-pdo.x86_64
# vi /etc/httpd/conf/httpd.conf
ServerName 192.168.1.201:80
# vi /etc/php.ini
date.timezone = Asia/Shanghai
max_execution_time = 300
max_input_time = 300
post_max_size = 32M
memory_limit = 128M
mbstring.func_overload = off
always_populate_raw_post_data = -1
# service httpd start
# mysql -uroot -pabcd.1234
mysql> create database zabbix default character set utf8;
Query OK, 1 row affected (0.05 sec)
mysql> grant all on zabbix.* to 'zabbix'@'localhost' identified by 'zabbix';
Query OK, 0 rows affected (0.10 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
# yum install -y net-snmp net-snmp-utils net-snmp-devel
# tar zxvf zabbix-3.0.16.tar.gz
# cd zabbix-3.0.16
# ./configure --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl --with-libxml2
# make install
# mysql -uroot -p zabbix < database/mysql/schema.sql
# mysql -uroot -p zabbix < database/mysql/images.sql
# mysql -uroot -p zabbix < database/mysql/data.sql
# cp misc/init.d/fedora/core/zabbix_* /etc/init.d/
# cp -r frontends/php /var/www/html/zabbix
# vi /usr/local/etc/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
# service zabbix_server start
Starting zabbix_server:                                    
# netstat -tupln |grep zabbix_server
tcp      0      0 0.0.0.0:10051               0.0.0.0:*                   LISTEN      16927/zabbix_server
# chkconfig --add zabbix_agentd
# service zabbix_agentd start
Starting zabbix_agentd:                                    
# netstat -tupln |grep zabbix_agentd
tcp      0      0 0.0.0.0:10050               0.0.0.0:*                   LISTEN      16999/zabbix_agentdhttp://s1.运维网.com/images/20180412/1523547583610341.png
http://s1.运维网.com/images/20180412/1523547599740933.png
http://s1.运维网.com/images/20180412/1523547612331798.png
http://s1.运维网.com/images/20180412/1523547623903377.png
http://s1.运维网.com/images/20180412/1523547637895351.png
http://s1.运维网.com/images/20180412/1523547649172432.png
http://s1.运维网.com/images/20180412/1523547811722275.png
http://s1.运维网.com/images/20180412/1523547673568360.png



页: [1]
查看完整版本: Centos 6.5 部署 Zabbix