海运的博客

ubuntu 通过ppa源安装最新版qbittorrent

发布时间:September 28, 2018 // 分类:PT // No Comments

添加源时出错:

add-apt-repository ppa:qbittorrent-team/qbittorrent-stable
ERROR: '~qbittorrent-team' user or team does not exist.

确认ppa用户名没错后用curl测试http获取是否正常,提示证书无效:

curl 'https://launchpad.net/~qbittorrent-team/+archive/ubuntu/qbittorrent-stable'
curl: (60) SSL certificate problem: certificate is not yet valid

安装证书后再试:

apt-get install ca-certificates

依旧出现错误,查看系统时间不对,通过ntp更新时间解决:

ntpdate ntp.ubuntu.com

或查看Technical details about this PPA,手工添加源和gpg key。

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 401E8827DA4E93E44C7D01E6D35164147CA69FC4
cat <<EOF > /etc/apt/sources.list.d/qbittorrent-ppa.list
deb https://ppa.launchpadcontent.net/qbittorrent-team/qbittorrent-stable/ubuntu `lsb_release -c -s` main
deb-src https://ppa.launchpadcontent.net/qbittorrent-team/qbittorrent-stable/ubuntu `lsb_release -c -s` main
EOF

initrd.img解压与打包

发布时间:September 26, 2018 // 分类: // No Comments

查看文件压缩类型:

file initrd.img

如果是gzip:

mv initrd.img initrd.img.gz
gzip -d initrd.img.gz

如果是xz:

initrd.img initrd.img.xz
mv xz -d initrd.img.xz

解压出来是cpio archive文件,然后文件解压出来:

cpio -i -d < initrd.img

打包:

find . | cpio -H newc --create --verbose | gzip -9 > ../initrd.img

libtorrent提高上传速度

发布时间:September 21, 2018 // 分类: // No Comments

// 1600mb cache
pack.set_int(libt::settings_pack::cache_size, 102400);
pack.set_bool(libt::settings_pack::use_read_cache, true);
pack.set_int(libt::settings_pack::suggest_mode, libt::settings_pack::suggest_read_cache);
// of 500 ms, and a send rate of 24 MB/s, the upper
// limit should be 12 MB
pack.set_int(libt::settings_pack::send_buffer_watermark, 12 * 1024 * 1024);
// put 1.5 seconds worth of data in the send buffer
// this gives the disk I/O more heads-up on disk
// reads, and can maximize throughput
pack.set_int(libt::settings_pack::send_buffer_watermark_factor, 150);
// always stuff at least 1 MiB down each peer
// pipe, to quickly ramp up send rates
pack.set_int(libt::settings_pack::send_buffer_low_watermark, 1 * 1024 * 1024);

其它可开启suggest_mode,关闭uTP。
来源:https://github.com/arvidn/libtorrent/issues/1709
参考:https://www.libtorrent.org/tuning.html

qq smtp 465/587端口区别

发布时间:September 20, 2018 // 分类: // No Comments

使用https://github.com/snipworks/php-smtp 通过qq smtp 465端口发送邮件失败,原因是smtp ssl有两个端口使用不同的两种协议:
465端口使用smtps协议,php-smtp设置setProtocol(Email::SSL);
587端口使用starttls协议,php-smtp设置setProtocol(Email::TLS);

ext4文件系统性能提升

发布时间:September 20, 2018 // 分类: // No Comments

不重视数据安全可使用以下方法提升硬盘读写文件性能。

mount -o noatime,data=writeback,commit=60,barrier=0,noacl,nouser_xattr,delalloc
tune2fs -o journal_data_writeback /dev/sdb1

或直接关闭日志功能:

tune2fs -O ^has_journal /dev/sdb1
tune2fs -l /dev/sdb1 |grep 'Filesystem features'|grep 'has_journal'
mount -o noatime,noacl,nouser_xattr,delalloc

重新开启日志:

tune2fs -O has_journal /dev/sdb1  

http://blog.51cto.com/purplegrape/1421331
https://blog.csdn.net/helloanthea/article/details/50464774
http://blog.chinaunix.net/uid-1829236-id-3188132.html

分类
最新文章
最近回复
  • 海运: 恩山有很多。
  • swsend: 大佬可以分享一下固件吗,谢谢。
  • Jimmy: 方法一 nghtp3步骤需要改成如下才能编译成功: git clone https://git...
  • 海运: 地址格式和udpxy一样,udpxy和msd_lite能用这个就能用。
  • 1: 怎么用 编译后的程序在家里路由器内任意一台设备上运行就可以吗?比如笔记本电脑 m参数是笔记本的...
  • 孤狼: ups_status_set: seems that UPS [BK650M2-CH] is ...
  • 孤狼: 擦。。。。apcupsd会失联 nut在冲到到100的时候会ONBATT进入关机状态,我想想办...
  • 海运: 网络,找到相应的url编辑重发请求,firefox有此功能,其它未知。
  • knetxp: 用浏览器F12网络拦截或监听后编辑重发请求,修改url中的set为set_super,将POS...
  • Albert: 啊啊啊啊啊啊啊啊啊 我太激动了,终于好了英文区搜索了半天,翻遍了 pve 论坛没找到好方法,博...