[root@zabbix ~]# lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 8.4 (jessie) Release: 8.4 Codename: jessie
aptitude install -y apache2 apache2-utils aptitude install -y mysql-server mysql-common mysql-client aptitude install -y php5-common php5-mysql php5-cgi php5-gd php5-mcrypt libapache2-mod-php5 php5-memcache php5-imagick php5-suhosin php5-xmlrpc aptitude install -y gcc build-essential libmysqlclient15-dev libcurl4-openssl-dev libsnmp-dev snmp snmpd
mkdir -p /tmp/soft cd /tmp/soft
wget http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.4.7/zabbix-2.4.7.tar.gz
useradd zabbix tar -zxf zabbix-2.4.7.tar.gz cd zabbix-2.4.7 ./configure --prefix=/usr/local/zabbix --enable-server --enable-proxy --enable-agent --with-mysql=/usr/bin/mysql_config --with-net-snmp --with-libcurl --enable-bcmath make && make install
mysql -uroot -p123 -e 'create database zabbix character set utf8;' mysql -uroot -p123 -e "grant all on zabbix.* to zabbix@localhost identified by 'zabbix';"
mysql -uzabbix -pzabbix zabbix < ./database/mysql/schema.sql mysql -uzabbix -pzabbix zabbix < ./database/mysql/images.sql mysql -uzabbix -pzabbix zabbix < ./database/mysql/data.sql
cp /etc/php5/apache2/php.ini{,.bak} sed -ri -e 's/(max_execution_time).*/\1 = 300/g' -e 's/(max_input_time).*/\1 = 300/g' -e 's/(memory_limit).*/\1 = 128M/g' -e 's/(post_max_size).*/\1 = 32M/g' -e 's/(date.timezone).*/\1 = Asia\/Shanghai/g' /etc/php5/apache2/php.ini
; max_input_time = 300 max_execution_time = 300 max_input_time = 300 post_max_size = 32M ; http://php.net/date.timezone = Asia/Shanghai ;date.timezone = Asia/Shanghai
# egrep 'max_input_time|max_execution_time|memory_limit|post_max_size|date.timezon' /etc/php5/apache2/php.ini ; max_input_time = 300 max_execution_time = 300 max_input_time = 300 memory_limit = 128M post_max_size = 32M ; http://php.net/date.timezone = Asia/Shanghai ;date.timezone = Asia/Shanghai
PHP配置文件下載php
mkdir /var/log/zabbix chown -R zabbix.zabbix /var/log/zabbix ln -s /usr/local/zabbix/etc /etc/zabbix ln -s /usr/local/zabbix/bin/* /usr/bin/ ln -s /usr/local/zabbix/sbin/* /usr/sbin/
cd /tmp/soft/zabbix-2.4.7/ cp -r ./frontends/php/ /var/www/html/zabbix chown -R www-data:www-data /var/www/html/zabbix cp misc/init.d/debian/zabbix-* /etc/init.d/ sed -ri 's#DAEMON=.*#DAEMON=/usr/local/zabbix/sbin/${NAME}#g' /etc/init.d/zabbix-server sed -ri 's#DAEMON=.*#DAEMON=/usr/local/zabbix/sbin/${NAME}#g' /etc/init.d/zabbix-agent cp /etc/zabbix/zabbix_server.conf{,.bak} cp /etc/zabbix/zabbix_agentd.conf{,.bak}
cat > /etc/zabbix/zabbix_server.conf <<EOF DBName=zabbix DBUser=zabbix DBPassword=zabbix LogFile=/var/log/zabbix/zabbix_server.log EOF
cat > /etc/zabbix/zabbix_agentd.conf <<EOF LogFile=/var/log/zabbix/zabbix_agentd.log Server=127.0.0.1 #ServerActive=x.x.x.x:10051 EOF
/etc/init.d/apache2 start /etc/init.d/mysql start /etc/init.d/zabbix-agent start /etc/init.d/zabbix-server start
[root@unassigned-hostname zabbix]# netstat -lntup | egrep "10050|10051|80|3306" tcp 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN 23723/zabbix_agentd tcp 0 0 0.0.0.0:10051 0.0.0.0:* LISTEN 23421/zabbix_server tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 6892/mysqld tcp6 0 0 :::80 :::* LISTEN 9169/apache2
http://10.0.0.41/zabbix/setup.php
aptitude install locales dpkg-reconfigure locales
[root@zabbix ~]# cat /etc/default/locale # File generated by update-locale LANG=en_US.UTF-8
apt-get install ttf-arphic-uming apt-get install xfonts-intl-chinese apt-get install xfonts-wqy
[root@zabbix ~]# vim /var/www/html/zabbix/include/locales.inc.php ……. 'zh_CN' => ['name' => _('Chinese (zh_CN)'), 'display' => true], ……..
/etc/init.d/apache2 restart
留到之後html
http://pan.baidu.com/s/1pKRedq7mysql