在之前的一篇文章中有讲过zabbix之Graphtrees,这里不在重复描述,总而言之zabbix中Graphtrees还是比较好用的github链接
升级3.0.2到3.0.4
1,下载release
[root@LinuxEA local]# yum install http://repo.zabbix.com/zabbix/3.0/rhel/6/x86_64/zabbix-release-3.0-1.el6.noarch.rpm
2,停掉zabbix_server删除掉/usr/share/zabbix这里你需要注意,我在这里是有备份的,我删除旧的是因为我之前用的3.0.1版本的,尽管如此,我还是有备份最开始的zabbix web源码的,删除需谨慎[root@LinuxEA local]# rm -rf /usr/share/zabbix
3,重新安装
版权属于:www.linuxea.com转载时须注明出处及本声明
[root@LinuxEA local]# yum install zabbix-server zabbix_agentd zabbix-get
zabbix-java-gateway zabbix-sender zabbix-server-mysql zabbix-web
4,切换到zabbix目录下下载graphtree3.0.4.patch进行安装并且修改权限
[root@LinuxEA local]# cd /usr/share/zabbix
[root@LinuxEA local]# wget https://raw.githubusercontent.com/OneOaaS/graphtrees/master/graphtree3.0.4.patch
[root@LinuxEA local]# patch -Np0 <graphtree3.0.4.patch
[root@LinuxEA local]# chown -R apache.apache oneoaas
请注意:事实上,3.0.1到3.0.4都可以使用,并不需要升级,只需要第4步安装即可
ok,那么现在问题来了,本身的Graphtrees是有广告的,我们来修改1,去掉最下方广告位
[root@LinuxEA local]# vim /usr/share/zabbix/oneoaas/templates/graphtree/graphtree.tpl
63 {*<footer class="footer navbar-inverse">
64 <div class="container">
65 <ul>
66 <li class="qrcode">
67 <img src="https://www.linuxea.com/oneoaas/assets/img/qrcode.jpg">
68 <p>专业 合作 开放 </p>
69 <p>运维方案解决专家</p>
70 </li>
71 <li class="business">
72 <p>Zabbix监控项目承接</p>
73 <p>运维解决方案咨询</p>
74 <p>运维产品咨询</p>
75 <p><a href="http://www.oneoaas.com">www.oneoaas.com</a></p>
76 <p>请联系 support#oneoaas.com (#替换为@)</p>
77 </li>
78 <li>
79 <p><a href="http://weibo.com/itnihao" target="_blank" rel="noopener noreferrer">@itnihao</a></p>
80 <p><a href="http://weibo.com/hell0wor1d" target="_blank" rel="noopener noreferrer">@hell0wor1d</a></p>
81 </li>
82 </ul>
83 </div>
84 </footer>*}
2,修改logo和logo链接
8 <div class="pull-left">
9 <a style="background-color: #008ed8;padding: 8px;">
10 <img src="https://www.linuxea.com/oneoaas/assets/img/logo.png">
11 </a>
12 </div>
图片位置
login
[root@LinuxEA local]# /usr/share/zabbix/oneoaas/assets/img/login.png
小生顺便会点ps。所以连logo都做好了,如下全图是白色,链接在这里:https://img.mryunwei.com/uploads/2023/07/20230716041525348.png最终效果