ubuntu下php扩展的曲线救国计划

每次更换服务器,后续都会有很多的事情需要去处理。有的是服务器本身的问题,有的是各种配置问题。所以不到万不得已实在是不想更换服务器,下午看到杜老师的留言提到了litespeed cache,于是登录后台看了一眼,发现原来的redis缓存配置没有生效。问题也很容易定位,那就是没有安装php的redis扩展。正常的话通过apt就可以安装,但是问题出现了,工控机上php 和php-fpm不是同一个版本。

Continue Reading

ubuntu性能监视工具glances

Glances is a cross-platform monitoring tool which aims to present a maximum of information in a minimum of space through a curses or Web based interface. It can adapt dynamically the displayed information depending on the terminal size.

It can also work in client/server mode. Remote monitoring could be done via terminal, Web interface or API (XMLRPC and RESTful).

Glances is written in Python and uses the psutil library to get information from your system.

Stats can also be exported to external time/value databases.

Continue Reading

树莓派UPS自定义关机脚本(NUT)

NUT 树莓派自定义关机逻辑,上一篇文章太长了,拉出来一些:

默认关机逻辑貌似是:nut服务会在UPS发送LOWBATT时通知机器关机,触发时机默认为ups电量剩余20%

如果要自定义关机设置需要进行如下设置(因为群辉提供的ups服务器在ups断电之前就关闭了,不清楚服务器在关机之前是不是会发送lowbatt消息)

1.编辑upsmon.conf,添加以下内容:

vim /etc/nut/upsmon.conf
NOTIFYCMD /sbin/upssched
NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC

Continue Reading

是UPS吖(三)–-树莓派

装ups的另外一个目的就是为了保证树莓派的存储卡不会因为意外断电而出现问题。其实要解决这个问题个人觉得也简单,毕竟也是个linux啊。可以基于nut实现。

The primary goal of the Network UPS Tools (NUT) project is to provide support for Power Devices, such as Uninterruptible Power Supplies, Power Distribution Units, Automatic Transfer Switches, Power Supply Units and Solar Controllers. NUT provides a common protocol and set of tools to monitor and manage such devices, and to consistently name equivalent features and data points, across a vast range of vendor-specific protocols and connection media types.

NUT provides many control and monitoring features, with a uniform control and management interface. If you are just getting acquainted with NUT, that page also explains the technical design and some possible set-ups.

More than 170 different manufacturers, and several thousands of models are compatible.

https://networkupstools.org/index.html
Continue Reading

是UPS吖(二)–-群晖

开篇当然还是最喜欢的小姐姐啊。其实ups的安装还是非常简单的,不过后面的插孔都是3插,机柜上就安装了一排机柜插座,导致出现一个问题就是机柜内很多双口插头没地方插,本来想把边上的插排撤掉的,但是明显不行啊,两个光纤转换器插头+路由器+交换机的插头都没地方插,于是就把插排又给按上了。安装之后的效果就是下面这个样子啦。

Continue Reading

群辉 NAS 降级记

nas存储一直提示可以升级7.0.于是在一个月黑风高的夜晚,手一抖,点了个升级。升级完之后就发现抑郁了,smb协议的共享在Windows下慢的1b。之前千兆网络基本是秒开,结果升级之后打开共享需要等将近10s钟。管理后台更卡,从开始加载到完全显示需要半分钟。这tm就抑郁了,于是开始搜索降级教程。

Continue Reading

LANDrop 局域网文件传输神器 (跨平台 AirDrop)

LANDrop 是一款开源免费的支持跨平台的「局域网文件传输工具」,它的使用体验上可以媲美苹果生态的“隔空投送”功能!能超级快速方便地将 iPhone、iPad、Android 手机/平板;Windows、Mac、Linux 电脑上的照片、视频、文档、文件发送到别的设备去。

Continue Reading