yuminstall libxml2-devel net-snmp-devel libevent-devel curl-devel pcre* mariadb-devel php-fpm
./configure --prefix=/usr/local/zabbix --enable-server --enable-agent
--enable-proxy --with-mysql=/usr/local/mysql/bin/mysql_config --enable-ipv6
--with-net-snmp --with-libcurl --with-libxml2
匯入資料庫:
groupadd zabbix
useradd -g zabbix zabbix
mysql>create database zabbix character set utf8;
mysql> grant all on zabbix.* to zabbix@localhost identified by '
zabbix@qaz';
mysql>flush privileges;
# vim /usr/local/zabbix/etc/zabbix_server.conf
logfile=/usr/local/zabbix/log/zabbix_server.log //
日誌檔案存放的路徑
pidfile=/usr/local/zabbix/zabbix_server.pid //
pid檔案存放的路徑
dbhost=localhost //
資料庫伺服器位址
dbname=zabbix //
資料庫名字
dbuser=zabbix //
連線資料庫的使用者名稱
dbpassword=zabbix@qaz //
連線資料庫使用者的密碼
dbsocket=/var/lib/mysql/mysql.sock //
指定連線mysql的socket,mysql配置的client sock檔案路徑
dbport=3306
//資料庫埠
timeout=4
//超時時間
logslowqueries=3000
//慢查詢記錄的時間
# mkdir /usr/local/zabbix/log
# chown zabbix.zabbix /usr/local/zabbix/log
啟動:chown zabbix.zabbix /usr/local/zabbix/
/usr/local/zabbix/sbin/zabbix_server -c /usr/local/zabbix/etc/zabbix_server.conf
web介面:
cp -r /root/zabbix-5.0.0/ui/ /var/www/
chown -r www.www /var/www
二.安裝php-fpm7.2
//原始碼安裝
yuminstall openssl openssl-devel curl curl-devel libjpeg libjpeg-devel libpng \
libpng-devel freetype freetype-devel pcre pcre-devel libxslt libxslt-devel bzip2
bzip2-devel
./configure --prefix=/usr/local/php --with-curl --with-freetype-dir --with-gd \
--with-gettext --with-iconv-dir --with-kerberos --with-libdir=lib64 \
--with-libxml-dir --with-mysqli --with-openssl --with-pcre-regex --with-pdo-mysql \
--with-pdo-sqlite --with-pear --with-png-dir --with-jpeg-dir --with-xmlrpc \
--with-xsl --with-zlib --with-bz2 --with-mhash --enable-fpm --enable-bcmath \
--enable-libxml --enable-inline-optimization --enable-mbregex \
--enable-mbstring --enable-opcache --enable-pcntl --enable-shmop --enable-soap \
--enable-sockets --enable-sysvsem --enable-sysvshm --enable-xml --enable-zip
make && make
install
//yum 安裝
三.nginx配置
user www;server
登入:
http://網域名稱 初始賬號:admin 密碼:zabbix
顯示字型異常
修改ui/include/defines.inc.php下面兩行.
define(
'zbx_graph_font_name
', '
simsun');
define(
'zbx_font_name
', '
simsun');
重新整理頁面.
zabbix原始碼安裝
1 zabbix server安裝指令碼 yum install y libevent devel wget tar gcc gcc c make net snmp devel libxml2 devel libcurl devel groupadd zabbix useradd g zabbix ...
zabbix原始碼安裝
2 安裝依賴庫 yum y install net snmp devel libxml2 devel libcurl devel libevent libevent devel 3 解壓並編譯 tar zxvf zabbix 3.4.2.tar.gz cd zabbix 3.4.2 configur...
原始碼編譯安裝zabbix
準本環境 centos7系統 192.168.124.204 關閉防火牆 關閉selinux yum y install vim wget 解壓安裝包並進入目錄 root localhost tar xf zabbix 4.4.0.tar.gz cd usr local zabbix 4.4.0 編...