Debian更新时候出现“GPG error The following signatures couldn't be verified because the public key is not available”错误

apt-get update时出现错误,如下:

W: GPG error: http://ftp.us.debian.org lenny-proposed-updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA

这个是由于PGP证书的问题,如下解决:
gpg --keyserve[......]

继续阅读

Debian/Ubuntu源source.list自动生成器

你是否也曾四处寻找可用的Debian源?

不用找啦,分享一个非常好的服务:

Debian Sources List Generator,它能让你选择发行版本、源类型等,非常好用。

可惜的是没有China。。选Taiwan是可以的。

2011.10.1更新:已经有China选项了。

地址如下:

http://debgen.simplylinux.ch/

2011.10.18更新,还有Ubuntu的源如下:

http://repogen.simplyl[......]

继续阅读

如何从Linux shell里发邮件(带附件)

对于简单的邮件,可以直接使用sendmail或者mailx,但是带附件的比较麻烦,我们可以使用mutt。

1、安装
以Ubuntu/Debian为例,apt-get,CentOS等可以yum。
sudo apt-get install mutt
2、发邮件
请确认已经配置了sendmail
echo "Content" | mutt -s "Subject" xxxx@gmail.com -a ./firewall.sh
如上面所示:Content、Subject是内容和标题[......]

继续阅读