安装 epel 和 remi 源
- #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 基础环境
- # 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
启动并设置开机自启
- 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
- mysql> create database zabbixcharacter set utf8 collate utf8_bin;
- mysql> grant all privileges onzabbix.* to identified by '';
- 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 控制台,注意服务器防火墙配置
- Yum install zabbix-agent
- Chkconfig zabbix-agent on
来源: http://www.bubuko.com/infodetail-1976562.html