分类 瞎搞教程 下的文章

海康威视录像机萤石云无法播放


最近在调试录像机萤石云APP的时候遇到个奇怪的现象:
萤石云APP扫码添加录像机以后,手机在连接本地局域网wifi情况下播放一切正常,但是使用4G/5G或者其它非本地局域网wifi的情况下,点击播放会一直加载中直至显示播放失败,将图中红框处默认的MTU值改小后( 改为1280 )恢复正常。
hikvision-mtu.png


Ubuntu开启 root ssh


Ubuntu为安全默认情况下root是不能使用ssh登录的。
使用ssh登录普通用户
执行命令重置root密码:

sudo passwd root

编辑ssh配置文件:

sudo vi /etc/ssh/sshd_config

将PermitRootLogin prohibit-password前面加#注释掉,下面新增一行

PermitRootLogin yes

(如果需要顺便修改ssh服务端口修改上面一点的port参数后面的端口号)

最后重启ssh服务以便修改的参数生效:

sudo service ssh restart

Ubuntu更换内核


Ubuntu.jpg
因需安装lotServer(锐速母公司产品),但该软件支持Ubuntu 16.04的内核版本为4.4.0-47,现手中机器的内核版本为4.4.0-142导致不能直接安装使用,所以我们需要对其内核进行降级处理。
我们可以通过apt安装4.4.0-47内核

apt-get update
apt-get install linux-image-extra-4.4.0-47-generic

查看系统中存在的现有所有内核

dpkg -l|grep linux-image

我们新安装的内核为4.4.0-47,所以删除其它的,我这里是删除4.4.0-142:

apt-get purge linux-image-4.4.0-142-* linux-image-extra-4.4.0-142-*

刷新GRUB文件:

update-grub

重启机器后生效
使用下面命令查看是否生效:

uname -r


Debian8降级内核


debian.jpg

因lotServer(锐速母公司产品)只支持3.16.0-4-amd64内核,现有机器的debian8内核查看为3.16.0-6-amd64,导致无法安装,所以就需要将内核降级为3.16.0-4-amd64。

下载所需的3.16.0.4-amd64内核

wget http://security-cdn.debian.org/pool/updates/main/l/linux/linux-image-3.16.0-4-amd64_3.16.43-2+deb8u5_amd64.deb

安装内核

dpkg -i linux-image-3.16.0-4*.deb

删除多余内核
执行dpkg -l|grep linux-image查看现有所有内核,删除3.16.0.6内核

apt-get -y remove linux-image-3.16.0-6-amd64

弹窗选择no继续

更新启动文件并重启

update-grub

reboot

重启完成使用uname -r查看内核是否已经为3.16.0.4版本。


nexusphp ut3.4.2---3.4.9以及3.5支持


ut.png
装好nexusphp,什么,竟然不支持ut3.4.X和3.5.X(其实支持了也没啥用,还是老版本好用,但对于强迫症来说,这怎么可以接受)。
3.4.x sql语句如下:

INSERT INTO agent_allowed_family (family, start_name, peer_id_pattern, peer_id_match_num, peer_id_matchtype, peer_id_start, agent_pattern, agent_match_num, agent_matchtype, agent_start, exception, allowhttps, comment, hits) VALUES ('uTorrent 3.4.x', 'uTorrent 3.4.0', '/^-UT34([0-9])([0-9])-/', 3, 'dec', '-UT3400-', '/^uTorrent/34([0-9])/', 3, 'dec', 'uTorrent/3400', 'no', 'yes', '', 0);

3.5.x如法炮制:

INSERT INTO agent_allowed_family (family, start_name, peer_id_pattern, peer_id_match_num, peer_id_matchtype, peer_id_start, agent_pattern, agent_match_num, agent_matchtype, agent_start, exception, allowhttps, comment, hits) VALUES ('uTorrent 3.5.x', 'uTorrent 3.5.0', '/^-UT35([0-9])([0-9])-/', 3, 'dec', '-UT3500-', '/^uTorrent/35([0-9])/', 3, 'dec', 'uTorrent/3500', 'no', 'yes', '', 0);

nexusphp使用rtorrent提示不支持https


logo.png
装好nexusphp后,默认的情况下,rt客户端使用https tracker会提示“This client does not support https well, Please goto xxx.xxx/faq.php#id29 for a list of proper clients”,此客户端不支持https,解决办法很简单,只需修改数据库一个表项,执行以下sql:

UPDATE agent_allowed_family SET allowhttps='yes' WHERE family='RTorrent 0.x(with libtorrent 0.x)';