Add Future Expires Headers
[
2009/08/21 16:40 | by askwan ]
2009/08/21 16:40 | by askwan ]
无它 可以增加YSlow得分
apache配置文件http.conf 或者 .htaccess文件 根据需要自行添加
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Expires "Fri, 08 Aug 2010 08:08:08 GMT"
</FilesMatch>
注意:
1。若有很多静态文件,如ico,jpg,css,js,gif之类的文件长时间不会改变或者更新的,用此方法甚好
2。若这类文件更新比较频繁,那过期时间就设置得距离现在短一点。
apache配置文件http.conf 或者 .htaccess文件 根据需要自行添加
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Expires "Fri, 08 Aug 2010 08:08:08 GMT"
</FilesMatch>
注意:
1。若有很多静态文件,如ico,jpg,css,js,gif之类的文件长时间不会改变或者更新的,用此方法甚好
2。若这类文件更新比较频繁,那过期时间就设置得距离现在短一点。
"Metadata file does not match checksum"
[
2009/07/30 11:55 | by askwan ]
2009/07/30 11:55 | by askwan ]
yum有时候不是很稳定?不知道是不是RP问题
每次出现这个 都要“清仓”才行
yum clean all
奈何?
[Errno -1] Metadata file does not match checksum
Trying other mirror.
Trying other mirror.
每次出现这个 都要“清仓”才行
yum clean all
奈何?
"There is no public key available for the following key IDs" 问题
[
2009/06/08 23:53 | by askwan ]
2009/06/08 23:53 | by askwan ]
OS: debian 4.0 etch
此问题比较普遍 故记录之 且供参考
一般都是在apt-get update 后出错:
按照提示 运行apt-get update这个指令 很遗憾 无论运行多少次 都无济于事
为演示这一过程 先下apt-key指令 import当前的keys
# apt-key update
当前系统有4个keys
增加上面列出的key
gpg --keyserver wwwkeys.eu.pgp.net --recv-keys 9AA38DCD55BE302B && apt-key add /root/.gnupg/pubring.gpg
再来看看系统中的trusted gpg keys信息
# apt-key list
/etc/apt/trusted.gpg
--------------------
pub 1024D/2D230C5F 2006-01-03 [expired: 2007-02-07]
uid Debian Archive Automatic Signing Key (2006)
pub 1024D/6070D3A1 2006-11-20 [expires: 2009-07-01]
uid Debian Archive Automatic Signing Key (4.0/etch)
pub 1024D/ADB11277 2006-09-17
uid Etch Stable Release Key
pub 1024D/BBE55AB3 2007-03-31 [expires: 2010-03-30]
uid Debian-Volatile Archive Automatic Signing Key (4.0/etch)
sub 2048g/36CA98F3 2007-03-31 [expires: 2010-03-30]
pub 4096R/55BE302B 2009-01-27 [expires: 2012-12-31]
uid Debian Archive Automatic Signing Key (5.0/lenny)
OK 5个 最后一行正是刚才加入的
再次apt-get update 就应该没有问题了
#apt-get update
还有一种情况就是 key过期的问题 那么这时候可以一个个先删除系统中的key
比如
apt-key list
apt-key del 55BE302B
apt-key del BBE55AB3
...
然后删除debian-archive-keyring包
dpkg –purge debian-archive-keyring
再次重新安装
apt-get install debian-archive-keyring
基本上都能解决这个问题
---------------END---------------
此问题比较普遍 故记录之 且供参考
一般都是在apt-get update 后出错:
W: There is no public key available for the following key IDs:
9AA38DCD55BE302B
W: You may want to run apt-get update to correct these problems
9AA38DCD55BE302B
W: You may want to run apt-get update to correct these problems
按照提示 运行apt-get update这个指令 很遗憾 无论运行多少次 都无济于事
为演示这一过程 先下apt-key指令 import当前的keys
# apt-key update
gpg: key 2D230C5F: "Debian Archive Automatic Signing Key (2006) <ftpmaster@debian.org>" not changed
gpg: key 6070D3A1: "Debian Archive Automatic Signing Key (4.0/etch) <ftpmaster@debian.org>" not changed
gpg: key ADB11277: "Etch Stable Release Key <debian-release@lists.debian.org>" not changed
gpg: key BBE55AB3: "Debian-Volatile Archive Automatic Signing Key (4.0/etch)" not changed
gpg: Total number processed: 4
gpg: unchanged: 4
gpg: key 6070D3A1: "Debian Archive Automatic Signing Key (4.0/etch) <ftpmaster@debian.org>" not changed
gpg: key ADB11277: "Etch Stable Release Key <debian-release@lists.debian.org>" not changed
gpg: key BBE55AB3: "Debian-Volatile Archive Automatic Signing Key (4.0/etch)" not changed
gpg: Total number processed: 4
gpg: unchanged: 4
当前系统有4个keys
增加上面列出的key
gpg --keyserver wwwkeys.eu.pgp.net --recv-keys 9AA38DCD55BE302B && apt-key add /root/.gnupg/pubring.gpg
再来看看系统中的trusted gpg keys信息
# apt-key list
/etc/apt/trusted.gpg
--------------------
pub 1024D/2D230C5F 2006-01-03 [expired: 2007-02-07]
uid Debian Archive Automatic Signing Key (2006)
pub 1024D/6070D3A1 2006-11-20 [expires: 2009-07-01]
uid Debian Archive Automatic Signing Key (4.0/etch)
pub 1024D/ADB11277 2006-09-17
uid Etch Stable Release Key
pub 1024D/BBE55AB3 2007-03-31 [expires: 2010-03-30]
uid Debian-Volatile Archive Automatic Signing Key (4.0/etch)
sub 2048g/36CA98F3 2007-03-31 [expires: 2010-03-30]
pub 4096R/55BE302B 2009-01-27 [expires: 2012-12-31]
uid Debian Archive Automatic Signing Key (5.0/lenny)
OK 5个 最后一行正是刚才加入的
再次apt-get update 就应该没有问题了
#apt-get update
Get:1 http://security.debian.org etch/updates Release.gpg [1032B]
Hit http://security.debian.org etch/updates Release
Ign http://security.debian.org etch/updates/main Packages/DiffIndex
Ign http://security.debian.org etch/updates/contrib Packages/DiffIndex
Ign http://security.debian.org etch/updates/main Sources/DiffIndex
Ign http://security.debian.org etch/updates/contrib Sources/DiffIndex
Hit http://security.debian.org etch/updates/main Packages
Hit http://security.debian.org etch/updates/contrib Packages
Hit http://security.debian.org etch/updates/main Sources
Hit http://security.debian.org etch/updates/contrib Sources
Fetched 1B in 2s (0B/s)
Reading package lists... Done
Hit http://security.debian.org etch/updates Release
Ign http://security.debian.org etch/updates/main Packages/DiffIndex
Ign http://security.debian.org etch/updates/contrib Packages/DiffIndex
Ign http://security.debian.org etch/updates/main Sources/DiffIndex
Ign http://security.debian.org etch/updates/contrib Sources/DiffIndex
Hit http://security.debian.org etch/updates/main Packages
Hit http://security.debian.org etch/updates/contrib Packages
Hit http://security.debian.org etch/updates/main Sources
Hit http://security.debian.org etch/updates/contrib Sources
Fetched 1B in 2s (0B/s)
Reading package lists... Done
还有一种情况就是 key过期的问题 那么这时候可以一个个先删除系统中的key
比如
apt-key list
apt-key del 55BE302B
apt-key del BBE55AB3
...
然后删除debian-archive-keyring包
dpkg –purge debian-archive-keyring
再次重新安装
apt-get install debian-archive-keyring
基本上都能解决这个问题
---------------END---------------
测试速度还可以的apt源
[
2009/05/13 00:06 | by askwan ]
2009/05/13 00:06 | by askwan ]
You don't have the permission to view this entry.




