zabbix2.2升级zabbix3.0.4的方案
今天小编就为大家带来一篇zabbix2.2升级zabbix3.0.4的文章。小编觉得挺不错的,为此分享给大家做个参考。一起跟随小编过来看看吧。
创新互联是一家专注于成都做网站、成都网站制作与策划设计,江永网站建设哪家好?创新互联做网站,专注于网站建设十载,网设计领域的专业建站公司;建站业务涵盖:江永等地区。江永做网站价格咨询:18982081108
需求:zabbix2.2升级到3.0.4
备注:zabbix 2.5之后对php有严格要求,php版本必须大于php5.4
php升级可以覆盖安装,也可以多处安装再选择,此处选择后者。
安装php5.6.24
yum install -y libxml2 libxml2-devel \
openssl openssl-devel \
curl* libcurl* \
libvpx* libjpeg* \
libpng libpng-devel \
freetype* t1lib* \
zlib zlib-devel \
zip unzip gzip \
ncurses* pcre pcre-devel \
bzip2* gd gd-devel \
libevent libevent-devel \
libmcrypt-devel libmcrypt \
libxslt-devel net-snmp-devel hping2 php-bcmath
###下载php5.6.18
wget http://10.31.67.32:8099/Download/php/php-5.6.18.tar.gz
tar -zxf php-5.6.18.tar.gz
cd php-5.6.18
./configure --prefix=/usr/local/php5 --with-config-file-path=/usr/local/php5/etc --with-bz2 --with-curl --enable-ftp --enable-sockets --disable-ipv6 --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-freetype-dir=/usr/local --enable-gd-native-ttf --with-iconv-dir=/usr/local --enable-mbstring --enable-calendar --with-gettext --with-libxml-dir=/usr/local --with-zlib --with-pdo-MySQL=mysqlnd --with-mysqli=mysqlnd --with-mysql=mysqlnd --enable-dom --enable-xml --enable-fpm --with-libdir=lib64 --enable-bcmath --enable-xmlwriter --enable-xmlreade
make && make install
cp php.ini-production /usr/local/php5/etc/php.ini
cp /usr/local/php5/etc/php-fpm.conf.default /usr/local/php5/etc/php-fpm.conf
vi /usr/local/php5/etc/php-fpm.conf
user = nginx
group = nginx
vi /usr/local/php5/etc/php.ini
max_execution_time = 300
memory_limit = 128M
post_max_size = 16M
upload_max_filesize = 2M
max_input_time = 300
date.timezone = PRC
###nginx端配置上反代php
location ~ .*\.(php)?$
{
expires -1s;
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
}
/usr/local/php5/sbin/php-fpm
###安装zabbix3.0.4server端
tar -zxf zabbix-3.0.4.tar.gz
cd zabbix-3.0.4
./configure --prefix=/usr/local/zabbix3.0.4 --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl --with-libxml2
make && make install
##报错configure: error: MySQL library not found
#yum install mysql-devel
###安装zabbix3.0.4agentd端
tar -zxf zabbix-3.0.4.tar.gz
./configure --prefix=/usr/local/zabbix3.0.4/ --enable-agent
make && make install
##copy旧版本的配置文件
cp /etc/zabbix/zabbix_agentd.conf /usr/local/zabbix3.0.4/etc/
cp /etc/zabbix/zabbix_server.conf /usr/local/zabbix3.0.4/etc/
《《《《《修改日志部分,便于查询问题》》》》》》
vi /usr/local/php5/etc/php.ini
always_populate_raw_post_data = -1
date.timezone = Asia/Shanghai
###copy新的zabbix前端目录
cp -a /home/software/zabbix-2.2.10rc1/frontends/php/* /usr/local/nginx/html/zabbixdx/
###编辑zabbix.conf.php
cp -a /usr/local/nginx/html/zabbix/conf/zabbix.conf.php /usr/local/nginx/html/zabbixdx/conf/
vi zabbix.conf.php
###修改字体
mv /home/server/DejaVuSans.ttf /usr/local/nginx/html/zabbixdx/fonts/
###把新的zabbix3.0.4启动
/usr/local/zabbix3.0.4/sbin/zabbix_server -c /usr/local/zabbix3.0.4/etc/zabbix_server.conf
/usr/local/zabbix3.0.4/sbin/zabbix_agentd -c /usr/local/zabbix3.0.4/etc/zabbix_agentd.conf
###修改字体
###回滚旧版本zabbix2.2
/etc/init.d/zabbix_server -c /etc/zabbix/zabbix_server.conf
/etc/init.d/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
###兆维zabbix mysql重启命令
service mysqld restart
###修改web页面显示多少条告警
vi defines.inc.php
define('DEFAULT_LATEST_ISSUES_CNT', 500)
上述就是zabbix2.2升级zabbix3.0.4的详细内容,详细使用情况还需要大家自己动手实验使用过才能领会。如果想了解更多,欢迎关注创新互联行业资讯频道!
网站标题:zabbix2.2升级zabbix3.0.4的方案
URL网址:http://myzitong.com/article/jdicse.html