cd /usr/local/src/php-5.6.17/ext/gettext/
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
vim /etc/php.ini
extension=/usr/local/php/lib/php/extensions/no-debug-zts-20131226/gettext.so
三、编译安装zabbix
1、增加zabbix用户
groupadd zabbix
useradd –g zabbix zabbix
2、编译安装zabbix
tar xf zabbix-3.0.3.tar.gz
cd zabbix-3.0.3
./configure --prefix=/usr/local/zabbix/ --sysconfdir=/etc/zabbix/ --enable-server --enable-agent --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2
make && makeinstall
3、初始化数据库文件
mysql –uroot –p
create databasezabbix;
mysql -uroot–p’******’ zabbix < database/mysql/schema.sql
mysql -uroot-p'*******' zabbix < database/mysql/p_w_picpaths.sql
mysql -uroot-p'******' zabbix < database/mysql/data.sql
4、配置zabbix_server配置文件
vim /etc/zabbix/zabbix_server.conf
DBName=zabbix
DBUser=root
DBPassword=password
DBPort=3306
5、zabbix命令加入bash
vim /etc/profile.d/zabbix.sh
PATH=/usr/local/zabbix/sbin/:$PATH
export PATH
source /etc/profile.d/zabbix.sh