12月11
十年来中国观测条件最好的一次月全食天象10日晚如约而至。中国大部分地区的公众都有幸欣赏到一轮“红月亮”高挂夜空的美丽景象。
10日20时45分,高挂天际的一轮圆月开始慢慢地缺了一个角,接着逐渐成为弯月形、金钩形。22时许,一轮古铜色的红月亮,好似一盏红灯笼高悬夜空。11时左右,月亮又逐渐恢复了弯月形。
在北京、上海、南京等地,众多天文发烧友集中在开阔地共同目睹了这一天文奇观,人们有的架起天文望远镜,有的直接用肉眼观看,大家被壮丽的天象震撼,照相机快门声响成一片。当红月亮出现时,观测的人群中爆发出阵阵欢呼,为目睹这一奇妙天象感到幸运和兴奋。在全国各地,更多普通公众在自家阳台上用肉眼就可以观看这一天象。
据专家介绍,本次月全食开始于北京时间10日19时33分,初亏在20时45分,食既在22时06分,生光时刻为22时57分,复圆在次日零时17分。从食既到生光,全食时间有51分钟。
这次月全食是继2001年1月10日之后,中国观测条件最好的一次月全食,中国全境几乎都可以观测到,且持续时间较长。由于发生在上半夜,在天气条件晴好的地方,公众可以清晰地看到月食全过程。
天文专家介绍说,月食分为半影月食、月偏食和月全食三种,其中月全食最为壮观。发生月全食时,由于波长较长的红光不容易被地球大气层散射,因此月全食期间的月亮也就变成了红色。
据了解,中国下一次月全食天象将发生在2014年10月8日。到2018年,中国将迎来又一次月全食高发年,公众可以欣赏两次月全食,分别发生在1月31日和7月28日。
10日20时45分,高挂天际的一轮圆月开始慢慢地缺了一个角,接着逐渐成为弯月形、金钩形。22时许,一轮古铜色的红月亮,好似一盏红灯笼高悬夜空。11时左右,月亮又逐渐恢复了弯月形。
在北京、上海、南京等地,众多天文发烧友集中在开阔地共同目睹了这一天文奇观,人们有的架起天文望远镜,有的直接用肉眼观看,大家被壮丽的天象震撼,照相机快门声响成一片。当红月亮出现时,观测的人群中爆发出阵阵欢呼,为目睹这一奇妙天象感到幸运和兴奋。在全国各地,更多普通公众在自家阳台上用肉眼就可以观看这一天象。
据专家介绍,本次月全食开始于北京时间10日19时33分,初亏在20时45分,食既在22时06分,生光时刻为22时57分,复圆在次日零时17分。从食既到生光,全食时间有51分钟。
这次月全食是继2001年1月10日之后,中国观测条件最好的一次月全食,中国全境几乎都可以观测到,且持续时间较长。由于发生在上半夜,在天气条件晴好的地方,公众可以清晰地看到月食全过程。
天文专家介绍说,月食分为半影月食、月偏食和月全食三种,其中月全食最为壮观。发生月全食时,由于波长较长的红光不容易被地球大气层散射,因此月全食期间的月亮也就变成了红色。
据了解,中国下一次月全食天象将发生在2014年10月8日。到2018年,中国将迎来又一次月全食高发年,公众可以欣赏两次月全食,分别发生在1月31日和7月28日。
11月30
1、FTP上传帝国备份王至旧的Boblog空间,通过URL登陆帝国备份王(默认帐号密码:admin/123456。强烈建议修改默认密码!);
2、在帝国备份王“参数设置”里,设置mysql数据库的相关参数,如果没问题的话,点“提交”会返回“设置参数成功”的信息;
3、点击“备份数据”菜单,选择需要备份的数据库(默认都已选中),点击“开始备份”即可;
4、利用FTP客户端工具(FlashFXP、CuteFTP等)登陆旧的BoBlog空间,将所以有的数据拉回本地;
5、在新的空间(如:LAMP或LNMP等)里,将刚拉回来的数据全部上传至新空间里;
6、创建虚拟站点配置文件、伪静态及配置文件权限等。
(附:BoBlog的nginx的伪静态规则,写入BoBlog虚拟站点配置文件里面)
7、通过Shell访问新空间地址,将以前旧数据库服务器地址(database.xxxx.org)修改为新的数据库服务器地址;
8、通过URL访问新空间里的帝国备份王,配置mysql数据库的相关参数;
9、点击“恢复数据”,将数据进行恢复;
10、通过URL访问新的空间地址,并进入BoBlog进行缓存的更新即可。
2、在帝国备份王“参数设置”里,设置mysql数据库的相关参数,如果没问题的话,点“提交”会返回“设置参数成功”的信息;
3、点击“备份数据”菜单,选择需要备份的数据库(默认都已选中),点击“开始备份”即可;
4、利用FTP客户端工具(FlashFXP、CuteFTP等)登陆旧的BoBlog空间,将所以有的数据拉回本地;
5、在新的空间(如:LAMP或LNMP等)里,将刚拉回来的数据全部上传至新空间里;
6、创建虚拟站点配置文件、伪静态及配置文件权限等。
(附:BoBlog的nginx的伪静态规则,写入BoBlog虚拟站点配置文件里面)
if (!-e $request_filename)
{
rewrite ^/post/([0-9]+)/?([0-9]+)?/?([0-9]+)?/?$ /read.php?entryid=$1&page=$2&part=$3 last;
rewrite ^/page/([0-9]+)/([0-9]+)/?$ /index.php?mode=$1&page=$2 last;
rewrite ^/starred/([0-9]+)/?([0-9]+)?/?$ /star.php?mode=$1&page=$2 last;
rewrite ^/category/([^/]+)/?([0-9]+)?/?([0-9]+)?/?$ /index.php?go=category_$1&mode=$2&page=$3 last;
rewrite ^/archiver/([0-9]+)/([0-9]+)/?([0-9]+)?/?([0-9]+)?/?$ /index.php?go=archive&cm=$1&cy=$2&mode=$3&page=$4 last;
rewrite ^/date/([0-9]+)/([0-9]+)/([0-9]+)/?([0-9]+)?/?([0-9]+)?/?$ /index.php?go=showday_$1-$2-$3&mode=$4&page=$5 last;
rewrite ^/user/([0-9]+)/?$ /view.php?go=user_$1 last;
rewrite ^/tags/([^/]+)/?([0-9]+)?/?([0-9]+)?/?$ /tag.php?tag=$1&mode=$2&page=$3 last;
rewrite ^/component/id/([0-9]+)/?$ /page.php?pageid=$1 last;
rewrite ^/component/([^/]+)/?$ /page.php?pagealias=$1 last;
#Force redirection for old rules
rewrite ^/read\.php/([0-9]+)\.htm$ http://$host/post/$1/ permanent;
rewrite ^/post/([0-9]+)\.htm$ http://$host/post/$1/ permanent;
rewrite ^/post/([0-9]+)\_([0-9]+)\.htm$ http://$host/post/$1/$2/ permanent;
rewrite ^/post/([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ http://$host/post/$1/$2/$3/ permanent;
rewrite ^/index\_([0-9]+)\_([0-9]+)\.htm$ http://$host/page/$1/$2/ permanent;
rewrite ^/star\_([0-9]+)\_([0-9]+)\.htm$ http://$host/starred/$1/$2/ permanent;
rewrite ^/category\_([0-9]+)\.htm$ http://$host/category/$1/ permanent;
rewrite ^/category\_([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ http://$host/category/$1/$2/$3/ permanent;
rewrite ^/archive\_([0-9]+)\_([0-9]+)\.htm$ http://$host/archiver/$1/$2/ permanent;
rewrite ^/archive\_([0-9]+)\_([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ http://$host/archiver/$1/$2/$3/$4/ permanent;
rewrite ^/showday\_([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ http://$host/date/$1/$2/$3/ permanent;
rewrite ^/showday\_([0-9]+)\_([0-9]+)\_([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ http://$host/date/$1/$2/$3/$4/$5/ permanent;
#Filename alias
rewrite ^/([a-zA-Z0-9_-]+)/?([0-9]+)?/?([0-9]+)?/?$ /read.php?blogalias=$1&page=$2&part=$3 last;
}
{
rewrite ^/post/([0-9]+)/?([0-9]+)?/?([0-9]+)?/?$ /read.php?entryid=$1&page=$2&part=$3 last;
rewrite ^/page/([0-9]+)/([0-9]+)/?$ /index.php?mode=$1&page=$2 last;
rewrite ^/starred/([0-9]+)/?([0-9]+)?/?$ /star.php?mode=$1&page=$2 last;
rewrite ^/category/([^/]+)/?([0-9]+)?/?([0-9]+)?/?$ /index.php?go=category_$1&mode=$2&page=$3 last;
rewrite ^/archiver/([0-9]+)/([0-9]+)/?([0-9]+)?/?([0-9]+)?/?$ /index.php?go=archive&cm=$1&cy=$2&mode=$3&page=$4 last;
rewrite ^/date/([0-9]+)/([0-9]+)/([0-9]+)/?([0-9]+)?/?([0-9]+)?/?$ /index.php?go=showday_$1-$2-$3&mode=$4&page=$5 last;
rewrite ^/user/([0-9]+)/?$ /view.php?go=user_$1 last;
rewrite ^/tags/([^/]+)/?([0-9]+)?/?([0-9]+)?/?$ /tag.php?tag=$1&mode=$2&page=$3 last;
rewrite ^/component/id/([0-9]+)/?$ /page.php?pageid=$1 last;
rewrite ^/component/([^/]+)/?$ /page.php?pagealias=$1 last;
#Force redirection for old rules
rewrite ^/read\.php/([0-9]+)\.htm$ http://$host/post/$1/ permanent;
rewrite ^/post/([0-9]+)\.htm$ http://$host/post/$1/ permanent;
rewrite ^/post/([0-9]+)\_([0-9]+)\.htm$ http://$host/post/$1/$2/ permanent;
rewrite ^/post/([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ http://$host/post/$1/$2/$3/ permanent;
rewrite ^/index\_([0-9]+)\_([0-9]+)\.htm$ http://$host/page/$1/$2/ permanent;
rewrite ^/star\_([0-9]+)\_([0-9]+)\.htm$ http://$host/starred/$1/$2/ permanent;
rewrite ^/category\_([0-9]+)\.htm$ http://$host/category/$1/ permanent;
rewrite ^/category\_([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ http://$host/category/$1/$2/$3/ permanent;
rewrite ^/archive\_([0-9]+)\_([0-9]+)\.htm$ http://$host/archiver/$1/$2/ permanent;
rewrite ^/archive\_([0-9]+)\_([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ http://$host/archiver/$1/$2/$3/$4/ permanent;
rewrite ^/showday\_([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ http://$host/date/$1/$2/$3/ permanent;
rewrite ^/showday\_([0-9]+)\_([0-9]+)\_([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ http://$host/date/$1/$2/$3/$4/$5/ permanent;
#Filename alias
rewrite ^/([a-zA-Z0-9_-]+)/?([0-9]+)?/?([0-9]+)?/?$ /read.php?blogalias=$1&page=$2&part=$3 last;
}
7、通过Shell访问新空间地址,将以前旧数据库服务器地址(database.xxxx.org)修改为新的数据库服务器地址;
# find . -type f -name "*" | xargs grep "database.xxxx.org"
或
# grep database.xxxx.org . -rf //查找保存数据库服务器地址的文件
或
# grep database.xxxx.org . -rf //查找保存数据库服务器地址的文件
8、通过URL访问新空间里的帝国备份王,配置mysql数据库的相关参数;
9、点击“恢复数据”,将数据进行恢复;
10、通过URL访问新的空间地址,并进入BoBlog进行缓存的更新即可。
11月29
为有效管理squid代理服务器,为客户端添加了用户认证功能,此功能需要借助httpd的htpasswd功能。
1、编辑squid.conf,添加以下内容:
2、利用htpasswd生成用户名和密码:
3、重启squid服务
客户端再通过squid代理上网的话,就需要进行帐号及密码的认证了。
1、编辑squid.conf,添加以下内容:
auth_param basic program /usr/local/squid/lilbexec/ncsa_auth /etc/squid.pass
acl auth_user proxy_auth REQUIRED
http_access allow auth_user
acl auth_user proxy_auth REQUIRED
http_access allow auth_user
2、利用htpasswd生成用户名和密码:
# htpasswd -c /etc/squid.pass username
输入两次该用户的密码即可,下次再添加其他用户的时候,无需再带-c参数。3、重启squid服务
# service squid restart
客户端再通过squid代理上网的话,就需要进行帐号及密码的认证了。
11月24
1、问题:
2、解决:
查看squid主进程的pid值:
搞定。
# /usr/local/squid/sbin/squid -k /etc/squid.conf
squid: ERROR: No running copy
squid: ERROR: No running copy
2、解决:
查看squid主进程的pid值:
# ps aux | grep squid
nobody 2376 0.0 0.0 4168 572 ? Ss 00:56 0:00 /usr/local/squid/sbin/squid -D -s -f /etc/squid.conf
nobody 2378 0.0 0.4 6296 4232 ? S 00:56 0:00 (squid) -D -s -f /etc/squid.conf
nobody 2496 0.0 0.0 4016 692 pts/0 R+ 00:59 0:00 grep squid
nobody 2376 0.0 0.0 4168 572 ? Ss 00:56 0:00 /usr/local/squid/sbin/squid -D -s -f /etc/squid.conf
nobody 2378 0.0 0.4 6296 4232 ? S 00:56 0:00 (squid) -D -s -f /etc/squid.conf
nobody 2496 0.0 0.0 4016 692 pts/0 R+ 00:59 0:00 grep squid
# echo "2378" > /usr/local/squid/var/logs/squid.pid
搞定。
11月24
#!/bin/bash
# squid This shell script takes care of starting and stopping
# Squid Internet Object Cache
#
# chkconfig: - 90 25
# description: Squid - Internet Object Cache. Internet object caching is \
# a way to store requested Internet objects (i.e., data available \
# via the HTTP, FTP, and gopher protocols) on a system closer to the \
# requesting site than to the source. Web browsers can then use the \
# local Squid cache as a proxy HTTP server, reducing access time as \
# well as bandwidth consumption.
#
#pidfile=/usr/local/squid/var/logs/squid.pid
#config=/etc/squid.conf
PATH=/usr/bin:/sbin:/bin:/usr/sbin
export PATH
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# don't raise an error if the config file is incomplete
# set defaults instead:
SQUID_OPTS=${SQUID_OPTS:-"-D"}
SQUID_PIDFILE_TIMEOUT=${SQUID_PIDFILE_TIMEOUT:-20}
SQUID_SHUTDOWN_TIMEOUT=${SQUID_SHUTDOWN_TIMEOUT:-100}
squid=/usr/local/squid/sbin/squid
squid_config=/etc/squid.conf
squid_pid=/usr/local/squid/var/logs/squid.pid
# determine the name of the squid binary
[ -f $squid ] && prog="squid"
# determine which one is the cache_swap directory
CACHE_SWAP=`sed -e 's/#.*//g' $squid_config | grep cache_dir | awk '{ print $3 }'`
[ -z "$CACHE_SWAP" ] && CACHE_SWAP=/cache
RETVAL=0
start() {
if [ ! -f $squid_config ]; then
echo "Configuration file $squid_config missing" 1>&2
exit 6
fi
if [ -z "$squid" ]; then
echo "Insufficient privilege" 1>&2
exit 4
fi
for adir in $CACHE_SWAP; do
if [ ! -d $adir/00 ]; then
echo -n "init_cache_dir $adir... "
$squid -z -f $squid_config >> /usr/local/squid/var/logs/cache.log
fi
done
echo -n $"Starting $prog: "
$squid $SQUID_OPTS -s -f $squid_config >> /usr/local/squid/var/logs/cache.log 2>&1
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
timeout=0;
while : ; do
[ ! -f $squid_pid ] || break
if [ $timeout -ge $SQUID_PIDFILE_TIMEOUT ]; then
RETVAL=1
break
fi
sleep 1
timeout=$((timeout+1))
done
fi
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
[ $RETVAL -eq 0 ] && echo_success
[ $RETVAL -ne 0 ] && echo_failure
echo
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
$squid -k check -f $squid_config >> /usr/local/squid/var/logs/cache.log 2>&1
RETVAL=$?
if [ $RETVAL -eq 0 ] ; then
$squid -k shutdown -f $squid_config &
rm -f /var/lock/subsys/$prog
timeout=0
while : ; do
[ -f $squid_pid ] || break
if [ $timeout -ge $SQUID_SHUTDOWN_TIMEOUT ]; then
echo
return 1
fi
sleep 2
timeout=$((timeout+2))
done
echo_success
echo
else
echo_failure
if [ ! -e /var/lock/subsys/$prog ]; then
RETVAL=0
fi
echo
fi
return $RETVAL
}
reload() {
$squid -k reconfigure -f $squid_config
echo -n $"reload_config $prog: "
echo_success
echo
}
restart() {
stop
sleep 5
start
}
condrestart() {
[ -e /var/lock/subsys/squid ] && restart || :
}
rhstatus() {
status $squid && $squid -k check -f $squid_config
}
probe() {
return 0
}
case "$1" in
start)
start
;;
stop)
stop
;;
reload)
reload
;;
restart)
restart
;;
condrestart)
condrestart
;;
status)
rhstatus
;;
probe)
exit 0
;;
*)
echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}"
exit 2
esac
exit $?
# squid This shell script takes care of starting and stopping
# Squid Internet Object Cache
#
# chkconfig: - 90 25
# description: Squid - Internet Object Cache. Internet object caching is \
# a way to store requested Internet objects (i.e., data available \
# via the HTTP, FTP, and gopher protocols) on a system closer to the \
# requesting site than to the source. Web browsers can then use the \
# local Squid cache as a proxy HTTP server, reducing access time as \
# well as bandwidth consumption.
#
#pidfile=/usr/local/squid/var/logs/squid.pid
#config=/etc/squid.conf
PATH=/usr/bin:/sbin:/bin:/usr/sbin
export PATH
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# don't raise an error if the config file is incomplete
# set defaults instead:
SQUID_OPTS=${SQUID_OPTS:-"-D"}
SQUID_PIDFILE_TIMEOUT=${SQUID_PIDFILE_TIMEOUT:-20}
SQUID_SHUTDOWN_TIMEOUT=${SQUID_SHUTDOWN_TIMEOUT:-100}
squid=/usr/local/squid/sbin/squid
squid_config=/etc/squid.conf
squid_pid=/usr/local/squid/var/logs/squid.pid
# determine the name of the squid binary
[ -f $squid ] && prog="squid"
# determine which one is the cache_swap directory
CACHE_SWAP=`sed -e 's/#.*//g' $squid_config | grep cache_dir | awk '{ print $3 }'`
[ -z "$CACHE_SWAP" ] && CACHE_SWAP=/cache
RETVAL=0
start() {
if [ ! -f $squid_config ]; then
echo "Configuration file $squid_config missing" 1>&2
exit 6
fi
if [ -z "$squid" ]; then
echo "Insufficient privilege" 1>&2
exit 4
fi
for adir in $CACHE_SWAP; do
if [ ! -d $adir/00 ]; then
echo -n "init_cache_dir $adir... "
$squid -z -f $squid_config >> /usr/local/squid/var/logs/cache.log
fi
done
echo -n $"Starting $prog: "
$squid $SQUID_OPTS -s -f $squid_config >> /usr/local/squid/var/logs/cache.log 2>&1
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
timeout=0;
while : ; do
[ ! -f $squid_pid ] || break
if [ $timeout -ge $SQUID_PIDFILE_TIMEOUT ]; then
RETVAL=1
break
fi
sleep 1
timeout=$((timeout+1))
done
fi
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
[ $RETVAL -eq 0 ] && echo_success
[ $RETVAL -ne 0 ] && echo_failure
echo
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
$squid -k check -f $squid_config >> /usr/local/squid/var/logs/cache.log 2>&1
RETVAL=$?
if [ $RETVAL -eq 0 ] ; then
$squid -k shutdown -f $squid_config &
rm -f /var/lock/subsys/$prog
timeout=0
while : ; do
[ -f $squid_pid ] || break
if [ $timeout -ge $SQUID_SHUTDOWN_TIMEOUT ]; then
echo
return 1
fi
sleep 2
timeout=$((timeout+2))
done
echo_success
echo
else
echo_failure
if [ ! -e /var/lock/subsys/$prog ]; then
RETVAL=0
fi
echo
fi
return $RETVAL
}
reload() {
$squid -k reconfigure -f $squid_config
echo -n $"reload_config $prog: "
echo_success
echo
}
restart() {
stop
sleep 5
start
}
condrestart() {
[ -e /var/lock/subsys/squid ] && restart || :
}
rhstatus() {
status $squid && $squid -k check -f $squid_config
}
probe() {
return 0
}
case "$1" in
start)
start
;;
stop)
stop
;;
reload)
reload
;;
restart)
restart
;;
condrestart)
condrestart
;;
status)
rhstatus
;;
probe)
exit 0
;;
*)
echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}"
exit 2
esac
exit $?
注意squid相关文件的实际路径,不要原本照搬!





