您好,登錄后才能下訂單哦!
zabbix3.0要求的PHP、數據庫、Apache/Nginx的版本參考:
zabbix3.0對PHP、數據庫、nginx/apache版本要求參考:
https://www.zabbix.com/documentation/3.0/manual/installation/requirements
本次安裝的系統環境為centos7.2,lamp。第一次安裝使用的版本是centos6.6,lnmp。安裝后均可正常使用。
mysql版本
[root@aliyun-s2 ~]# mysql -v Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 4572 Server version: 5.5.52-MariaDB MariaDB Server Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others. Reading history-file /root/.mysql_history Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
創建zabbix庫,授權zabbix用戶
create database zabbix default charset utf8; grant all privileges on zabbix.* to zabbix@'localhost' identified by 'zabbix'; flush privileges; MariaDB [(none)]> show databases; +--------------------+ | Database | +--------------------+ | information_schema| | mysql | | performance_schema| | zabbix | +--------------------+ 4 rows in set (0.03 sec)
php安裝
yum install php php-fpm php-mysql php-gd libjpeg* php-ldap php-odbc php-pear php-xmlrpc php-mbstring php-bcmath -y
[root@djlink-aliyun-s2 ~]# php -v PHP 5.4.16 (cli) (built: Nov 6 2016 00:29:02) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies vim /etc/php.ini date.timezone = Asia/Shanghai post_max_size = 16M max_execution_time = 300 max_input_time = 300
啟動php-fpm
apache為yum安裝
vim /etc/httpd/conf/httpd.conf #把配置地址修改為將要安裝的zabbix位置, DocumentRoot "/var/www/html/zabbix-3.0.9" ServerSignature On #增加對.php的默認 DirectoryIndex index.html index.php #進行部分優化 Options Includes ExecCGI FollowSymLinks Options FollowSymLinks AllowOverride All MaxKeepAliveRequests 500 AddDefaultCharset GB2312 max_execution_time = 300 systemctl restart httpd.service
創建test.php驗證php是否正常
echo "<?php phpinfo(); ?>" > /var/www/html/zabbix/test.php
顯示phpinfo界面為正常,然后刪除test.php
安裝zabbix
下載zabbix3.0 LTS,下載速度有點慢,建議用其他工具下載本地后,rz上傳
wget https://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/3.0.9/zabbix-3.0.9.tar.gz tar zxf zabbix-3.0.9.tar.gz && cd zabbix-3.0.9 ./configure --prefix=/usr/local/zabbix-3.0.9/ --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl --with-libxml2 make && make install
創建zabbix用戶
groupadd zabbix useradd zabbix -s /sbin/nologin -M -g zabbix
導入3個sql文件到zabbix數據庫
mysql -uroot -p zabbix < database/mysql/schema.sql mysql -uroot -pzabbix < database/mysql/p_w_picpaths.sql mysql -uroot -p zabbix < database/mysql/data.sql
編輯zabbix_server.conf
vim /usr/local/zabbix-3.0.9/etc/zabbix_server.conf LogFile=/tmp/zabbix_server.log PidFile=/tmp/zabbix_server.pid DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=zabbix
啟動zabbix_server
/usr/local/zabbix-3.0.9/sbin/zabbix_server
訪問網頁進行安裝,中間一個步驟需要下載文件并上傳,上傳后需修改所屬。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。