Thursday, June 25, 2009

Linux SSH 常用命令使用大全

 

Linux SSH命令使用大全

2009-06-24 at 09:33 pm admin

先暂时发一个比较全面的说明在这里,以后可以考虑发一个具体例子出来。
rm -rf mydir /* 删除mydir目录 */
cd mydir /* 进入mydir目录 */
cd – /* 回上一级目录 */
cd ~ /* 回根目录 */
mv tools tool /* 把tools目录改名为tool */
ln -s tool bac

/* 给tool目录创建名为bac的符号链接,最熟悉的应该就是FTP中www链接到public_html目录了 */

cp -a tool /home/leavex/www /* 把tool目录下所有文件复制到www目录下 */
rm go.tar /* 删除go.tar文件 */
find mt.cgi /* 查找文件名为mt.cgi的文件 */
df –h /* 查看磁盘剩余空间,好像没这个必要,除非你太那个了 */
tar xvf wordpress.tar /* 解压tar格式的文件 */
tar -tvf myfile.tar /* 查看tar文件中包含的文件 */
gzip -d ge.tar.gz /* 解压.tar.gz文件为.tar文件 */
unzip phpbb.zip /* 解压zip文件,windows下要压缩出一个.tar.gz格式的文件还是有点麻烦的 */
tar cf toole.tar tool /* 把tool目录打包为toole.tar文件 */
tar cfz geek.tar.gz tool
/* 把tool目录打包且压缩为geek.tar.gz文件,因为.tar文件几乎是没有压缩过的,MT的.tar.gz文件解压成.tar文件后差不多是10MB */

wget http://www.sevenapart.com/download/wp.tar.gz
/*下载远程服务器上的文件到自己的服务器,连上传都省了,服务器不是100M就是1000M的带宽,下载一个2-3兆的MT还不是几十秒的事 */
wget -c http://www.eightapart.com/undone.zip
/* 继续下载上次未下载完的文件 */

tar cfz geek.tar.gz tool
/* 把tool目录打包且压缩为geek.tar.gz文件,因为.tar文件几乎是没有压缩过的,MT的.tar.gz文件解压成.tar文件后差不多是10MB */

退出SSH后,继续运行!
#nohup wget http://www.phpv.net/file.tar.gz &

wget是一个Linux环境下用于从World Wide Web上提取文件的工具,这是一个GPL许可证下的自由软件,其作者为Hrvoje Niksic 。wget支持HTTP和FTP协议
,支持代理服务器和断点续传功能,能够自动递归远程主机的目录,找到合乎条件
的文件并将其下载到本地硬盘上;如果必要,wget将恰当地转换页面中的超级连接以在本地生成可浏览的镜像。由于没有交互式界面,wget可在后台运行,截获并忽略HANGUP信号,因此在用户推出登录以后,仍可继续运行。通常,wget用于成批量地下载Internet网站上的文件,或制作远程网站的镜像。

语法:

wget [options] [URL-list]
URL地址格式说明:可以使用如下格式的URL:
http://host[:port]/path
例如:
http://fly.cc.fer.hr/
ftp://ftp.xemacs.org/pub/xemacs/xemacs-19.14.tar.gz
ftp://username:password@host/dir/file
在最后一种形式中,以URL编码形式为FTP主机提供了用户名和密码(当然,也可以
使用参数提供该信息,见后)。

参数说明:

wget的参数较多,但大部分应用只需要如下几个常用的参数:
-r 递归;对于HTTP主机,wget首先下载URL指定的文件,然后(如果该文
件是
一个HTML文档的话)递归下载该文件所引用(超级连接)的所有文件(递归深度由
参数
-l指定)。对FTP主机,该参数意味着要下载URL指定的目录中的所有文件,递归方
法与
HTTP主机类似。

-N 时间戳:该参数指定wget只下载更新的文件,也就是说,与本地目录中
的对
应文件的长度和最后修改日期一样的文件将不被下载。

-m 镜像:相当于同时使用-r和-N参数。

-l 设置递归级数;默认为5。-l1相当于不递归;-l0为无穷递归;注意,
当递
归深度增加时,文件数量将呈指数级增长。

-t 设置重试次数。当连接中断(或超时)时,wget将试图重新连接。如
果指
定-t0,则重试次数设为无穷多。

-c 指定断点续传功能。实际上,wget默认具有断点续传功能,只有当你使
用别
的ftp工具下载了某一文件的一部分,并希望wget接着完成此工作的时候,才需要
指定
此参数。

使用举例:
wget -m -l4 -t0 http://oneweb.com.cn/
将在本地硬盘建立http://oneweb.com.cn/的镜像,镜像文件存入当前目录下一个名为oneweb.com.cn的子目录中(你也可以使用-nH参数指定不建立该子目录,而直接在当前目录下建立镜像的目录结构),递归深度为4,重试次数为无穷(若连接出现问题,wget将坚韧不拔地永远重试下去,知道任务完成!)

另外一些使用频率稍低的参数如下:
-A acclist / -R rejlist:
这两个参数用于指定wget接受或排除的文件扩展名,多个名称之间用逗号隔开。例
如,假设我们不想下载MPEG视频影像文件和.AU声音文件,可使用如下参数:
-R mpg,mpeg,au

其它参数还有:
-L 只扩展相对连接,该参数对于抓取指定站点很有用,可以避免向宿主
主机的其他目录扩散。例如,某个人网站地址为:http://www.xys.org/~ppfl/,使用如下命令行:
wget -L http://www.xys.org/~ppfl/
则只提取该个人网站,而不涉及主机www.xys.org上的其他目录。

-k 转换连接:HTML文件存盘时,将其中的非相对连接转换成为相对连接。

-X 在下载FTP主机上的文件时,排除若干指定的目录

另外,下面参数用于设置wget的工作界面:
-v 设置wget输出详细的工作信息。
-q 设置wget不输出任何信息。

如果我们已经在一个HTML文档(或普通文本文档)中存储了所要提取的文件的连接
,可以让wget直接从该文件中提取信息,而不用在命令行中提供URL地址,参数格式:
-i filename
地址文件也可以不是HTML文档,例如,一个普通的文本文件,其中有需要下载的
URL列表即可。
我们可以用以下技巧提高下载速度:由于Linux是一个多任务系统,我们可以同时
运行多个wget进程以提高下载速度,例如,先下载某主页文件(index.html),然后将该文件所列出的所有地址分别用一个独立的wget进程进行下载。

至于其他的参数,可参考wget的man手册页,命令为:
man wget

DreamHost中shell使用指南

1. Basic Instructions基本操作命令
通常来说,使用”$[Instructions] –help”可以获得以下各个命令[instructions]的帮助,包含其参数列表的定义。

-ls 列出当前文件夹下所有内容
$ls -o 列出当前文件夹中所有内容,含详细信息,但不列出group
$ls -l 同上,含group信息
$ls -a 列出当前文件夹中所有内容,包含以”.”开头的文件
$ls -t 按更改时间排序
$ls -v 按版本先后排序

-cd [dir] 进入文件夹

-pwd 显示当前路径

-mkdir [dir] 新建文件夹

-chmod 更改文件/文件夹权限
$chmod [Mode] [dir],其中Mode形如”755″或”777″等。
$chmod [Mode] [file]
$chmod -R [Mode] [dir],递归形式,即将目标文件夹内所有文件均改变权限
Mode还有另一种表达方式,”755″即为”-rwxr-xr-x”,不列举了。

-rm [file] 删除文件/文件夹
$rm -f [file] 强行删除,忽略不存在的文件,无提示
$rm -r [file] 递归删除所有内容

-cp 拷贝
$cp [options] [source] [destination]
其中[options]可以为-f(强行拷贝)或-r(递归拷贝)

-mv 重命名或移动
$mv [options] [source] [destination]
[options]常用:-f(强行移动/重命名), -i(移动/重命名前尝试), -u(更新)
例如
$mv wwwroot/cgi-bin . 将/cgi-bin目录移动到当前目录下
$mv cronfile.txt myfile.txt 将cronfile.txt重命名为myfile.txt

2. wget下载工具
wget是一种非交互式的网络文件下载工具,在linux下可以使用该工具快速地从网络上下载所需要的文件而不需要经由本地硬盘中转,而且速度极快。以下是一些使用方法:

wget [参数列表] URL

最简单的用法:

$wget http://targetdomain.com/file.tar

wget的常用参数:
・ -t [nuber of times]:尝试次数,当wget无法与服务器建立连接时,尝试连接多少次。比如”-t120″表示尝试120次。当这一项为”0″的时候,指定尝试无穷多次直到连接成功为止,这个设置非常有用,当对方服务器突然关机或者网络突然中断的时候,可以在恢复正常后继续下载没有传完的文件;

・ -c:断点续传,这也是个非常有用的设置,特别当下载比较大的文件的时候,如果中途意外中断,那么连接恢复的时候会从上次没传完的地方接着传,而不是又从头开始,使用这一项需要远程服务器也支持断点续传,一般来讲,基于UNIX/linux的Web/FTP服务器都支持断点续传;

・ -T [number of seconds]:超时时间,指定多长时间远程服务器没有响应就中断连接,开始下一次尝试。比如”-T120″表示如果120秒以后远程服务器没有发过来数据,就重新尝试连接。如果网络速度比较快,这个时间可以设置的短些,相反,可以设置的长一些,一般最多不超过900,通常也不少于60,一般设置在 120左右比较合适;

・ -w [number of seconds]:在两次尝试之间等待多少秒,比如”-w 100″表示两次尝试之间等待100秒;

・ -nd:不下载目录结构,把从服务器所有指定目录下载的文件都堆到当前目录里;

・ -x:与”-nd”设置刚好相反,创建完整的目录结构,例如”wget -nd http://www.gnu.org/ “,实际的目录结构一级一级建下去,直到所有的文件都传完为止;

・ -nH:不创建以目标主机域名为目录名的目录,将目标主机的目录结构直接下到当前目录下;

・ -r:递归下载,在本机建立服务器端目录结构;

・ -l [depth]:下载远程服务器目录结构的深度,例如”-l 5″下载目录深度小于或者等于5以内的目录结构或者文件;

・ -m:做站点镜像时的选项,如果你想做一个站点的镜像,使用这个选项,它将自动设定其他合适的选项以便于站点镜像;

・ -np:只下载目标站点指定目录及其子目录的内容。这也是一个非常有用的选项,我们假设某个人的个人主页里面有一个指向这个站点其他人个人主页的连接,而我们只想下载这个人的个人主页,如果不设置这个选项,甚至–有可能把整个站点给抓下来,这显然是我们通常不希望的;

・ –http-user=username
・ –http-passwd=password:如果Web服务器需要指定用户名和口令,用这两项来设定;

・ -O 将数据写入文件中。

3. Crontab 定时执行任务

在DreamHost系统下, 通过Shell可以建立自己的crontab. 具体使用如下:
使用支持shell登录的终端(如fterm或putty), 地址栏输入 username@hostguide.cn:22即可以SSH方式登录至服务器.

常用的crontab命令:
crontab -l 显示所有现存cron job.

crontab -r 删除当前cron jobs.

crontab -e 编辑当前 “crontab file”. DH推荐使用nano

注意你的crontab包含所有的cron jobs, 每个cron一行, 断行结尾. 一个正常的cron如下所示:

45 2 * * * /home/user/script.pl
第一个数字是每小时的第几分钟,
第二个数字是每天的第几小时,
第三个数字是每月的第几天,
第四个数字是每年的第几月,
第五个数字是每周的第几天.

使用方式例如:
32 * * * * : 表示每小时的第32分钟.
12,42 * * * * : 表示每小时的第12及第42分钟两次
*/15 */2 * * *: 表示0:00, 0:15, 0:30, 0:45, 2:00, 2:15, 2:30, …
43 18 * * 7: 表示每个周日的6:43pm运行命令行.

在DreamHost下使用nano编辑完文件后,使用ctrl+o保存,ctrl+x退出编辑。

4. tar命令
tar命令的使用方法如下:

tar [参数列表] [文件名]

参数列表:
-c 生成新的备份,并同时覆盖旧的备份文件
-x 从备份文件中解压缩
-t 列出备份文件内的文件目录
-v 显示所有被操作文件列表
-f 在指定位置生成备份
-u 将不存在于备份中的文件,或将已经被更改的文件加入该备份中。

举例说明:
tar cvf filename.tar /*制作备份*/
tar cvf tarfile.tar ./filename /*将filename的文件备份到tarfile.tar里面*/
tar tvf filename.tar /*列出tar文档的内容*/
tar xvf filename.tar /*从tar文档中导出文件*/
tar zxpvf filename.tar.gz /*从tar.gz文档中导出文件*/
tar zxvf filename.tar.gz /*同上*/
tar xvf tarfile.tar ./filename /*导出tar文件中的单个文件*/

5. vi编辑器
Linux下很易用的一种编辑器,只需要稍微知道几个指令即可应用。

打开vi:
$vi [filename]:打开或新建文件,并将光标置于第一行首
$vi +n [filename] :打开文件,并将光标置于第n行首
$vi + [filename] :打开文件,并将光标置于最后一行首
$vi +/pattern [filename]:打开文件,并将光标置于第一个与pattern匹配的串处
$vi -r [filename] :在上次正用vi编辑时发生系统崩溃,恢复filename
$vi [filename]….[filename] :打开多个文件,依次编辑

如果filename不存在,则自动生成一个名字filename的新文件。

vi共有两种状态:命令状态/编辑状态

编辑状态下:
第一次按下insert键为”insert”模式,再按一下为”replace”模式,使用ESC返回命令状态;
在此状态下键盘的PgUp/PgDn/Insert/Delete/Home/End/方向键,均处于正常功能状态。

命令状态下:
输入的字符串作为命令处理,使用”insert”键切换到编辑状态;
以下是命令状态下的命令清单:

移动光标类命令
h :光标左移一个字符
l :光标右移一个字符
space:光标右移一个字符
Backspace:光标左移一个字符
k或Ctrl+p:光标上移一行
j或Ctrl+n :光标下移一行
Enter :光标下移一行
w或W :光标右移一个字至字首
b或B :光标左移一个字至字首
e或E :光标右移一个字j至字尾
) :光标移至句尾
( :光标移至句首
}:光标移至段落开头
{:光标移至段落结尾
nG:光标移至第n行首
n+:光标下移n行
n-:光标上移n行
n$:光标移至第n行尾
H :光标移至屏幕顶行
M :光标移至屏幕中间行
L :光标移至屏幕最后行
0:(注意是数字零)光标移至当前行首
$:光标移至当前行尾

屏幕翻滚类命令
Ctrl+u:向文件首翻半屏
Ctrl+d:向文件尾翻半屏
Ctrl+f:向文件尾翻一屏
Ctrl+b;向文件首翻一屏
nz:将第n行滚至屏幕顶部,不指定n时将当前行滚至屏幕顶部。

插入文本类命令
i :在光标前
I :在当前行首
a:光标后
A:在当前行尾
o:在当前行之下新开一行
O:在当前行之上新开一行
r:替换当前字符
R:替换当前字符及其后的字符,直至按ESC键
s:从当前光标位置处开始,以输入的文本替代指定数目的字符
S:删除指定数目的行,并以所输入文本代替之
ncw或nCW:修改指定数目的字
nCC:修改指定数目的行

删除命令
ndw或ndW:删除光标处开始及其后的n-1个字
do:删至行首
d$:删至行尾
ndd:删除当前行及其后n-1行
x或X:删除一个字符,x删除光标后的,而X删除光标前的
Ctrl+u:删除输入方式下所输入的文本

搜索及替换命令 :
/pattern:从光标开始处向文件尾搜索pattern
?pattern:从光标开始处向文件首搜索pattern
n:在同一方向重复上一次搜索命令
N:在反方向上重复上一次搜索命令
:s/p1/p2/g:将当前行中所有p1均用p2替代
:n1,n2s/p1/p2/g:将第n1至n2行中所有p1均用p2替代
:g/p1/s//p2/g:将文件中所有p1均用p2替换

选项设置
all:列出所有选项设置情况
term:设置终端类型
ignorance:在搜索中忽略大小写
list:显示制表位(Ctrl+I)和行尾标志($)
number:显示行号
report:显示由面向行的命令修改过的数目
terse:显示简短的警告信息
warn:在转到别的文件时若没保存当前文件则显示NO write信息
nomagic:允许在搜索模式中,使用前面不带“\”的特殊字符
nowrapscan:禁止vi在搜索到达文件两端时,又从另一端开始
mesg:允许vi显示其他用户用write写到自己终端上的信息

最后行方式命令
:n1,n2 co n3:将n1行到n2行之间的内容拷贝到第n3行下
:n1,n2 m n3:将n1行到n2行之间的内容移至到第n3行下
:n1,n2 d :将n1行到n2行之间的内容删除
:w :保存当前文件
:e filename:打开文件filename进行编辑
:x:保存当前文件并退出
:q:退出vi
:q!:不保存文件并退出vi
:!command:执行shell命令command
:n1,n2 w!command:将文件中n1行至n2行的内容作为command的输入并执行之,若不指
定n1,n2,则表示将整个文件内容作为command的输入
:r!command:将命令command的输出结果放到当前行 。Adminis

mysql的一些乱七八糟的东西
mysql的一些乱七八糟的东西 使用MYSQL半年,自己经常用的东西- -

Mysql –h192.168.0.110 –uks –p –P4444登录

Mysqladmin –h192.168.0.110-uks –p reload重新加载用户表

Mysqldump –R –h192.168.0.110 –uks –p test>c:/test.sql备份

Mysql –h192.168.0.110 –uks –p test
Windows下net stop mysql关闭服务

Net start mysql 开启服务

Linux下 service mysql stop关闭

Service mysql start 开启

Service mysql restart重启服务

Linux下开机自动启动mysql

#>chkconfig –add mysql 开机启动

Chkconfig –del mysql 关闭自动启动

Chkconfig – -list 查看服务启动情况

Mysql命令行下

Explain select……..查看该SELECT语句信息

Show variables查看系统变量

Show status 常看当前服务器状态

Show databases;

Show tables;

Show processlist

Show warnings;(查看最近一个警告或错误)

Set global xxxx=xxxx;

Flush ……清楚mysql使用的部分内部缓存

Information_schema.tables表信息

Mysql动态语句5.1

只支持create table,delete,do ,insert,replace,select set ,update语句

Describe tablename查看该表结构

Optimize table XXX 清理该表中已删除的链接(可以释放一些资源)

Source c:abc.sql 在MYSQL命令行中执行脚本

Select

Create

Insert

Update

Alter

Grant

revoke

就不说了= =

Mysql 数据库名最长 64位字符串

表名….. 64位字符串

字段名……. 64位字符串

用户名…….. 16位字符串

密码……… 貌似没限制

Handler(很牛X的东东)

Handler testt open as abc;

Handler abc read id=(123456);

Handler abc close;

Benchmark(n,expr)执行N次EXPR并测算时间

Post in LAMP | No Comments »

MYSQL在命令行创建存储过程
MYSQL在命令行创建存储过程 如何在MYSQL命令行创建存储过程

今天早上在百度知道碰到这个问题,我开始没看明白…….后来才知道提问人的意思是要在命令行下创建存储过程。很感谢这个问题,因为我也不会呵呵,我一直都用EMS创建这些东西…….

我也尝试了一些方法,但是第一个分号mysql就以为语句结束了,就拿那个例子来说:

CREATE PROCEDURE p7 (IN b INTEGER(12))

begin

declare a INTEGER(12);

set a=5;

INSERT INTO t VALUES (a);

SELECT s1*a FROM t WHERE b<=s1;

End

这个存储过程,在命令行直接创建的话,在第三排你输入分号后就报错了……因为MYSQL以为这个语句结束了,那对于MYSQL而言

CREATE PROCEDURE p7 (IN b INTEGER(12))

begin

declare a INTEGER(12);

肯定是个错误语句。

然后看了些东西,原来要加分隔符- -……….

DELIMITER //

CREATE PROCEDURE p7 (IN b INTEGER(12))

begin

declare a INTEGER(12);

set a=5;

INSERT INTO t VALUES (a);

SELECT s1*a FROM t WHERE b<=s1;

End

//

就OK了…………意思就是说在//……//之间的当成一个语句执行所以MYSQL接到的才是这个存储过程完整的创建语句。

Post in LAMP | No Comments »

mysql 基本命令
01月 27th, 2008
基础介绍:

1.在linux下使用下列命令,请确认mysql的bin目录是否已经加入到PATH路径中,或者是已经进入到mysql安装路径下的bin目录
查看PATH
shell> echo $PATH
或者
shell> cd /usr/local/mysql/bin

2.windows下,请运行cmd后,同样检查mysql的bin目录是否已加入到系统的PATH路径中,或直接进入mysql的安装目录

下面所有操作都是确认你以检查mysql的bin目录已加入到系统的PATH路径中,或已经进入mysql的安装目录的bin目录下

1]如何创建mysqld数据库的管理用户?

数据库安装好后,我们应该为mysql数据库创建一个管理帐号。要把root用户设置为管理员,我们应该运行下面的命令;

shell> mysqladmin -u root password 123456

通过上面的命令,我们可以知道,mysql数据库的管理员是root,密码是123456。

2]如何进入mysql数据库?以mysql数据库管理员root,密码为123456为例;

shell> mysql -uroot -p123456

输出上面的命令后,出现的是如下的提示;

Welcome to the MySQL monitor. Commands end with ; or /g.
Your MySQL connection id is 6 to server version: 3.23.58

Type ‘help;’ or ‘/h’ for help. Type ‘/c’ to clear the buffer.

mysql>

注意:操作这些命令的时候,应该把mysqld服务器打开。这些新手兄弟早就知道了吧:)

3]如何在数据库中操作命令呢,我想这是mysql手册都有的,我主要说几个要注意的地方。其实我也会不了几个命令。如果自己想学的弟兄,也不是什么难事;在windows中操作过mysql的,其实在这里也是一样的,mysql是跨平台的数据库,用法都是相同的。

在mysql数据库中,每操作一个命令,都是;号结尾的,可能有的新手弟兄,忘记输入了;号结尾,结果退不出来。:):)

1]查看mysql中都有哪些数据库?

代码:
mysql>
show databases;
+———-+
| Database |
+———-+
| mysql |
| test |
+———-+
2 rows in set (0.00 sec) mysql>
在mysql安装好,设置好管理员后,第一次进入系统,我们用show databases;命令查看数据库的列表,发现有两个数据库,mysql和test,这是系统自建的,是让大家练习用的。

4]如何创建和删除一个数据库?

比如我要创建一个名为linux的数据库,应该运行如下命令

mysql> create database [数据库名];

所以我们应该运行如下的命令,来创建名为linux的数据库

mysql> create database linux;
Query OK, 1 row affected (0.00 sec)

是不是建好了呢??肯定是建好了,因为都有OK了:)

查看是不是有linux这个数据库了呢?

代码:
mysql> show databases;
+———-+
| Database |
+———-+
| linux |
| mysql |
| test |
+———-+
3 rows in set (0.00 sec)

那我们如何删除一个数据库呢??
mysql> drop database [数据库名];

比如我们要把刚才创建的linux数据库删除,应该用下面的命令;
mysql> drop database linux;
Query OK, 0 rows affected (0.00 sec)

是不是已经删除了呢??

代码:
mysql> show databases;
+———-+
| Database |
+———-+
| mysql |
| test |
+———-+
2 rows in set (0.00 sec)

5]如何操作一个数据库呢,这个问题就比较多了,建议还是看一下mysql的手册吧。里面的东西太多了。如果操作一个数据库,首先是要指定一个数据库为当前数据库,应该用use命令

mysql>use [数据库];

比如我想指定linux这个数据库为当前数据库,应该是

mysql> use linux;
Database changed

6]如何备份数据库??

比如我们要备份mysql中已经存在的名为linux的数据库,要用到命令mysqldump

命令格式如下:

shell> mysqldump -uroot -p linux > /root/linux.sql
Enter password:在这里输入数据库的密码

通过上面的命令,我们要明白两件事,首先备份数据库是要以数据库管理员的身份备份;其次:备份目的地是/root,备份的文件名是linux.sql。其实备份的位置和文件名,根据自己的情况来定。文件名可以自己来取,路径也可以自己来安排;

比如我想把linux的数据库备份到/home/beinan,数据库的文件名为linuxsir031130.sql,所以应该输入如下的命令。
shell> mysqldump -uroot -p linux > /home/beinan/linuxsir031130.sql
Enter password:在这里输入数据库管理员root的数据库密码

这样我们到/home/beinan目录下就能发现mysql中名为linux的数据库的备份文件linuxsir031130.sql

综上所述,我们学习时要学会变通。:):)

5]如何把把备份的数据库导入到数据库中?

首先我们还是要操作上面几个过程,比如添加数据库管理员(如果您没有添加过mysql数据库管理员的话),创建数据库等。

比如我们要把在/home/beinan这个目录中的linuxsir031130.sql这个备份,导入名为linux的数据库中,应该如下操作;

shell> mysql -uroot -p linux < /home/beinan/linuxsir031130.sql
Enter password:在这里输入密码

如果机器好,数据库比较小,几分钟就好了。

6]其它一些比较常用的mysql指令;

查看状态
mysql> show status;

查看进程

代码:
mysql> show processlist;
+—-+——+———–+——+———+——+——-+——————+| Id | User | Host | db | Command | Time | State | Info |
+—-+——+———–+——+———+——+——-+——————+| 16 | root | localhost | NULL | Query | 0 | NULL | show processlist |
+—-+——+———–+——+———+——+——-+——————+
1 row in set (0.00 sec)

查看表,应该先指定一个数据库为当前数据库;比如是名为linux的数据库;

mysql>use linux;
mysql> show tables;
Empty set (0.00 sec)

7]对mysql数据库常用命令的一点补充;

几个常用的mysql相关的管理命令

mysql 命令:基本文本的,显示和使用的mysql数据库。前面已经简单的提过用法;比如登录等。

mysqladmin 命令,用来创建和维护mysql数据库的命令,前面已经简单的提过;

isamchk 是用来修复、检查和优化.ism后缀的数据库文件;

mysqldump 是用于备份数据库,前面已经简单的说明过;

myisamchk 用来修复.myi后缀的数据库文件;

比如我们要检查名为linux的数据库.myi数据库表是否存在问题,应该用下面的命令;

要把mysqld服务器停下来
shell> ../share/mysql.server stop

然后执行
shell> myisamchk ../var/linux/*.MYI

上面的命令的意思就是检查所有的.myi文件,数据库的目录在../var/linux/目录中

如果有问题,应该用-r参数来修复
shell> myisamchk -r ../var/linux/*.MYI

6]mysqlshow 命令:显示用户选择的数据库和表
shell> mysqlshow -uroot -p [数据库名]

比如我要查看名为linux的数据库;应该是:

shell> mysqlshow -uroot -p linux

好了,到这里,你可能已经知道命令行下的所有基本操作了~

ps:补充一个。。

更改ROOT帐号名。

update set user=”新名字” where user=”旧名字”;

自己补充:
在windows中的关闭mysql命令 net stop mysql ;启动是net start mysql
OPTIMIZE TABLE “;优化表

Post in LAMP | No Comments »

ib_logfile0和ib_logfile1,为INNODB数据LOG文件
01月 27th, 2008
ASK: 我的系统是windows2003,最近装了MYSQL5.0后发现C盘容量剧减,后来仔细检查了一下,发现ib_logfile0和 ib_logfile1竟然用了600多M,现在C盘8G的空间就剩余200M了,请问我要怎样转移ib_logfile0和ib_logfile1文件到D盘呢?

DA: ib_logfile0和ib_logfile1,为INNODB数据LOG文件,先停下数据库.
将这三个文件拷到它处
修改MY.INI配置文件, 参数改为新目录
—————————
innodb_log_group_home_dir

The directory path to the InnoDB log files. It must have the same value as innodb_log_arch_dir. If you do not specify any InnoDB log parameters, the default is to create two 5MB files names ib_logfile0 and ib_logfile1 in the MySQL data directory.
————
再启动

不过有个问题,LOG文件是固定不变,用来存储未提交的数据,一般设为几十兆就可以了,你的是否设置有问题.

Friday, June 12, 2009

BDRip

 

BDRip

A BDRip is a multimedia file that contains content that was sourced from a Blu-ray Disc product. As the "rip" part of the name applies, the copy is generally not a 1:1 copy, but instead is usually re-encoded. Most of the time Blu-ray disc rips (BDRips) contain AVC video that has a lower bitrate to the original content. Sometimes the creator of a BDRip may choose to lower the video resolution from Full HD 1080p content to 720p. The most common multimedia container used for BDRips is the Matroska (MKV) container, which would be used for its suitability.

BDRips often come packed with subtitle streams (usually part of the MKV file) and DTS or AC3 audio. A BDRip could be made to fit onto single layer DVD media (DVD-5), and so would be around 4.3GB in size. Content up to 8GB will need to be burned to a dual-layer DVD disc. Creating BDRips is not as easy as creating DVDRips yet, and encoding AVC content takes considerably longer than MPEG-2 content. Additionally, when working with Blu-ray content, there a lot of data to be worked with. A Blu-ray Disc could contain up to 50GB of data, which would have to be decrypted and copied to the hard disk drive before it could be re-encoded.

BDRips are widely found on the Internet, posted by pirates and labeled as either BDRip or "BluRay". Playing BDRip content depends on the resources you have available in your computer.

More information: How to play MKV files

Thursday, June 11, 2009

Home-style beef and red wine winter casserole

http://www.ourbrisbane.com/food-and-drink/home-style-beef-and-red-wine-winter-casserole?ref=enl&nl=1


Home-style beef and red wine winter casserole

A recipe to ward off winter's chill
More like this: 
Beef casserolePhoto courtesy: Zone Fresh
share this - email, favourites, social bookmarks and more

A tasty, heart-warming recipe, courtesy of Zone Fresh Gourmet Markets.

Warm up your winter with slow-cooked food. Comfort cooking is one of the best things about winter and this delicious home-style casserole is guaranteed to warm you up from the inside.

Preparation Time: 15 minutes

Cooking Time: 120 minutes

Ingredients (serves 4)

  • 1kg chuck steak
  • ⅓ cup seasoned plain flour
  • 2 tbs olive oil
  • 1 cup red wine (we recommend shiraz cabernet)
  • 2 beef stock cubes
  • 1 can of diced tomatoes
  • 10 pickling onions, peeled (sauté onions with meat if desired)
  • 500g carrots
  • 250g button mushrooms
  • 400g chat potatoes, quartered
  • 1 sprig fresh rosemary
  • 1 chilli, chopped (if desired)
  • 1 pinch paprika
  • salt and pepper (to season)

Method

  1. Preheat oven to 160°C. Dice 1kg chuck steak into small manageable cubes and dust with ⅓ cup seasoned plain flour (see chefs tip below). Heat 2 tbs olive oil in a stove proof and ovenproof dish over medium to high heat. Cook meat in 250g batches, add additional oil if needed. Remove all meat from pan.
  2. Increase heat to high. Add 1 cup red wine, diced tomato, and stock cubes. Bring to boil, scraping base of dish to remove sediment. Bring to the boil and remove from heat.
  3. Add 10 pickling onions, peeled, 500g carrots or parsnip as substitute, cut into bite-size pieces, 250g button mushrooms and 400g chat potatoes, quartered. Return the beef to the pan. Toss until combined. Place in oven and bake for 2 hours or until the meat is tender.

Chefs tip

Place flour and seasoning in small plastic bag, place diced beef in plastic bag in small handfuls and shake until evenly covered in seasoning, repeat process until all meat is evenly seasoned.

Serve with crusty bread.

Alternatively, recipe can be prepared using a slow cooker. However, for best results, pan fried meat will enhance the flavours.

istylefashionContent courtesy of Zone Fresh Gourmet Markets
www.zonefresh.com.au

Saturday, June 6, 2009

人的一生

 

人的一生

主题:[原创]人的一生

○o悠の悠o○
[xueeraibama@sohu]
发表于2007-04-06 18:02:23

人的一生,经历着多少风风雨雨,坎坷艰辛,拥有了多少快乐与幸福,造就了多少辉煌与财富。

人的一生,有痛苦,有悲伤,也有快乐和温馨,只要以微笑面对,人生就会充满欢笑和幸福。

人的一生,长久而又短暂,不同的生命,都有属于自己的人生。走过的路,每当回望时,或多或少都会有一些值得积累的地方,无论是教训,还是成功,都将在人生的印记上画上一个特殊的符号,这就是属于人生的财富。

人的一生,随着时间的步伐在前进或是停止。当生命的指针开始转动时,人的一生也将开启那扇迈向五彩世界的大门,走进去,就意味着生命的时钟开始前进了。当生命的指针停止时,人的一生也将随即停止前行,回首走过的漫漫长路,每一个精彩时刻,都会带来不同的感受,不要去后悔,不要去遗忘,因为有了它们,人生才拥有色彩,拥有意义。

人的一生,难以一帆风顺,难得轻松自在,挫折压力,哀愁抱怨,使生命失去了光环的照耀,世界也变得暗淡无味。生命原本是快乐的,不需要痛苦和悲伤,只是心情的波浪在操纵着人的感受。使人时忘乎所以,时而心灰意冷,生命的意义在于过程而不在于结果,在于把握人生中每一精彩的瞬间,在乎充满希望地向目标迈进的过程,而当到达终点时,无论留下的是平庸或是辉煌,都不再有遗憾。

人生的意义

 
 

人生的意义――摘自《新东方英语》

                                      

       不管你是否准备好, 有一天一切都会结束。不再有旭日东升,不再有灿烂白昼,不再有一分一秒的光阴。你收藏的一切,不论是弥足珍贵还是已经忘记的,都将留给别人。 

       你的财富、名望和世俗的权利都将变成细枝末节的事情,不管你拥有的还是亏欠的,都不再重要。   你的嫉恨、冤仇、挫败和妒嫉之心终将消失。  同样,你的希望、雄心、计划和未竟之事都将终止。曾经无比重要的成败得失也将褪色。  
       你来自哪里,用什么方式生活都不重要了。  你是貌美如花还是才华横溢也不重要了。你的性别、肤色、种族都无关紧要了。  
 
       那么什么变得重要了呢?你有生之日的价值怎么来衡量呢? 
       重要的不是你所买到的,而是你所创造的。 
       重要的不是你所得到的,而是你所付出的。 
       重要的不是你的成功,而是你的价值。 
       重要的不是你学到的,而是你传授的。 
       重要的是你的每一次正直、怜悯、勇敢和牺牲之行为能够使人充实,让人强大或是能够激励他人,让他们以你为榜样。 
       重要的不是你的能力,而是你的性格。 
       重要的不是你认识多少人,而是在你离开时,有多少人感到这是永久的损失。   
       重要的不是你的记忆,而是爱你的人的记忆。 
       重要的是你为人所怀念的时间有多长,重要是谁在怀念你,重要的是他们为什么要怀念你。 

        让我们的一生不是因为偶然而变得重要,不是因为环境而变得重要。而是我们自己的选择,选择让自己的生命有意义!

 

 

 

Monday, June 1, 2009

Windows 下常用盗版软件的替代免费软件列表

 

——Windows 下常用盗版软件的替代免费软件列表

作者:杨文博 <http://blog.solrex.cn>
原文链接:http://blog.solrex.cn/articles/throw-away-pirated-softwares.html

最后更新时间:2008年10月20日

本文不是一篇对开源软件或者 Linux 的宣传,本文仅仅针对那些在 Windows 下不愿意使用盗版软件,和不能忍耐寻找盗版软件注册码、注册机带来的麻烦的用户。本文的主要内容就是介绍一些用来替代 Windows 下流行盗版软件的开源和免费软件。请注意替代的免费软件并不一定比流行的盗版软件功能差,很多甚至比商业软件还要好。

当您看完这篇文章,我相信您完全可以把您 Windows 系统里安装的盗版软件清理干净而不影响您的任何工作。如果您仍然希望并且喜欢、享受做一个盗版软件用户的话,那也没有办法,但是请您记住,非常非常重要的一点:您已经不是一个历史清白的人,因为一打开电脑,您就在犯罪(侵犯知识产权,侵犯软件版权)。以后像“我是一个遵纪守法的好公民”这种话,想想再说吧!

目录:

1. 压缩解压缩软件
2. 文本编辑软件
3. 杀毒软件
4. 软件防火墙
5. 辞典软件
6. FTP 下载工具
7. 邮件客户端 & RSS 阅读器
8. 办公软件
9. 图片查看器
10. 集成开发环境
11. C/CPP 编译器
12. 科技文献排版
13. 图片编辑软件
14. 远程登录软件
15. 统计计算软件
16. 数学计算软件
17. 反汇编软件
18. 参考文献管理

内容:

1. 压缩解压缩软件
流行盗版软件:WinRAR
替代开源软件:7-Zip http://www.7-zip.org

7-Zip 在 2007 年被 SourceForge 网站评为社区选择最佳项目奖,最佳技术设计奖。7-Zip 可以说是能完美替换 WinRAR(甚至更好),它可以解压所有流行压缩格式的压缩文件,可以解压或压缩 7z, ZIP, GZIP, BZIP2 和 TAR 压缩文件格式。注意,7-Zip 不可压缩为 rar 文件格式,这样做有版权问题。

2. 文本编辑软件
流行盗版软件:UltraEdit
替代开源软件:Notepad++ http://notepad-plus.sourceforge.net
文本比较软件:WinMerge http://winmerge.org

相信用过 UltraEdit 的人都会赞不绝口,因为它强大的语法高亮,十六进制编辑,文件对比等等功能令人爱不释手,但是可以的是,它是一个收费软件。那么开源社区有没有相应的替代品呢,答案是肯定的,Notepad++ 一定不会让你失望。更强大的语法高亮,更具扩展性的插件,除了文件对比功能还比不上 UE,我真的是挑不出来一点儿毛病,这篇文章就是在 Notepad++ 中写的,赶快去下载一个尝试一把吧。而且 Notepad++ 还带有很多插件,如果你的 Notepad++ 带有 Nppexec 插件,那么你就可以在 Notepad++ 中打开一个类似于命令行的窗口,想想用这个写 Latex 文档多爽吧,在侧栏中直接输入 latex xx.tex 就可以直接调用 latex 进行编译了,这总比打开一个新的命令行窗口要省事多了吧。

感谢 bbbush 推荐的开源软件 WinMerge,这是一个强大的文本比较和整合工具。

3. 杀毒软件
流行杀毒软件:Kaspersky, Norton, NOD32, Rising 等等太多了
替代开源软件:ClamWin http://www.clamwin.com
替代免费软件:AVG http://free.grisoft.com
替代免费软件:Avira AntiVir Personal http://www.free-av.com
替代免费软件:Avast Home Edition http://www.avast.com

相信大家对病毒都一直很头痛,杀毒软件这个东西,平常用不着,真到用着时候却发现起不了啥作用。上面推荐的杀毒软件中,第一款是开源软件,所以功能稍微弱一些,后面三款都是有商业公司支持的,包括收费版和个人用户免费版两种,所以软件的质量还是可以保证的。感谢 Abcx 推荐 Avira AntiVir. 我个人比较推荐 Avast,功能真的很强大,不比某些软件的商业版本少什么东西。

4. 软件防火墙
流行盗版软件:ZoneAlarm, 天网,瑞星 等等也太多了
替代免费软件:COMODO Firewall Pro http://www.personalfirewall.comodo.com

如果说 COMODO Firewall Pro 是“完美替代”瑞星防火墙,我都觉得侮辱它了。COMODO Firewall Pro 曾获得 Web User 杂志 2007 年金奖,它不仅仅是一个防火墙,而且还可以监视系统文件的更改,它监视文件范围之广泛简直都让我崩溃了,总之它是一个防火墙,但是包含了一些杀毒软件才有的功能,至于它的强大,用了才知道。用 COMODO Firewall Pro 和 Avast 可以帮你打造一个不逊于任何杀毒软件和防火墙组合的安全系统。

5. 辞典软件
流行盗版软件:金山词霸
替代开源软件:StarDict(星际译王) http://stardict.sourceforge.net
替代免费软件:灵格斯词霸 http://www.lingoes.cn
替代免费软件:谷歌金山词霸合作版 http://g.ciba.com

如果你用过 StarDict,我相信你不会再夸金山词霸好。StarDict 可以自定义辞典库,仅仅中英互译辞典你就有二十多种选择(其中包含金山词霸的辞典库哎),还有其它很多语言的辞典库,而且翻译中有很好玩的词义发散树。为什么它叫译王呢?因为它还有全文翻译功能,动心了吧,把金山词霸删了吧,换 StarDict,我保证你不会失望。

感谢 SteamedFish 推荐灵格斯词霸,这也是一款相当不错的辞典软件,尤其适合 Windows 下的用户习惯。

2008年5月 Google 联合金山公司推出谷歌金山词霸合作版,虽然自带辞典少了点儿,但是有在线辞典功能。也许你想尝试一把!

6. FTP 下载工具
流行盗版软件:FlashFXP
替代开源软件:FileZilla http://filezilla-project.org
替代免费软件:UltraFXP http://www.click-now.net/html/UltraFXP.htm

FTP 下载工具,其实这个东西没什么讲头,大家用起来都差不多,只是换一个软件换一个使用方式而已。窗口布局,菜单内容变一变,基本功能都没差别。世事真的很多变,我以前强烈推荐 SmartFTP 在 2008 年 7 月全面转向了收费软件,这件事让我很伤心,因为这个软件我用的很舒服,sigh!不过幸好我们有开源软件 FileZilla,FileZilla 也支持 IPV6 协议以及使用代理服务器,唯一有点儿不舒服的是它的窗口分布有点儿乱,不过相信会很容易适应的。

7. 邮件客户端 & RSS 阅读器
流行盗版软件:Outlook, FeedDemon
替代开源软件:ThunderBird http://www.mozilla.com/thunderbird

ThunderBird,其实算是 Firefox 的兄弟,两者同是 mozilla 的开源项目。要说邮件客户端,ThunderBird 可能不是最优秀的,但是要说邮件客户端 + RSS 阅读器,恐怕直接支持两者的不太多吧。我之所以用它有一个很重要的理由,ThunderBird 是一款跨平台的阅读器,这样我就不用在 Windows 下和 Linux 下分别设置两次邮件客户端了,只需要把一个平台下的数据文件拷贝到另一平台下,就完全可以使用了。

8. 办公软件
流行盗版软件:MS Office
替代开源软件:OpenOffice http://www.openoffice.org
替代开源软件:AbiWord http://www.abisource.com
替代免费软件:WPS Office 2007 个人版http://www.wps.com.cn
替代免费软件:永中 Office 2009 个人版http://www.evermoresw.com/webch/product/personal.jsp

MS Office 我就不说了,有几个人不是盗版?正版 Office 2007 可是最便宜 400 多美元一套呢!用微软的口吻来说,您可是每年给微软带来好几百美元的直接经济损失啊(再加上Visual Studio, Windows 呢,上千美元了吧)!OpenOffice 现在虽然不敢说完美支持 MS Office 文档,但至少大部分兼容是没有问题的,而且 OpenOffice 文档可以直接保存成多种文件格式,像小气的微软在 2007 里还需要安装插件支持输出 pdf,太吝啬了吧。所以呢,OpenOffice 给你提供了替换 MS Office 的绝大部分功能,为什么还做一个盗版者呢?下载一个吧,至少可以当作一个 pdf 转换工具,要知道低于 2007 的 MS Office 可必须得安装 Adobe Acrobat 才能实现转换 pdf 功能,sigh,又是一个盗版软件!

对于中文用户,在这里我特别推荐金山公司的 WPS Office 套装个人版,对 MS Office 文档的支持到让人吃惊的地步,也没有 OpenOffice 一些启动速度慢等一些问题,非常适合一般用户使用;永中 Office 也在 2008 年 10 月 13 日宣布了个人版免费这一令人振奋的消息,这一消息使得 Linux 用户们有福了,因为永中不仅有 Windows 版,也有 Linux 版,对中文的支持要比 OpenOffice 好很多。但是从测试效果来看,Linux 版本对文档字体兼容性不如 Windows 下的 WPS,不知道 Windows 下的永中表现怎么样。

9. 图片查看器
流行盗版软件:ACDSee
替代开源软件:IrfanView http://www.irfanview.com

其实我对图片浏览软件并不感冒,因为 GFans 都是用 Picasa 嘛!但是看到很多人用 ACDSee 就让我很不爽,IrfanView 挺好的啊,而且速度更快。note:第一次看到有人用 IrfanView,是西门子公司 PSE 的工程师演示流程图。

10. 集成开发环境
流行盗版软件:MS Visual Studio, Intel C++, Turbo C, Delphi
替代开源软件:Eclipse(Almost Every Language) http://www.eclipse.org
替代开源软件:NetBeans(Only JAVA) http://www.netbeans.org

如果你是个程序员,还没听说过 Eclipse?太老土了吧。先别说 eclipse 好不好,就拿现在大部分软件公司(尤其是JAVA软件开发公司)都在用 eclipse 来说,你也应该使用它。别给我说 Visual Studio 更顺手,我宁愿用 Notepad++ 写代码再调用命令行编译也不愿意用 Visual Studio 的代码编辑器(当然我这里指 Visual Studio 6.0,俺太土,就用过古董)。Eclipse 强大的插件功能,代码管理功能,自动补全功能,支持多种程序语言...好处我就不列举了(因为我发现自己总是经常不经意发现 Eclipse 的优点,点点惊喜太多了),自己用吧。

11. C/CPP 编译器
流行盗版软件:MS Visual Studio, Turbo C
替代开源软件:DevC++ http://www.bloodshed.net/devcpp.html

其实这个真的不好说,我没用过 DevC++,因为我基本上不在 windows 下写 C 代码了。但是 DevC++ 的编译器基础 GCC,我是太经常用了,我不相信你没听说过它,所以我就不解释了。为了写一段 hello world 满世界找注册码,找盗版光盘,值得吗?而且 VC6 对 C++ 标准的实现那么差,而 VS2003 以上动辄几个 G 的大小,相比而言 DevC++ 要比它们好很多。

12. 科技文献排版
流行盗版软件:MS Word
你应该使用的开源软件:LaTeX http://www.latex-project.org
中文 TeX 套装:CTeX http://www.ctex.org

如果我说 LaTex 是 MS Word 的替代软件,肯定有人会骂我:“有没有搞错?MS Word 能算科技文献排版软件?”所以对于那些习惯于用 word + Mathtype(哦,又是一个盗版软件!)写论文的同学,温习一下 LaTeX 的历史吧。你可以仔细看一下下载的 ieee, acm 论文,pdf 文件请看属性,有多少是用 word 的 adobe acrobat 插件生成的?又有多少是 TeX 相关程序或者 dvi, ghostscript 转化成的?当然了,中文的垃圾杂志就不要看了。如果是写中文文章,你可以更欢迎 CTeX 这一省去很多中文配置的套装,学了 LaTeX 你就会知道,什么叫做漂亮的科技文献排版!

13. 图片编辑软件
流行盗版软件:Photoshop
替代免费软件:Paint.net http://www.getpaint.net
替代开源软件:Gimp http://www.gimp.org

用 Linux 的人对 Gimp 不陌生,这是 Linux 下标准的图片编辑程序,这里指其 Windows 版本,Gimp 功能非常强大,但是编辑方式和习惯与 Photoshop 有些区别,可能需要稍微长点儿的学习周期。感谢 Cofyc 推荐 Paint.net,Paint.net 是一个更轻量级的图片编辑工具,功能比 Gimp 和 PS 都弱一点儿,但是编辑习惯和 PS 比较相似,用起来较为容易。有人会说,Photoshop 有这个,有那个,它们有吗?但是请问,你是专业的 PSer 吗?如果你是专业的 PSer,为什么不用苹果机再装个 Photoshop 进行处理呢?对于一般非专业人士的使用,我相信上面两款软件提供的功能足够你探索了。

14. 远程登录软件
流行盗版软件:SecureCRT
替代开源软件:Poderosa http://en.poderosa.org/

不喜欢 Putty 的黑色界面和难操作性?又不想使用盗版的 Secure CRT?这里像你隆重推荐终端登陆器 Poderosa,Poderosa 对 Telnet, SSH 各种登录方式均支持,还支持标签窗口,如果你电脑上还安装有 Cygwin,那么别再用那个黑黑的 Cygwin 启动窗口了,Poderosa 内建有对本地 Cygwin Shell 的支持,而且,Poderosa 支持插件扩展哦,你可以自己为它设置更多功能。

15. 统计计算软件
流行盗版软件:SAS

替代开源软件:R http://www.r-project.org/

大概学统计的学生都会很头痛使用什么软件做统计计算,SAS 那庞大的体积让人望而生畏,再加上用它的人不多,注册码和破解版也非常难找。其实你不必担心,R 软件在统计学领域的使用范围绝对要比 SAS 要广,因为不是每个教授都有钱买正版的 SAS 的,而且基于 R 开发的软件包也是多如牛毛,相信你一定能找到你需要的函数包,在这点上,SAS 要差一些。

16. 数学计算软件
流行盗版软件:Matlab, Mathematica
替代开源软件:GNU Octave+GNUPlot http://www.gnu.org/software/octave/ + http://www.gnuplot.info

虽然 Matlab 在数学计算领域非常流行,但是它的价钱也太贵了。这里我向您隆重推出 GNU Octave,一款开源数学计算软件,它兼容 Matlab 大部分语法,在它的发行版中您能找到很多 .m 文件,所以也许您写的 .m 文件都可以不加修改地在 Octave 上运行。如果需要画图功能,GNUPlot 会给您提供强大的画图工具支持。

17. 反汇编软件
流行盗版软件:Win32Dasm
替代免费软件:IDA Pro(旧版本) http://www.hex-rays.com/idapro/

其实 IDA Pro 更应该说是流行的盗版软件,但是 IDA Pro 的低版本是个人免费使用的,比如现在可以免费使用 IDA Pro 4.9 版,对于一般用户,旧的版本功能已经“非常非常非常”强大了。

18. 参考文献管理
流行盗版软件:Endnote
替代开源软件:JabRef http://jabref.sourceforge.net/

EndNote 是差不多 Windows 下文献管理的权威软件,某些学校可能会买下来这个软件给学生用。但是总有一些学校没钱,或者用户希望保持文献数据库在 Linux 下和 Windows 下的兼容性,那么 JabRef 可能是你最好的选择,因为 JabRef 使用 JAVA 语言编写,是跨平台的。尤其是对 bibtex 论文数据库的支持上,JabRef 已经相当完美了。

本人的经验也就写到这里了,如果您有什么想补充的,您可以在本博客最底下的 CC 协议的基础上自由转载、修改或者添加内容。

Zend-Server-Community-Edition/installed_components

Installed Components
 
 
 
 

Home  |  Zend Server Installation Guide  |  Post Installation  |  Installed Components

Installed Components

The following text provides a description of each of the Zend Server CE components that are installed in your environment Along with the installation location of each component.

Installation Directories

Not all users decide to install their software in the same location. To reflect this requirement, all paths in this document have been replaced with the following prefix: <install_path>. This represents the location of the installed files. If you used the default settings, the location should be as follows:

  1. Windows: C:\Program Files\Zend\ZendServer

  2. Windows 64 bit C:\Program Files (x86)\Zend\ZendServer

  3. DEB/RPM: /usr/local/zend

  4. Tarball: /usr/local/zend

  5. Mac: /usr/local/zend

Component

Loaded

Description

Installation Path

Comments

PHP

+

The Zend certified version of PHP 5.2.x that includes commonly used and Zend extensions.

Windows: <install_path>\bin

RPM, DEB: <install_path>/lib/php/libphp5.so

Tarball and Mac: <install_path>/apache2/modules/libphp5.so

The extensions for all are under:

<install_path>/lib/php_extensions

 

 

Zend Optimizer+

+

Zend's extension for using opcode caching and optimizations for PHP.

Windows: <install_path>\lib\optimizerplus

RPM, DEB, Tarball and Mac: <install_path>/lib/optimizerplus

 

 

Zend Guard Loader

+

The Zend Guard Loader for running PHP, encoded with Zend Guard.

Windows: <install_path>\lib\loader

RPM, DEB, Tarball and Mac: <install_path>/lib/loader

 

 

Zend Debugger

+

Zend's extension for server side debugging, profiling and code coverage.

Windows: <install_path>\lib\debugger

RPM, DEB, Tarball and Mac: <install_path>/lib/debugger

 

 

Zend Cache

+

A Zend extension for PHP data caching and partial PHP output caching.

Windows: <install_path>\lib\datacache

RPM, DEB, Tarball and Mac: <install_path>/lib/datacache

 

 

Java Server

-

The Java PHP extension, Java daemon and setup files.

Windows: <install_path>\bin

RPM, DEB, Tarball and Mac:
PHP Extensions
- <install_path>/lib/jbridge/php.5.2.x/zendbridge.so
Java Daemon
- <install_path>/lib/jbridge/jawamw.jar

 

 

Java Bridge

+

Enables integration of Java libraries and classes within PHP applications.

Windows: <install_path>\lib\jbridge

RPM, DEB, Tarball and Mac: <install_path>/lib/jbridge

Note:

Requires SUN's JRE 1.4 or later or IBM's Java 1.4.2 or later. 64 bit JRE is not supported.
More information see:
SUN Microsystems's website
.

 

Zend Framework

+

Installs Zend's open-source framework for developing Web Applications and Web Services in PHP.

Windows: <install_path>\share\ZendFramework

RPM, DEB, Tarball and Mac: <install_path>/share/ZendFramework

This installs libraries containing the Zend framework components.

 

Oracle Instant Client

+

This installs Oracle OCI (Oracle Instant Client Libraries) lightweight drivers for accessing Oracle Databases.

Windows: <install_path>\bin

RPM, DEB, Tarball and Mac: The extension resides with the other extensions, the libraries it depends upon are  in <install_path>/lib/

Required for Oracle database access from PHP.

 

phpMyAdmin

-

A popular open-source management tool for handling MySql Database over a Web interface.

Windows: <install_path>\..\phpMyAdmin

Tarball and Mac: not bundled

Mac: <install_path>/share/phpMyAdmin

DEB and RPM: the distribution's default location.

 

 

Downloaded during installation.

Only relevant for MySql Database users.

 

IBM DB2 RTCL

-

This installs the IBM DB2 run Time Client libraries for managing Database access.

Windows: user defined location in a separate installer

RPM, DEB, Tarball and Mac: IBM DB2 RTCL is not shipped with Zend Server CE and can be downloaded from ftp://ftp.software.ibm.com/software/data/db2/express/

 

Downloaded during installation.

Required for IBM DB2 access from PHP.

 

MySQL

-

Installs a complete MySql database on the Web Server.

Windows: <install_path>\..\MySQL

Mac: <install_path>/mysql

RPM, DEB, Tarball and Mac: Not Bundled

 

MySQL server's user name and password

Linux:  Default - "root"

Mac OS X: Defined in the installation Process

Windows: Default - "root" and no password

Downloaded during installation.

Usually the password is "root" for administrators).

For more information see: Working with phpMyAdmin to Manage MySQL

 

Apache 2.2.x Web server

-/+

 

Windows:  <install_path>\..\Apache2

Tarball and Mac: <install_path>/apache2

DEB and RPM: the distribution's Apache package.

Installed only if the option is selected. The alternative is to configure to an existing installation of IIS and then Apache will not be installed.

 

 

 

 

Related Links

Related Links:

Package Setup and Control Scripts

Log Rotation

Ports and Services

Installed Components

Upgrading 

 

 

Zend Server Community-Edition Windows Installation guide

 
 

Home  |  Zend Server Installation Guide  |  Windows Installation

Windows Installation

This section describes the three available processes for installing Zend Server CE on Windows: Either via a native Windows installer, an unattended Installation or a Silent Installation.

Note

If you are upgrading Zend Server CE from an existing installation older than Zend Server CE Version 4.0.2, you must first perform the procedure described in "Upgrading" .

To run Zend Server CE on Windows, you need the following:

  • Generally, you should install Zend Server CE on Windows using an account that has administrator rights. Otherwise, you may encounter problems with certain operations such as editing the PATH environment variable or accessing the Service Control Manager.

  • Enough space on the hard drive to unpack and install (generally a minimum of 200 megabytes is recommended.)

Zend Server CE for Windows is available in a binary distribution that contains a setup program .exe file. The .exe file installs everything you need to start using Zend Server immediately.

 

If you are encountering problems with Internet Explorer 7 running on Windows 2008 Server, see the following troubleshooting topic:  Windows: Internet Explorer Blocking Zend Server

IIS Note:

Zend Server CE running with IIS does not provide URL rewrite capabilities. If you require such capabilities (for example, when using Zend Framework based applications that use the default MVC components) refer to the following troubleshooting article.

Installing Zend Server CE

Installing with the Native Windows Installer

The following procedure describes how to install Zend Server CE on Windows using a binary distribution.

Note:

Users of previous versions of Zend Server CE need to shut down and remove their existing Zend Server CE installations manually before installing Zend Server CE. See Section "Upgrading", for more information on upgrading from a previous version.

 

 

Instructions on how to complete a procedure

To install Zend Server CE:

  1. After completing the download, double-click on the .exe file to start the installation process.

  2. There are three installation types available: Typical, Full, and Custom.

    • The Typical installation type installs the most common options and is recommended for most users. The installed components are Zend Optimizer+, Zend Loader, Zend Debugger, Zend Cache, Zend Framework and Oracle OCI Driver.

    • The Full installation type installs all components included in the installation package. The components are  Zend Optimizer+, Zend Loader, Zend Debugger, Zend Cache, Java Server, Zend Framework, Oracle OCI Driver, phpMyAdmin, IBM DB2 RTCL and MySQL. The full installation package requires an Internet connection while running the installation, to download online components.

    • The Custom installation type gives you complete control over which packages you wish to install and the installation path that is used. The components are Zend Optimizer+, Zend Loader, Zend Debugger, Zend Cache, Java Server, Zend Framework, Oracle OCI Driver, phpMyAdmin, IBM DB2 RTCL and MySQL.

  3. Click the NEXT button to advance to the Confirmation dialog.

  4.  If you choose the Custom installation type, click the NEXT button to advance to the "Destination Location" dialog.

  5. Select a Web server on which to install the PHP and the Installation Location. Click the NEXT button to advance to the Select Features dialog.

  6. Select the features to install by double-clicking the check-box next to each feature. A single click on a feature in the list displays a description for the feature. Click the NEXT button to advance to the "Administration Interface Password" screen and from there, to the Confirmation dialog.

  7. The Confirmation Dialog
    Once you choose an installation type and choose your installation components, you advance to the confirmation dialog.
    Your installation type and installation path are displayed for you to review.

  8. To install Zend Server CE (if you are satisfied with your settings), click the INSTALL button. To change your settings, click the BACK button.

  9. To exit the Zend Server CE Installation Wizard without installing Zend Server CE, click the CANCEL button.

  10. The Custom Installation
    The custom installation installs select components and provides an option to choose the Web server on which to install PHP. After confirming the installation, if the port number is already in use, you are asked to specify a different port number. The selected Web server is configured to the port specified after completing the installation.

A browser opens after the installation, to display the Administration Interface's login screen. Use the password you specified in the installation process to log in. If it was selected during the installation, a shortcut is added to your desktop, otherwise, bookmarking the page at this point will help you to easily locate the link.

Installing Additional Components

While running the Installer in custom mode, you can choose not to install certain components. If at any time, you want to add them, save the installation file and re-run in Modify mode or, if you did not keep the Installer file, go to the Control Panel, click Add/Remove programs and select "change" to run the Installer.

Unattended Installation

The following procedure describes how to use an Unattended installation to deploy Zend Server CE on several machines.

 

 

Instructions on how to complete a procedure

To install Zend Server CE:

  1. Download Zend Server CE.

  2. Open the command line from Start | Run.

  3. Run the command <Package_Name>.exe  /r.
    For example: ZendServer-4.0.0RC50-Windows_x86.exe /r

  4. The Installer begins to run in record mode, which displays all the run-time dialog boxes and stores the data in a file called Setup.iss. This file is stored in the system's Windows folder.
    To specify an alternative response file name and location, use the /f1 argument. Using the /f1 argument allows you to specify where the response file is (or where it should be created) and what its name is, as in Setup.exe /s /f1"C:\Temp\Setup.iss". The /f1 switch is available both when creating a response file (with the /r option) and when using a response file (with the /s option).

  5. Take the generated response file and either store it on a location in the network which will be available for all machines or copy the file to each of the machines on which you want to install Zend Server CE.

  6. Go to the new machine and run from the command line Setup.exe /s /f1"C:\Temp\Setup.iss". This will run the Installer in silent mode, by default, based on the responses contained in the response file called Setup.iss. To specify an alternative file name or location of the response file, use the /f1 argument (see step 4, above).

 

Silent Installation

The following procedure describes how to install Zend Server CE in Silent Mode. Silent Mode is when you install Zend Server CE using all the default settings.

Prerequisites: IIS (any version), IIS is listening to port 80, free disk space (at least 180 MB) and preferably without a pre-installed PHP.

 

 

Instructions on how to complete a procedure

To install Zend Server CE:

  1. Download Zend Server CE.

  2. Open the command line from Start | Run.

  3. Run the following command:
    <Package_Name>.exe  /s /z"di"
     for example ZendServer-4.0.0RC50-Windows_x86.exe /s /z"di"

The Installer begins to run in the background and install Zend Server CE using the default settings. If you want to view a progress bar, run the same command without the/s argument. For example: ZendServer-4.0.0RC50-Windows_x86.exe /z"di".

Installed Components

Java Bridge

The Java Bridge is set to run by default and it requires that you have SUN Microsystems JRE 1.4 (or later) installed on your computer. Therefore, if you do not already have JRE installed, install it before using the Java Bridge. The Installer is set to detect your JVM: if you do not have one, the Installer prompts you to identify its location. Clicking NO continues the installation without the Java components. More information about JREs and the latest updates can be found on the Sun Microsystems website: http://java.sun.com.

Locating Installed Components

Zend Server CE installs to the directory: <install_path>\Zend Server.

If you choose to install Apache from the Zend Server CE installation, an additional folder containing your installed Apache is added to the installation path:

<install_path>\Zend Server

<install_path>\Apache2.2

If you choose to install phpMyAdmin from the Zend Server CE installation , an additional folder containing phpMyAdmin is added to the installation path:

<install_path>\Zend Server

<install_path>\phpMyAdmin

Start Menu Options

The Installation Wizard creates a new entry in the Windows START menu under a Zend Server CE menu heading.

The following entries are created within the new START menu section:

  • Change Password - deletes your current password. Clicking this option automatically deletes your password and opens a new password definition page.

  • Help and Reference - Opens the online help in a browser

  • Uninstall - Initiates the Wizard based uninstall process

  • Zend Server CE - Opens the Zend Server CE Administration Interface

  • Zend Control Panel - Opens the Zend Controller

Uninstalling Zend Server CE

The following instructions describe how to uninstall Zend Server CE:

 

 

Instructions on how to complete a procedure

To uninstall:

  1. Use the Windows Control Panel: Start | Control Panel | Add or Remove Programs.

  2. In the Add or Remove Programs dialog, locate and click the Zend Server CE package in the list.

  3. Click "Remove".
    The Installer runs in uninstall mode.

  4. Follow the instructions and click "Finish" to complete the uninstallation process.

This will stop the Zend Server CE services and remove the program, including any additional packages that were installed.

 

 

Related Links

Related Links:

Ports and Services

Upgrading

Installed Components

Parallel Installations

Using PECL