给Windows中执行的wget设置证书包文件

在Windows中执行时,wget会在四个地方查找wgetrc配置文件,按照优先级高低它们分别是:

  • 环境变量WGETRC指向的文件。
  • 如果设置了环境变量HOME,则配置文件为%HOME%\.wgetrc。
  • wget.exe所在目录的.wgetrc。
  • wget.exe所在目录的wget.ini。

Continue reading 给Windows中执行的wget设置证书包文件

Removing alternative Ubuntu flavors completely

When Ubuntu users want to try other Ubuntu flavors, e.g. Xubuntu and Lubuntu, they usually just install their meta packages:

$ sudo apt-get install xubuntu-desktop

or

$ sudo apt-get install lubuntu-desktop

apt-get can install their dependencies automatically. However, when users want to remove the alternative Ubuntu flavors completely, they are out of luck, because inter-dependencies among many packages can be rather complex, and apt tools simply does not automatically remove the dependencies of meta packages.
Continue reading Removing alternative Ubuntu flavors completely

Upgrading Ubuntu 12.04 to 14.04 on Pentium-M computers

Starting from 12.10, Ubuntu no longer offered non-PAE kernels. Some Pentium-M processors do not announce the PAE flag, although they actually have the PAE capability. When doing a release upgrade from 12.04, the Ubuntu release upgrade tool will complain of missing PAE feature on such computers and then abort after printing a link to the EnablingPAE document on the Ubuntu community help website. However, this document only covers fresh Ubuntu installation on such computers, leaving release upgrade users out in the cold.
Continue reading Upgrading Ubuntu 12.04 to 14.04 on Pentium-M computers

Ubuntu 14.04中PHP命令行找不到MIBS的提示信息

安装了php的Ubuntu 14.04服务器每半小时会执行一次/etc/cron.d/php5脚本,清理超时的php会话文件。由于找不到snmp mibs文件,php命令行解释器启动时会吐出一堆提示信息,这些信息会被Cron Daemon通过Email发送给root用户。日积月累这些无意义的邮件也会占用不少存储空间,并且会淹没有用的邮件。
Continue reading Ubuntu 14.04中PHP命令行找不到MIBS的提示信息

Configuring IPsec IKEv1 with PSK and Xauth in openwrt 15.05

Although it's not recommended for large scale IPsec deployments because the Pre-Shared Key must be shared among users, IKEv1 with PSK and Xauth is an easy-to-deploy option and is well supported by mobile devices powered by iOS and Android. Moreover, IKEv2 is not supported by the built-in VPN client in Android yet.

In this tutorial, we'll install strongSwan 5.3.3 in openwrt 15.05, configure IKEv1 with PSK and Xauth, and finally setup the built-in VPN clients in Android and iOS so they can connect to it.

Installation

First of all, install necessary strongSwan packages in openwrt 15.05:

root@OpenWrt:~# opkg update
root@OpenWrt:~# opkg install strongswan-minimal strongswan-mod-xauth-generic

Continue reading Configuring IPsec IKEv1 with PSK and Xauth in openwrt 15.05

WordPress插件Download Monitor国内打开速度慢的解决方法

WordPress插件Download Monitor可以管理文件下载。它能记录每次文件下载,统计下载次数,支持仅供网站会员下载的权限设置,并提供许多有用的短代码(shortcode)——功能丰富,却又比较简单易用,中文支持也较好。

国内用户访问安装了Download Monitor的WordPress网站会发现打开插件时速度很慢。这是由于Download Monitor调用了ajax.googleapis.com上的jquery-ui.css文件。
Continue reading WordPress插件Download Monitor国内打开速度慢的解决方法

用dd-wrt配置VLAN交换机和无线AP

802.1Q VLAN常用于企业级网络,鲜见于家庭网络。不过,家用无线路由器一般都内置一个支持VLAN功能的四口或五口的网络交换机。带五口交换机的普通无线路由器的操作系统就是使用VLAN功能来划分WAN/LAN端口的。

我的L型写字台下有一个汇集家里所有网络面板接口的配线箱,预留了一根网线连到运营商的楼道配线箱。由于运营商光网改造是装修以后的事,光纤无法通过埋设的管线穿到配线箱,我只能在光纤入户处另外安装了一只电表箱给光纤宽带家庭网关(“光猫”)专用。运营商提供的光猫不支持无线网络,而且对有线LAN设备的数量也有限制——刚安装光纤宽带时光猫只支持4个LAN设备;据运营商内部人士所说,现在这个数量限制已经提高到10个;但是,用户协议里允许的LAN设备仍然只是4个,其实在移动互联网时代允许10个LAN设备也是捉襟见肘的。因此,我只能在写字台上方放置一只自己的无线路由器,让光猫工作在桥接状态。用自己的无线路由器更加安全,而且能提供更丰富的功能。

配线箱和电表箱之间只有一根装修时预留的网线连接。写字台上方不是无线路由器最理想的位置,对家里有些角落信号覆盖不好,无线连接会时常断开,而光纤入户处却是能覆盖家里所有角落的理想位置。由于主无线路由器和电表箱之间有一堵厚墙阻隔,WDS不是理想的解决方案。这时,我想到了用无线路由器内置的VLAN功能,在电表箱旁的墙上挂一只无线路由器,既作VLAN交换机,又作无线AP。
Continue reading 用dd-wrt配置VLAN交换机和无线AP