MySQL主从热备配置(含innodb)

mysql主从热备有2种配置方式,备份某些库或者忽略备份某些库,建议选择后者。
Continue reading ‘MySQL主从热备配置(含innodb)’

蔡东机与埃里克·施密特

前一段时间偶然发现原来的BOSS Jack(蔡东机)与GOOGLE的CEO埃里克·施密特惊人的相似。看看吧。

埃里克·施密特

蔡东机

象不象?

宜锐科技的爱搜书走投有路?

刚刚从其他人那里了解到成都阅通的垂直搜索电子书网站ISOSHU已经几乎没有几个人了。从辉煌到落寞,是战略转移还是走投无路?管理上有问题吗?还是无法控制?都是做互联网的值得去思考的。这样从辉煌到落寞的例子太多了。可能这就是真正的创业。

很多人都无法想像的创业在老板看来就是金钱游戏而已,创造一个规则就是终极目标。就象百度创造的搜索规则,阿里创造的B2B规则,政府创造的潜规则。当然这都是要投入的,最简单的最直接的就是钱。

为什么爱搜书没有成功,当然没有永远的失败,只要不放弃就意为着你还没有失败,或者说没有失败只有放弃。

电子书,为什么就这么生不逢时,不听使唤呢?当然这并不是Amazon的说话,Amazon才没想那么多呢,它在开始阅读的革命,就象Apple创造着新的信息获取方式。爱搜书,你呢?

微软SQL注入测试工具(ASP)

Scrawlr
下载地址: 1 2
这个微软和 HP合作开发的工具,会在网站中爬行,对所有网页的查询字符串进行分析并发现其中的 SQL INJECTION 风险。Scrawlr 使用了部分 HP WebInspect  相同的技术,但只检测 SQL INJECTION 风险。Scrawlr 从一个起始 URL 入口,爬遍整个网站,并对站点中所有网页进行分析以找到可能存在的漏洞。

Microsoft Source Code Analyzer for SQL Injection
下载地址:http://www.microsoft.com/downloads/details.aspx?FamilyId=58A7C46E-A599-4FCB-9AB4-A4334146B6BA&displaylang=en
这款被称作 MSCASI 的工具可以检测 ASP 代码并发现其中的 SQL INJECTION 漏洞(ASP 代码以 SQL INJECTION 漏洞著称),你需要向 MSCASI 提供原始代码,MSCASI 会帮你找到存在风险的代码位置。

Drupal的theme开发

昨天在drupal7上搞了搞theme,发现alpha2还有一些地方不对。drupal比较麻烦的一个地方是更改了 theme.info 文件非要disable之后再enable才能生效。

drupal6应该还会主流一段时间,感觉drupal7的js太多了,非要那么多js吗?

如果用drupal6来开发一个门户站点效果如何,人员分配如何?我想国内很多设计师达不到这个要求,xhtml,css,js,php,sql 都要懂,xhtml,css,js精通。如果drupal精通,架构一个行业门户或者生活类的站点是非常高效的,至于优化,可以在服务器上下功夫。

cpulimit – 限制进程的 CPU 占用率

cpulimit

cpulimit 是一个简单而有用的小程序,通过它你可以限制一个进程的 CPU 占用率。如果善加利用,必将成为系统管理员的得力助手。

cpulimit 的用法也很简单,如上图所示,通过 -e 选项指定需控制的进程名(或 -p 选项指定 pid),-l 选项指定 CPU 的占用百分比即可。这里,我将 Chrome 的 CPU 占用率限制到 25%。

cpulimit 可从其项目主页下载,或通过你所用的 Linux 发行版包管理器安装。

Bash Shell Keyboard shortcuts

The following shortcuts work when using default (Emacs) key bindings. Vi-bindings can be enabled by running set -o vi.

Tab ⇆ : Autocompletes from the cursor position.
Ctrl+a : moves the cursor at the beginning of the line (equivalent to the key Home).
Ctrl+e : (end) moves the cursor at the line end (equivalent to the key End).
Ctrl+p : (previous) recalls the previous command (equivalent to the key ).
Ctrl+n : (next) recalls the next command (equivalent to the key ).
Ctrl+r : (research) recalls the last command including the specified character(s). A second Ctrl+r recalls the next anterior command which corresponds to the research
Ctrl+s : Go back to the next more recent command of the research (beware to not execute it from a terminal because this command also launches its XOFF). If you changed that XOFF setting, use Ctrl+q to return.
Ctrl+o : executes the found command from research.
Ctrl+l : clears the screen content (equivalent to the command clear).
Ctrl+u : clears the line content before the cursor and copy it in the clipboard.
Ctrl+k : clears the line content after the cursor and copy it in the clipboard.
Ctrl+w : clears the word before the cursor and copy it in the clipboard.
Ctrl+y : (yank) adds the clipboard content from the cursor position.
Ctrl+d : sends an EOF marker, which (unless disabled by an option) closes the current shell (equivalent to the command exit).
Ctrl+c : sends the signal SIGINT to the current task, which aborts and closes it.
Ctrl+z : sends the signal SIGTSTP to the current task, which suspends it. To return to it later one can enter fg ‘process name’ (foreground).
Ctrl+x Ctrl+x : (because x has a crossing shape) alternates the cursor with its old position.
Ctrl+x Ctrl+e : (editor because it takes the $EDITOR shell variable) edits the current line in vi.
Alt+f : (forward) moves forward the cursor of one word.
Alt+b : (backward) moves backward the cursor of one word.
Alt+Del : cuts the word before the cursor.
Alt+d : cuts the word after the cursor.
Alt+u : capitalizes every character from the cursor’s position to the end of the current word.
Alt+l : lowers the case of every character from the cursor’s position to the end of the current word.
Alt+c : capitalizes the character under the cursor and moves to the end of the word.
Alt+r : cancels the changes and put back the line as it was in the history.

不停地安装Oracle

今天在Xen上运行了两个2GB内存实例的CentOS5.3虚拟机安装oracle10g, 可是一直出现

Configuration assistant “Oracle Net Configuration Assistant” failed

1
 ./runInstaller -silent -ignoreSysPrereqs -responseFile   /home/oracle/database/install/response/ee.rsp

我想这是因为网络问题引起监听没有启动,所以,安装完成后直接运行

1
/opt/oracle/product/10.2.01/db_1/cfgtoollogs/configToolAllCommands

接着在另外一个终端启动监听

1
lsnrctl start

由于是动态监听.所以要大概30秒之后启动成功,注意是要在 PMON 服务进程启动成功之后才能运行 lsnrctl start. 也就是说要在 /opt/oracle/product/10.2.01/db_1/cfgtoollogs/configToolAllCommands 脚本建立数据库完成,创建实例并成功启动之后,也就是大概脚本运行到80%左右的时候.最后启动 em Web管理.

1
 emctl start dbconsole

EM启动有问题(我就遇到1158的java进程一直defunct状态,但是emangent却起来了),重新建立EM资料库,重新启动服务器.

1
 emca -config dbcontrol db -repos recreate

(*)update

后来发现是因为缺少 libXp.so.6 而不能启动的(我想oracle应该有trace的工具,但是我现在还不知道怎么用,就想gdb或者strace一样?),于是在CentOS5.3上安装了 libXp 的RPM问题解决.

Xen3.0中文手册

http://www.oracle1.com/~fred/Xen3man/

Logging In to Xen Console After Receiving “xenconsole: Could not open tty” Error

So you try and log in to a domU and xen says it can’t open a tty?

1
2
3
4
5
6
[tres@calliope ~]$ sudo xm console xen-domu.vm
xenconsole: Could not open tty `/dev/pts/15': No such file or directory
This error normally happens when xenconsoled is no longer running. You can quickly verify by looking for the xenconsoled process:

[tres@calliope ~]$ ps auxwww | grep xenconsoled
[tres@calliope ~]$

If you don’t find it, just run

1
/etc/init.d/xend start



Creative Commons License