您好,登錄后才能下訂單哦!
zabbix由2部分構成,zabbix server與可選組件zabbix agent。
安裝zabbix依賴包 shell> yum install net-snmp-devel curl-devel 創建zabbix用戶 shell> groupadd zabbix shell> useradd -r -g zabbix zabbix 解壓zabbix安裝包 shell> tar zxvf zabbix-2.4.5.tar.gz shell> cd zabbix-2.4.5/ 創建zabbix數據庫庫并導入初始化數據 mysql> create database zabbix character set utf8; Query OK, 1 row affected (0.02 sec) mysql> grant all on zabbix.* to zabbix@localhost identified by '123@qwe'; Query OK, 0 rows affected (0.01 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) shell> mysql -u zabbix -p zabbix < database/mysql/schema.sql shell> mysql -u zabbix -p zabbix < database/mysql/images.sql shell> mysql -u zabbix -p zabbix < database/mysql/data.sql 編譯安裝zabbix shell> ./configure --prefix=/usr/local/zabbix --enable-server --enable-proxy --enable-agent \ --with-mysql=/db/mysql/bin/mysql_config --with-net-snmp --with-libcurl shell> make && make install shell> ln -s /usr/local/zabbix/sbin/* /usr/local/sbin/ shell> ln -s /usr/local/zabbix/bin/* /usr/local/bin/
添加zabbix server端口 shell> grep zabbix /etc/services zabbix-agent 10050/tcp # Zabbix Agent zabbix-agent 10050/udp # Zabbix Agent zabbix-trapper 10051/tcp # Zabbix Trapper zabbix-trapper 10051/udp # Zabbix Trapper 更改zabbix-server.conf配置文件中關于數據庫部分。 shell> vi /usr/local/zabbix/etc/zabbix_server.conf ============================================================== DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=123@qwe DBSocket=/tmp/mysql.sock DBPort=3306 ListenIP=127.0.0.1 AlertScriptsPath=/usr/local/zabbix/share/zabbix/alertscripts ============================================================== 更改zabbix_agent.conf配置文件中關于數據庫部分 shell> vi /usr/local/zabbix/etc/zabbix_agentd.conf ============================================================== Include=/usr/local/etc/zabbix_agentd.conf.d/ UnsafeUserParameters=1 ==============================================================
拷貝zabbix前端到web目錄下 shell> cp -a frontends/php/* /usr/local/nginx/html/zabbix/ shell> chown -R nginx.nginx /usr/local/nginx/html/ 添加zabbix到開機啟動腳本并修改 shell> cp misc/init.d/fedora/zabbix_agentd /etc/init.d/ shell> cp misc/init.d/fedora/zabbix_server /etc/init.d/ 修改/etc/init.d/zabbix_server、/etc/init.d/zabbix_agentd中BASEDIR=/usr/local/zabbix shell> /etc/init.d/zabbix_agentd start Starting zabbix_agentd: [確定] shell> /etc/init.d/zabbix_server start Starting zabbix_server: [確定]
修改php配置文件參數 shell> vi /usr/local/php/lib/php.ini ============================================================== date.timezone = Asia/Shanghai post_max_size =32M max_execution_time =300 max_input_time =300 ============================================================== 啟動php-fpm、nginx shell> /usr/local/php/sbin/php-fpm shell> /usr/local/nginx/nginx
在瀏覽器中輸入http:///zabbix/setup.php,會顯示
使用默認賬號:admin 密碼:zabbix 登錄
參考:
https://www.zabbix.com/documentation/2.4/manual/installation/install
http://coolnull.com/217.html
http://www.osyunwei.com/archives/7984.html
Svoid
2015-07-02
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。