Required | |
PHP version | 5.3.0 |
PHP option memory_limit | 128M |
PHP option post_max_size | 16M |
PHP option upload_max_filesize | 2M |
PHP option max_execution_time | 300 |
PHP option max_input_time | 300 |
PHP time zone | |
PHP databases support | |
PHP bcmath | |
PHP mbstring | |
PHP sockets | |
PHP gd | 2.0 |
PHP gd PNG support | |
PHP gd JPEG support | |
PHP gd FreeType support | |
PHP libxml | 2.6.15 |
PHP xmlwriter | |
PHP xmlreader | |
PHP ctype | |
PHP session | |
PHP session auto start | off |
PHP gettext |
1
|
yum -y install mysql-devel libcurl-devel net-snmp-devel
|
1
2
|
groupadd zabbix
useradd zabbix -g zabbix
|
1
2
|
create database zabbix character
set
utf8;
grant all privileges on zabbix.* to zabbix@localhost identified by
'zabbix'
;
|
1
2
3
4
5
|
tar zxf zabbix-
2.2
.
0
.tar.gz
cd zabbix-
2.2
.
0
./configure --prefix=/usr/local/zabbix --enable-server --enable-agent \
--
with
-mysql --
with
-net-snmp --
with
-libcurl
make install
|
1
2
3
|
mysql -uzabbix -pzabbix -hlocalhost zabbix < database/mysql/schema.sql
mysql -uzabbix -pzabbix -hlocalhost zabbix < database/mysql/images.sql
mysql -uzabbix -pzabbix -hlocalhost zabbix < database/mysql/data.sql
|
1
2
3
4
5
6
7
|
cp misc/init.d/fedora/core/zabbix_server /etc/init.d/
cp misc/init.d/fedora/core/zabbix_agentd /etc/init.d/
cp -R frontends/php /data/www/zabbix ##这个是web端
sed -i
's/^DBUser=.*$/DBUser=zabbix/g'
/usr/local/zabbix/etc/zabbix_server.conf
sed -i
's/^.*DBPassword=.*$/DBPassword=zabbix/g'
/usr/local/zabbix/etc/zabbix_server.conf
sed -i
's/BASEDIR=\/usr\/local/BASEDIR=\/usr\/local\/zabbix/g'
/etc/init.d/zabbix_server
sed -i
's/BASEDIR=\/usr\/local/BASEDIR=\/usr\/local\/zabbix/g'
/etc/init.d/zabbix_agentd
|
1
2
3
4
5
6
|
cat >>/etc/services <<EOF
zabbix-agent
10050
/tcp Zabbix Agent
zabbix-agent
10050
/udp Zabbix Agent
zabbix-trapper
10051
/tcp Zabbix Trapper
zabbix-trapper
10051
/udp Zabbix Trapper
EOF
|
1
2
3
4
|
/etc/init.d/zabbix_server start
/etc/init.d/zabbix_agentd start
echo
"/etc/init.d/zabbix_server start"
>> /etc/rc.local
echo
"/etc/init.d/zabbix_agentd start"
>> /etc/rc.local
|