CentOS下Tomcat7+Solr3的安装配置

Standard

下载

wget http://mirror.bjtu.edu.cn/apache/lucene/solr/3.1.0/apache-solr-3.1.0.tgz
wget http://labs.renren.com/apache-mirror/tomcat/tomcat-7/v7.0.12/bin/apache-tomcat-7.0.12.tar.gz
tar zxvf apache-solr-3.1.0.tgz
tar zxvf apache-tomcat-7.0.12.tar.gz
mv apache-solr-3.1.0 /usr/local/solr
mv apache-tomcat-7.0.12 /usr/local/tomcat

配置

vi /etc/profile
#加在最底下
export JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk
export CLASSPATH=.:$JAVA_HOME/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
export TOMCAT_HOME=/usr/local/tomcat
export JAVA_OPT="$JAVA_OPTS -Dsolr.solr.home=/usr/local/solr/example/solr"
cp /usr/local/solr/dist/apache-solr-3.1.0.war /usr/local/tomcat/webapps/solr.war
 
vi /usr/local/tomcat/conf/Catalina/localhost/solr.xml
<Context docBase="/usr/local/tomcat/webapps/solr.war" debug="0" crossContext="true">
    <Environment name="solr/home" type="java.lang.String" value="/usr/local/solr/example/solr" override="true" />
</Context>
vi /usr/local/solr/example/solr/conf/solrconfig.xml
#初始
<dataDir>${solr.data.dir:}</dataDir>
#修改为
<dataDir>${solr.data.dir:/usr/local/solr/example/solr/data}</dataDir>
vi /usr/local/tomcat/conf/tomcat-users.xml
#去掉注释块,加入以下内容
  <role rolename="admin-gui"/>
  <role rolename="admin-script"/>
  <role rolename="manager-gui"/>
  <role rolename="manager-script"/>
  <role rolename="manager-jmx"/>
  <role rolename="manager-status"/>
  <user username="tomcat" password="s3cret" roles="manager-gui,manager-script,manager-jmx,manager-status,admin-script,admin-gui"/>

启动
/usr/local/tomcat/bin/startup.sh

浏览
http://localhost:8080/manager/status

http://localhost:8080/solr/

转载请注明出处:http://yemaosheng.com

Confessions of your worst WTF moment 摘录

Standard

原贴链接: http://stackoverflow.com/questions/63668/confessions-of-your-worst-wtf-moment

No.1
Our product was used by police forces to input data about people that are arrested and what they are charged with. It would also store digital mugshots and fingerprints, and electronically submit the fingerprints to the FBI. While testing, we would routinely use our own fingerprints for fake bookings that got inserted into the test database. Except for the time that I “temporarily” switched the test machines over to the production database and forgot to switch them back…

Cleaning up our production database was easy, but it took a court order signed by the superintendent of the Boston Police Department to remove my colleague’s fingerprints from the FBI database — she had booked herself under the name “Elroy Jetson”.

No.2
I was given a GPS system that was used on ships and given the task of getting a program to interface with it and collect co-ordinates. We didn’t have a manual for the device, but once I got it powered on, I found a big help button. I thought that might at least get us started with how to use it.
After pressing the button, it beeped a couple of times, and then the screen started flashing: Sending S.O.S. signal
Gosh damn – I unplugged the power cable, hoping the thing would turn off, but it must have had an emergency battery inside, because it carried on going, and there was no stopping it.
I waited, very anxiously, expecting a Sea King helicopter to appear outside the office at any moment, wondering how I was going to explain what had happened.
Fortunately – either because I was indoors and the signal didn’t get through or because the receiver of the signal realized an S.O.S. originating 100 miles inland probably wasn’t a real shipping incident – no sea king turned up. Phew.

No.3
I had just imported a bunch of old data into a new system, had taken about 5 hours and was due to go live two hours later, this was around 4 in the morning.
For some reason I tried to delete something:
DELETE from important_table; where id=4
Yeah, I didn’t notice the semicolon either. And no, there was no safety net.

No.4
I shipped my administrator password for an FTP site inside an open source project I was working on.

No.5
I worked for a large bank and added an error message to a piece of code that the application should never have been able to reach (theoretically)…
One Monday morning the unthinkable happened. The error message was proudly displayed on over 10,000 monitors across 1800 branches, and would return when you dismiss the message.
The message read: “If you can see this message the system is all F**KED UP and we might as well go home. Have a nice day.”
Thank goodness this happened before source control systems were implemented at the bank.

No.6
I was logged into my new dedicated server box and configuring some firewall rules over ssh. The first thing I did was set it to not accept any connections from anyone. Then I saved it to test that before going through and adding the various ports I wanted to allow.
Needless to say, the first rule worked…

No.7
When I set up a new VMware instance at the evening and went home keeping it running. What I didn’t noticed was that I used the IP of the Nameserver as IP of the VMware instance. Suddenly all hosts in our building tried to connect to the VMware for DNS lookups.
Our whole network was practically down.
Since this was a VMware our Admins were not able to track down the MAC address. So they had to plug off every single computer in our office (~500) until the problem was gone.
At the next day I found a letter on my desk: “Who dares to switch this computer on will die”.

No.8
Near the end of the dot com bubble, my company was doing research on a sector of the market. We had been given a database with company names in that sector, and we weren’t sure if many of them were still viable companies. I wrote a quick and dirty app which looped through the database and tried the URLs to see if it got a valid response… the assumption being that a 404 would be a failed company. The app used the IE browser COM component and actually displayed the pages while it processed. I split the database into three sections and set it to run on three machines beginning at the close of business and running overnight. My cube was extremely proximate to the CEO and CFO.
Upon arrival the next day, I discovered that the database was not at all accurate. Apparently it was open to the public for update, and numerous spammers and porn companies had inserted records and URLs of their own. This, in itself, was not terrible. What was terrible is that many of the pages when loaded, spawned pop-up windows of extremely explicit details and while the program moved on to the next page, the pop-up windows were orphaned and visible for all to see.
I had some ‘splaining to do.

No.9
I rewrote a whole module that was working perfectly but that looked “messy” to me. I had managed to convince my boss that it was the Right Thing To Do, and the rewrite took me 3 weeks.
I still remember the pearls of sweat running from my armpits as my boss, looking over my shoulder, was commenting on bug after bug in my new shiny super-clean module…
I’m no longer “rewriting from scratch” without a really good reason.

No.10
Ooh! Embarrassing confessional time. The first one that comes to mind was shortly after I switched to OS X from years on Windows and had basically forgotten anything I knew about unix.
I was working on a personal project and decided I was at a point where I should backup my stuff. So I opened up the command line:
gzip *.py
Oh man! It zipped every file individually! Right, I have to tar them first. Okay
rm *.gz
Wait! Why is my directory empty?! Oh no….
Yeah, I also forgot that gz doesn’t copy and zip, it zips in-place.
I got lucky, though, and still had most of the files open in my editor.
This was what convinced me to finally install a version control system on my home machine and use it for my own stuff.

No.x…

Gtk+ HTML backend update

Standard

转贴,原文链接:http://blogs.gnome.org/alexl/2011/03/15/gtk-html-backend-update/

The last few days I spent fixing up some more details in the new HTML5 gdk backend. Not everything is supported yet (keyboard input in particular is very weak), but much more things work now. Even thought the backend is not of production quality it is now good enough that I think its interesting for a larger audience to play around with. So, today I merged the branch into the Gtk+ master branch (i.e. what will be Gtk+ 3.2).

The new multi-backends setup in Gtk+ 3.0 makes this much easier to test. All you have to do is build Gtk+ with –enable-x11-backend –enable-broadway-backend.This will give you a normal X11-based Gtk+ where you can enable the broadway backend at runtime by setting the GDK_BACKEND enviroment variable.

The backend only supports firefox 4 atm, and Mozilla disabled websockets by default, so you have to enable enable websockets for any input to work. However when this is done you can test any app by running:

GDK_BACKEND=broadway your-application&
firefox http://127.0.0.1:8080/
I recorded a small screencast to show this stuff:

Note that the recording is using a local connection, it will be slower over the network depending on the network bandwidth.

warning: Can’t open file ‘/root/.subversion/servers’ …

Standard

我们用PHP写了个Release界面用来做svn up及rsync操作,之前运行正常,今早发现报错如下:
warning: Can’t open file ‘/root/.subversion/servers’: Permission denied

解决方法:
因为php以apache用户运行,所以最简单的办法就是直接把config-dir放到apache目录下
svn status –config-dir /etc/apache/.subversion;
svn info –config-dir /etc/apache/.subversion;

乐风AT的经验贴

Standard

下面这贴子写得不错,很详细。
不知这贴何时会删或沉,请容许我稍微整理转载于此方便查找。
此外,还加了些别处搜到内容。
原贴链接 http://bbs.auto.sina.com.cn/329/216/thread-2013338-1-1.html

选车原则

1、日X车不考虑,韩X车更不考虑。
2、油耗不考虑,因为用的少,一年省不了几个钱。就算100KM省2升,一年也就省1000元。
很多打着省油号子的车,车价贵1-2万元,用10年车都省不回来。
还有些靠减轻重量来省油的车就更不值得了,安全要紧。
3、外观要好看,虽然很多两厢车很好看,本人偏爱三厢车。
因为要用5年以上,外观要耐看,毕竟不是随便就换的衣服。
有些车新的时候好看,过了几年,觉得很难看。
4、性能安全,质量可靠,操控性好。
5、经过市场考验的,销量好的。
6、不要太贵。车是自己用的,够用就行。
在发达国家,几个月的工资能买一辆不错的新车,我们要几年的工资,很冤。
越贵的、功能越多的车(特别是那些附加的机械和电子功能),维护费用也越高。
7、不要天窗,一年用不了几回。
8、要AT自动车。LP不会开MT手动车,连AMT也开不好。
因为AMT的车要加油才走,慢速不好控制,右脚要在油门和刹车间变换。
虽然新赛欧的EMT自动车在AMT上加了专利的爬行功能,但上市不久,未经考验。

选定乐风2010款1.4AT

乐风外观不错,前脸完全是雪佛兰的风格。
乐风1.4发动机的功率和扭矩与1.6的捷达差不多,选择1.4就够了。
两者都是低速高扭矩特性,1.6的捷达满载时,上山很轻松,适合城市路况。
两者大小及空间也差不多。
乐风比捷达:短7厘米,高9厘米,宽1.6厘米,轴距长1厘米,空间要大些。

试驾后,感觉不错,操控性好,油门、方向很轻,刹车很好。
网上看到有人说刹车软,应该是不熟悉ABS刹车的原因。
为了防止车轮抱死,与没有ABS时的点刹不同,ABS只要一直踩住刹车,效果会很好。
乐风的车身调校的有些偏硬,底盘较高,适合各种路况,通过性好。
隔音不错,发动机盖和尾箱盖都有隔音层。
A柱有点宽,习惯后就好了。
4喇叭音响也不错。
其他:
4个电动车窗,2个电动后视镜,方向盘可调,遥控防盗门锁,中控锁,驾驶座椅高低可调,后排座椅可向前放倒使尾箱空间扩大,遥控油箱门开锁,遥控尾箱开锁,
关门提醒,未拔钥匙提醒,后窗隐形天线。

总结

1、乐风安全性高,车身稳固。
车重1145公斤(比捷达重54公斤),沉稳,没有飘的感觉。
车头和车尾都有保险杠和吸能装置,做到对乘员和行人的保护。
侧面防撞杆,整体式车门,后排椅背中镶嵌钢板,安全第一。
门重,把手宽大,关门声厚实。耗油多点也值了。
前排前面和侧面4个安全气囊。
安全带提醒。驾驶座及副驾驶座坐人后,时速20KM发出提醒。
曾经想买两个安全带扣插上去做装饰,后来决定不买,再麻烦也要系上安全带。
后视镜够大。
灯光不错。
前雾灯,在雾天时,可以看清车头左右。
后雾灯、高位刹车灯、两个倒车灯,让后车看清你,安全。
2、动力足够,满载5个人,开冷气,开起来很轻松。
3、仪表盘上没有操纵杆位置显示,有点遗憾。不过习惯后,也不需要看仪表盘。实际上很多的车型是没有显示的。
操纵杆曲线设计,从N到R要按下操纵杆,防止误碰误操作,保护人员及车辆。
操纵杆设计合理,前行时,操纵杆向后拉到不动,就是D4,不需要看仪表盘。
取消了操纵杆头上的从P移出的释放按钮,点火后,踩住刹车才能移出。
在不驻车的情况下要把操纵杆从P移出,必须撬开操纵杆解锁开关的小盖板,插进车钥匙释放,防止误操作。
起步:
钥匙插进后,在ON位置停留几秒钟,让电脑及其他电气设备通电,等提示音停止后:
点火、预热30秒、踩脚刹、操纵杆从P一直拉到D4、松手刹、松脚刹。
停车:
踩脚刹停车、操纵杆按下一直推到P、拉手刹、松脚刹、熄火。
4、HOLD保持功能,满足手动换挡需求。
按一下HOLD键,灯亮,此时操纵杆在:
D4 位置时,车一直在3挡运行,不会在1或2挡,
2 位置时,车一直在2挡运行,不会在1挡,
1 位置时,车一直在1挡运行,
这样可以手动在1、2、3挡间变换。
自动时,操纵杆在D4位置,速度较快要超车时,按一下HOLD键,就会切到3挡运行,此时转速加快,扭力加大,轻松超车。
5、开惯后,感觉乐风的刹车很好用。
起步刚松刹车时以及踩刹车后车要停止时,刹车会有响声,很多人以为有问题,其实这很正常,是ABS工作引起的,让人踏实。
ABS防抱死功能在速度快时很有用,有效防止因抱死而发生的甩尾、侧翻和打跟斗的事故。有ABS时,踩死刹车后,刹车距离可能比没有ABS还要短,而且方向盘可控;没有ABS时,踩死刹车后方向盘会失控。
6、座椅较高,坐着舒服。不像有些车好像坐在地板上。
后排座椅加高了,所谓的剧院式设计,使后座更舒服,视野与前排一样。
7、等红灯时,一分钟以内,踩住刹车;一分钟以上,推入P,拉手刹,不用N。
听设计工程师的话,N仅用于需要拖车时或行车中突然熄火后紧急点火。
有关油耗、磨损、发热等问题不用考虑,车子的设计师已经考虑完了。
另外,P位置时:输出轴被锁住,传动轴无法转动,此时不能拖动车辆,否则会造
成自动变速箱损坏。因此,在P位置被追尾时,后果比较严重,所以最好拉起手刹,
手刹的作用是锁住后轮,脚刹是锁住前后轮,万一被追尾时保护变速箱。
8、乐风隔音不错,风噪不是很大。空间安静,冷气舒适,音乐愉快,消除疲劳。
9、如果用钥匙发射器开门解除防盗系统后 30秒未打开车门或未启动发动机,所有车门重新上锁激活防盗系统。
备用钥匙上没有发射器,用钥匙开门后,自动解除防盗系统。
10、这车没有踩刹车落门锁或时速20KM落门锁功能,由驾驶座控制门锁来实现中控
锁功能。建议养成锁门的习惯。因为看过一个视频,一台车被后面的车追尾,
结果门被撞开,驾驶员被甩出车外,估计是没关门锁也没系安全带。
乐风的各个门锁可以手动开关,这个很重要。
当门锁锁了以后,如果不能通过手动拔出门锁开关,万一被困,可能开不了门。
曾经有人被忘记在一辆中级车后排睡觉,这辆车的门锁锁了后开关缩进里面,
手拔不到开关,无法开门。电控的设备,一旦有故障是个麻烦的事。
11、在窗台上发现有透气孔通向尾箱,应该是为安全考虑的,可惜,尾箱逃生拉环没装。万一被困尾箱里,无法逃出。
另外,万一车窗和车门因为某些原因打不开,可以放倒后排椅背,按动驾驶座门侧的遥控尾箱开锁按钮,打开尾箱,通过尾箱逃出。
乐风的尾箱盖要用手拍下才会关闭。不像很多种车的尾箱盖轻轻拉到位置后是会自己关闭的,不需要用手拍。乐风没有这个功能,可能是省掉了助力弹簧的结果。
12、开冷气后,停车前,最好关掉冷气,吹风2分钟,把冷凝器的水吹干,防止异味。
13、新车气味不是特别大,经常开门通风,十几天后就没啥味了,用材还是蛮环保的。
原配的绒布座椅没有异味和异响,不像有些真皮座椅有味和摩擦时有声响。
14、CD机不能播放MP3格式的光盘。
15、油耗:这台乐风新车刚走了400KM,城市路况,平均时速20-30KM,磨合期,一半路程开冷气,平均两个人,用油50升,约12.5升/100KM。
如果按网友的综合油耗,磨合期后10升/100KM,就能接受了。

2011-4-23 注:
提车两个月了,我驾照还没考好,先让我父亲先开着转转。目前共走了一千公里,其中七百公里是高速路。平均百公里油耗8升,没之前一些网站上说得这么高。

乐风油表刻度具体数值图

————————————-

车距判断图文参考

判断轿车前端与人的距离:
以轿车为例,假设前方有一个身高1.7至1.8米左右的人,脚面高在10厘米左右,膝盖高在45厘米左右,臀部在70厘米左右。
1、当你看到车前端由地面向人体脚面或脚跟上移并停留此处时,车前端与人体之间的距离为3米。
2、当你看到车前端升高到人体膝盖高度处时,车前端与人体距离为1米。
3、当你看到车前端升高到人体臀部下端时,车前端与人体之间的距离为0.3米。

判断前车距离:
1、从挡风玻璃下沿看到前车保险杠上沿时约一米

2、从挡风玻璃下沿看到前车保险杠下沿(人的脚膝盖)时约两米;

3、从挡风玻璃下沿看到前车后轮胎下沿(或看到地面)时约三米;

4、从车内通过车窗看到停止线与前门角五厘米处,则车子与路口的停车线对齐

右后视镜判断后车距离:
1、后车影占后视镜全部时,车距约3米;

2、后车影占后视镜三分之二时,车距约5米;

3、后车影占后视镜二分之一时,车距约9米;

4、后车影占后视镜三分之一时,车距约12米;

5、左后视镜看到后轮盖罩中间(后门手握柄、车身横线或后视镜底线反射)相对地面就是车尾位置。
6、通过车内后视镜透视过后窗挡风玻璃下沿判断后车距离:若看到后车大灯上缘,则后尾箱距后车为三米半左右;若看到后车机仓盖与前挡玻璃交界处,则后尾箱距后车为一米;若看到后车前挡玻璃的水平三分之一,则基本靠上了。

判断车辆位置(车轮位置、前后位置):
1、判断路边在挡风玻璃中的位置(左轮在挡风玻璃左柱往右10-15cm位置;右轮在挡风玻璃中心线往左5-10cm位置);离路边距离可以从后视镜看到。


2、判断右轮位置(车头中部或右雨刮器):在车头盖板右边三分一处的相对地面


CCNA实验-OSPF

Standard

部门里要走专线去美国,当然这一切基本都由总公司的网管部门搞定.
听那边说路由协议用的是OSPF.
实际上在思科硬件这一块没怎么使用,一直想跟着管IDC机房的同学打打下手从头布一次,但也没这机会.
虽然之前也学过,但也多半是在模拟器里练习,隔一段时间就会忘.
这不,现在再把OSPF模拟一遍加深记忆.
没办法,这就和背英文单词一样,只有翻翻复复的一遍又一遍的来.

ps:
刚从驾校回了.快过年了人就少,哪都比较空,马陆的驾校练习场也清静了.今天练了足足一个上午,比较累了,就先做遍模拟练习贴上来,回头再整理下格式做些备注什么的.

RTA>en
RTA#conf t
RTA(config)#route ospf 1
RTA(config-router)#network 10.1.0.1 0.0.0.0 area 0
RTA(config-router)#network 172.16.2.1 0.0.0.0 area 0
RTA(config-router)#network 172.16.7.1 0.0.0.0 area 0
 
RTA(config-router)#exit
RTA(config)#exit
00:54:37: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.1 on Serial0/0/0 from LOADING to FULL, Loading Done
01:19:23: %OSPF-5-ADJCHG: Process 1, Nbr 172.16.3.1 on Serial0/0/1 from LOADING to FULL, Loading Done
02:05:58: %OSPF-5-ADJCHG: Process 1, Nbr 172.16.7.2 on Serial0/1/0 from LOADING to FULL, Loading Done
RTA#sh ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
172.16.3.1        1   FULL/-          00:00:32    172.16.2.2      Serial0/0/1
192.168.1.1       1   FULL/-          00:00:30    10.1.0.2        Serial0/0/0
172.16.7.2        1   FULL/-          00:00:31    172.16.7.2      Serial0/1/0
 
RTB>en
RTB#conf t
RTB(config)#route ospf 1
RTB(config-router)#network 10.1.0.2 0.0.0.0 area 0
00:54:37: %OSPF-5-ADJCHG: Process 1, Nbr 172.16.7.1 on Serial0/0 from LOADING to FULL, Load
RTB(config-router)#network 10.2.0.1 0.0.0.0 area 0
RTB(config-router)#exit
RTB(config)#exit
RTB#sh ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
172.16.7.1        1   FULL/-          00:00:31    10.1.0.1        Serial0/0
RTB#
01:15:26: %OSPF-5-ADJCHG: Process 1, Nbr 172.16.4.1 on Serial0/1 from LOADING to FULL, Loading Done
 
RTC>en
RTC#conf t
RTC(config)#route ospf 1
RTC(config-router)#network 172.16.3.2 0.0.0.0 area 0
RTC(config-router)#network 10.2.0.2 0.0.0.0 area 0
01:15:26: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.1 on Serial0/1 from LOADING to FULL, Loading Done
RTC(config-router)#exit
RTC(config)#exit
RTC#show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.1.1       1   FULL/-          00:00:38    10.2.0.1        Serial0/1
RTC#
01:19:45: %OSPF-5-ADJCHG: Process 1, Nbr 172.16.3.1 on Serial0/0 from EXCHANGE to FULL, Exchange Done
 
RTD>en
RTD#conf t
RTD(config)#route ospf 1
RTD(config-router)#network 172.16.2.2 0.0.0.0 area 0
RTD(config-router)#network 172.16.3.1 0.0.0.0 area 0
RTD(config-router)#exit
RTD(config)#exit
01:19:45: %OSPF-5-ADJCHG: Process 1, Nbr 172.16.4.1 on Serial0/1 from EXCHANGE to FULL, Exchange Done
RTD#show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
172.16.7.1        1   FULL/-          00:00:39    172.16.2.1      Serial0/0
172.16.4.1        1   FULL/-          00:00:32    172.16.3.2      Serial0/1
RTD#
 
RTE>en
RTE#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        172.16.6.1      YES manual up                    up
FastEthernet0/1        unassigned      YES manual administratively down down
Serial0/0              172.6.7.2       YES manual up                    up
Serial0/1              unassigned      YES manual administratively down down
Serial0/2              unassigned      YES manual administratively down down
Serial0/3              unassigned      YES manual administratively down down
FastEthernet1/0        unassigned      YES manual administratively down down
FastEthernet1/1        unassigned      YES manual administratively down down
RTE#conf t
RTE(config)#interface Serial 0/0
RTE(config-if)#ip address 172.16.7.2 255.255.255.0
RTE(config-if)#exit
RTE(config)#exit
RTE#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        172.16.6.1      YES manual up                    up
FastEthernet0/1        unassigned      YES manual administratively down down
Serial0/0              172.16.7.2      YES manual up                    up
Serial0/1              unassigned      YES manual administratively down down
Serial0/2              unassigned      YES manual administratively down down
Serial0/3              unassigned      YES manual administratively down down
FastEthernet1/0        unassigned      YES manual administratively down down
FastEthernet1/1        unassigned      YES manual administratively down down
RTE#conf t
RTE(config)#route ospf 1
RTE(config-router)#network 172.16.7.2 0.0.0.0 area 0
RTE(config-router)#
02:05:58: %OSPF-5-ADJCHG: Process 1, Nbr 172.16.7.1 on Serial0/0 from LOADING to FULL, Loading Done
RTE#show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
172.16.7.1        1   FULL/-          00:00:32    172.16.7.1      Serial0/0
RTE#

使用Google Storage自动备份

Standard

如果你的机器是放在国外,或是暂时不为被墙所担心,那使用Google Storage备份数据非常好。
优势很明显,存储空间大,速度快,还有最重要的稳定。
经常手动备份很麻烦,如果你的网站是运行在Linux系统上,又已有Google Storage for Developers的邀请,那么就可以写些crontab脚本来定时自动备份你要的数据。

下载并安装gsutil工具

root@ansonye:~# wget http://commondatastorage.googleapis.com/pub/gsutil.tar.gz
root@ansonye:~# tar zxvf gsutil.tar.gz
root@ansonye:~# mv gsutil /usr/local/
root@ansonye:~# vim ~/.bashrc
export PATH=${PATH}:/usr/local/gsutil
export PYTHONPATH=${PYTHONPATH}:/usr/local/gsutil
 
root@ansonye:~# source ./.bashrc 
 
#会提标输入access key和secret key
root@ansonye:~# gsutil ls  #按提示操作

编写定时备份脚本

#注:gs://anson中的anson为我所新建"Bucket",结构如后图所示.
root@ansonye:~# vi /etc/cron.weekly/backup
#!/bin/sh
mysqldump -u root -pXXXXXX --default-character-set=utf8 -B yemaosheng | sed 's/AUTO_INCREMENT=[0-9]*\b//' > /tmp/yemaosheng.sql
tar zcfP /tmp/yemaosheng_mysql_$(date +%y%m%d).tar.gz /tmp/yemaosheng.sql
rm /tmp/yemaosheng.sql
gsutil cp /tmp/yemaosheng_mysql_$(date +%y%m%d).tar.gz gs://anson/backup_yemaosheng/yemaosheng_mysql_$(date +%y%m%d).tar.gz
rm /tmp/yemaosheng_mysql_$(date +%y%m%d).tar.gz
 
tar zcfP /tmp/yemaosheng_site_$(date +%y%m%d).tar.gz /var/www/yemaosheng/
gsutil cp /tmp/yemaosheng_site_$(date +%y%m%d).tar.gz gs://anson/backup_yemaosheng/yemaosheng_site_$(date +%y%m%d).tar.gz
rm /tmp/yemaosheng_site_$(date +%y%m%d).tar.gz
 
root@ansonye:~# chmod +x /etc/cron.weekly/backup

Google Storage 管理界面


外企常用句型100句

Standard

1. I am writing to confirm /enquire/inform you…
我写信时要确认/询问/通知你…
2. I am writing to follow up on our earlier decision on the marketing
campaign in Q2.
我写信来追踪我们之前对于第二季度营销活动的决定。
3. With reference to our telephone conversation today…
关于我们今天在电话中的谈话。
4. In my previous e-mail on October 5…
先前在10月5日所写的信…
5. As I mentioned earlier about…
如我先前所提及关于…
6. as indicated in my previous e-mail…
如我在先前的信中所提出…
7. As we discussed on the phone…
如我们上次在电话中的讨论…
8. from our decision at the previous meeting…
如我们在上次会议中的决定…
9. as you requested/per your requirement…
按照你的要求…
10.In reply to your e-mail dated April 1,we decided…
回答你在4月1日写的信,我们决定…
11.This is in response to your e-mail today.
这是针对你今天早上来信的回复。
12. As mentioned before, we deem this product has strong unique
selling points in china.
如先前所述,我们认为这个产品在中国有强有力且独一无二的销售点。
13. As a follow-up to our phone conversation yesterday, I wanted to
get back to you about the pending issues of our agreement.
追踪我们昨天在电话中所谈,我想答复你我们合约的一些待解决的议题。
14. I received your voice message regarding the subject. I’m
wondering if you can elaborate i.e. provide more details.
我收到你关于这个主题的留言。我想你是否可以再详尽说明,也就是再提供多一点细节。
15. Please be advised/informed that…
请被告知…
16. Please note that…
请注意…
17. We would like to inform you that…
我们想要通知你…
18. I am convinced that…
我确信…
19. We agree with you on…
我们同意你在…
20. With effect from 4 Oct., 2008…
从2008年10月4日开始生效…
21. We will have a meeting scheduled as noted below…
我们将举行一个会议,时间表如下。
22. Be assured that individual statistics are not disclosed and this
is for internal use only.
请确保个人信息不会外泄且只供内部使用。
23. I am delighted to tell you that…
我很高兴地告诉你…
24. We are pleased to learn that…
我们很高兴得知…
25. We wish to notify you that…
我们希望通知你…
26. Congratulation on your…
恭喜您关于…
27. I am fine with the proposal.
我对这份提桉没意见。
28.I am pleased to inform you that you have been accepted to join the
workshop scheduled for 22-24 Nov,2008.
我很高兴地告诉你,你已经被同意参加2008年11月22-24日的研讨会。
29. We are sorry to inform you that…
我们很抱歉地通知你…
30. I’m afraid I have some bad news.
我恐怕要带来一些坏消息。
31. There are a number of issues with our new system.
我们的新系统有些问题。
32. Due to circumstances beyond our control…
由于情况超出我们所能控制…
33. I don’t feel too optimistic about…
我觉得不太乐观关于…
34. It would be difficult for us to accept…
我们很难接受…
35. Unfortunately I have to say that, since receiving your enquiries
on the subject, our view has not changed.
很不幸地,我必须这么说,自从收到你关于这个主题的询问,我们的看法都没有改变。
36. We would be grateful if you could…
我们会很感激如果你可以…
37. I could appreciate it if you could…
我会很感激如果你可以…
38. Would you please send us…?
可否请你寄给我们…?
39. We need your help.
我们需要你的帮助。
40. We seek your assistance to cascade/reply this message to your
staff.
我们请求你的帮助,将此信息传达给你们的员工。
41. We look forward to your clarification.
我们期待你的澄清。
42.Your prompt attention to this matter will be
appreciated.
您能立即注意此事,我们将非常感激。
43. I would really appreciate meeting up if you can spare the time.
Please let me know what suits you best.
如果您能抽出时间,我希望能与你见面,请让我知道您最适合的时间。
44. Please give us your preliminary thoughts about
this.请让我知道你对于这件事情初步的想法。
45. Would you please reply to this e-mail if you plan to attend?
请您回信如果您计划参加?
46. Please advise if you agree with this approach.
请告知是否你同意这个方法。
47. Could you please let me know the status of this project?
请让我知道这个计划的进度?
48. If possible, I hope to receive a copy of your proposal when it is
finished.
如果可能,当你完成提桉,我希望能收到一份复本。
49. I would appreciate it very much if you would send me your reply by next Monday.
如果能在下周一前收到您的答复,我将非常感激。
50. Hope this is OK with you. If not, let me know by e-mail ASAP.
希望您对此没有问题,如果不行,请利用电子邮件尽快让我知道。
51. Could you please send me your replies to the above questions by the end of June?
请您在6月份前答复我上述问题好吗?
52. May I have your reply by April 1, if possible?
如果可能,我可否在4月1日前收到您的答复?
53. If you wish, we would be happy to…
如果你希望,我们很乐意…
54. Please let me know if there’s anything I can do to help.
请让我知道任何我可以帮得上忙的地方。
55. If there’s anything else I can do for you on/regarding this matter, please feel free to contact me at any time.
对于这件事,如果还有任何我能帮得上忙的地方,请不要客气,随时与我联络。
56. If you want additional recommendations on this, please let us know and we can try to see if this is possible.
如果关于此事你需要额外的建议,请让我们知道,我们会尝试看看是否可能。
57. I’m just writing to remind you of…
我只是写信来提醒您…
58. May we remind you that…?
我们想要提醒您…
59. I am enclosing…
我附上…
60. Please find enclosed…
请查阅附件…
61. Attached hereto …
附件是关于…
62. Attached please find the most up-to-date information on/regarding/concerning…
附上关于某某的最新资料…
63. Attached please find the draft product plan for your review and comment.
附上产品计划书的草稿,请审查及评价。
64. If you have any further questions, please feel free to contact me.
如果你有任何问题,请不要客气与我联络。
65. I hope my clarification has been helpful.
希望我的说明是有帮助的。
66. Please feel free to call me at any time, I will continually provide full support.
67. Please let me know if this is suitable.
请让我知道这是否恰当。
68. Looking forward to seeing you soon.
期待很快能见到你。
69. We look forward to hearing from you soon.
我们期待很快能得到您的回复。
70. Hope this is clear and we are happy to discuss this further if necessary.
希望上述说明很清楚,如有必要,我们很乐意再进一步讨论。
71. I look forward to receiving your reply soon.
我期待很快能收到你的回复。
72. Looking forward to receiving your comments in due course.
期待在预期的时间收到你的反馈。
73. I’ll keep you posted.
我会与你保持联络。
74. Please keep me informed on the matter.
请随时让我知道这件事的发展。
75. For any comments/suggestions, please contact Nadia at 2552-7482.
任何评价或建议,请打电话2552-7482联络Nadia。
76. I would like to apologize for…
我想就…道歉…
77. I apologize for the delay in …
对于…的耽搁,我深感抱歉。
78. We are sorry for any inconvenience caused.
对于产生任何不便,我们感到抱歉。
79. I am sorry for any inconvenience this has caused you.
对于造成你的任何不便,我感到抱歉。
80. I’m sorry about last time.
关于上次的事我很抱歉。
81.We apologize for not replying you earlier.
对于未能早一点回信给你,我们感到抱歉。
82. I’m really sorry about this.
关于这件事,我真的很抱歉。
83. Sorry, I’m late in replying to your e-mail dated Monday, April 1.
抱歉,太迟回您在4月1日(星期一)发给我的邮件。
84. We apologize for the delay and hope that it doesn’t inconvenience you too much.
我们为耽搁道歉,希望不会给您带来太多的不便。
85. Hoping that this will not cause you too much trouble.
希望不会为您带来太多的麻烦。
86. Sorry if my voice message is not clear enough.
如果我的电话留言不够清楚,我深感抱歉.
87. Thank you for your help.
谢谢你的帮助。
88. I appreciate very much that you…
我非常感激你…
89. I truly appreciate it.
我真的很感激。
90. Thank you for your participation.
谢谢你的参加。
91. Thank you so much for inviting me.
非常感谢你要请我。
92. Congratulations to all of you and thanks for your
efforts.
恭喜各位并谢谢各位的努力。
93. Your understanding and cooperation is greatly/highly appreciated.
很感激你的理解及合作。
94. Your prompt response will be most appreciated.
很感激你快速的答复。
95. Once again, thank you all for your commitment and support.
再一次感谢你的承诺及支持。
96. Thanks for your input/clarification/message.
谢谢你的投入/澄清/信息。
97. Any comments will be much appreciated.
对于您的任何建议,我将非常感激。
98. Thank you very much for everything you’ve done for me.
谢谢你为我做的一切。
99. I would appreciate your kindest understanding with/regarding this matter.
我很感激你对这件事情的理解。
100. Please convey my thanks to all the staff involved, they certainly did an excellent job.
请表达我的谢意给那些有关的同仁,他们真的干得很好。

转载