安裝epel和remi源php
#rpm –Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm # rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
安裝LAMP 基礎環境mysql
# yum install --enablerepo=remi--enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcryptphp-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof php-mysqlphp-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc php-bcmath # yum –y install httpd php mysql mysql-server httpd-manual mod_ssl mod_perl mod_auth_mysqlmysql-connector-odbc mysql-devel libdbi-dbd-mysql
啓動並設置開機自啓linux
Chkconfig mysqld on /etc/init.d/mysqld start Chkconfig httpd on /etc/init.d/httpd start
yum -yinstall gcc gcc-c++ autoconf net-snmp net-snmp-develcurl-devel
#rpm –ivh 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
mysql -uroot -p<root_password> mysql> create database zabbixcharacter set utf8 collate utf8_bin; mysql> grant all privileges onzabbix.* to zabbix@localhost identified by '<password>'; mysql> quit;
zcat/usr/share/doc/zabbix-server-mysql-3.0.*/create.sql.gz | mysql -uzabbix -pzabbix
vi /etc/zabbix/zabbix_server.conf DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=<password>
# /etc/init.d/zabbix-server start # chkconfig on zabbix-server
# cp/usr/share/doc/zabbix-web-3.0.8/httpd22-example.conf/etc/httpd/conf.d/zabbix.conf
Vi /etc/php.ini 設置相應的值 max_execution_time 300 memory_limit 128M post_max_size 16M upload_max_filesize 2M max_input_time 300 always_populate_raw_post_data -1 bcmath.scale = 1 date.timezone Asia/Shanghai
l至此zabbix服務器端安裝完畢,可用瀏覽器訪問zabbixserver_IP/zabbix 使用Admin密碼zabbix來登陸 zabbix控制檯,注意服務器防火牆配置c++
Yum install zabbix-agent Chkconfig zabbix-agent on