随笔-49  评论-67  文章-27  trackbacks-0
  2005年4月4日
 

    在脚注分割线下方出现一个多余空行,无法删除。

    这时,可以将“视图”转成“普通视图”,双击正文中脚注索引,在普通视图下方会自动出现脚注窗口。或者在“引用”选项板“脚注”中选择“显示备注”,可以达到同样的效果。

    在下拉列表中选择“脚注分隔符”,此时可以对分隔符进行编辑

    此时删除多余回车就可以了。点击“默认设置”可以对脚注分隔符的默认格式进行修改。

posted @ 2010-01-10 01:09 思考 阅读(19785) | 评论 (10)编辑 收藏

这个方法也是在网上看到的,自己总结了一下,方面以后查询。

netsh interface dump > cssl.txt

这样可以在本地目录下生成一个cssl.txt文件。该文件记录了当前网络的配置情况。通过执行如下命令可以应用cssl.txt文件中的网络配置。

netsh exec cssl.txt

这样,可以写一个批处理文件完成网络配置的切换。

posted @ 2008-07-04 13:51 思考 阅读(588) | 评论 (0)编辑 收藏

1、进入命令提示符环境
2、进入DISKPART程序
3、输入AUTOMOUNT ENABLE指令
4、ok,下次USB硬盘放入后就可以像XP一样自动装载了。

posted @ 2008-06-27 16:07 思考 阅读(456) | 评论 (0)编辑 收藏

Windows 2003 server远程桌面连接数限制已经困扰很久了,给平时的维护带来麻烦。既然微软不会从根本上解决这个问题,那只有通过其他方式来减少问题的发生几率。

一、在服务器端的处理办法如下
1. 设定已经断开的会话结束时间限制,这样避免会话已经断开,但仍然占用一个Session

开始-运行-gpedit.msc-计算机配置-管理模板-windows组件-终端服务-会话,右边窗口选择"为断开的会话设置时间限制"-选择"已启用",选择一个时间;

开始-运行-gpedit.msc-计算机配置-管理模板-windows组件-终端服务-会话,右边窗口选择"到达时间限制时终止会话"-选择"已启用"。

2. 无限时保持连接会话,便于远程控制共享任意时候连接会话的数据,也就是共享任意时候连接的远程桌面的当时状态:

开始-管理工具-终端服务配置-服务器配置-限制每个用户使用一个会话

3. 养成良好习惯,退出连接时不要直接关闭,而是使用注销。

二、如果已经有多个连接存在
1 可以通过命令的方式将连接断开,这个方法在2000系统同样可用;如果在任务管理器的用户里注销的方法:

1.1 在Command Line模式下,输入命令query user:

C:\>query user

USERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME

>dfsadmin 0 Disc . 7/23/2007 7:53 PM

mrsadmin rdp-tcp#10 1 Active . 7/24/2007 9:31 AM

ID 0的用户是本地登陆的,ID 1是3389登陆的用户,正在运行中,但是仍然占用系统资源和通道,我们要把它踢掉。

1.2 可通过logoff x命令来注销id为x的登录用户。输入命令:logoff 1,再用query user查询状态

C:\>logoff 1

C:\>query user

USERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME

>dfsadmin 0 Disc none 7/23/2007 7:53 PM

三、如果连接已经受限制
此时通过远程登录,可以用一个"3389DOS版"软件来进行牵制登录。这个软件只能解决windows2003系统的限制,2000系统也没办法。

四、超过最大连接时连接
在超过最大连接数时,通过运行mstsc /v:IP /console命令就可以连接到远程系统的会话。

MSTSC [<Connection File>] [/v:<sever[:port]>] [/console] [/f[ullscreen]]

[/w:<width>/h:<height>] | /Edit"ConnectionFile" | /Migrate | /?

<Connection File>-- 指定连接的.rdp 文件的名称。

/v:<sever[:port]>-- 指定要连接到的终端服务器。

/console -- 连接到服务器的控制台会话。

/f -- 以全屏模式启动客户端。

/w: <width>-- 指定远程桌面屏幕的宽度。

/h:<height>-- 指定远程桌面屏幕的亮度。

/edit -- 打开指定的.rdp 文件来编辑。

/migrate -- 将客户端连接管理器创建的旧版连接文件迁移到新的.rdp 连接文件。

/? -- 生成这个用法消息。

posted @ 2008-06-27 16:07 思考 阅读(16667) | 评论 (0)编辑 收藏

tracert命令

C:\Documents and Settings\Administrator>tracert /?

Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout]
[-R] [-S srcaddr] [-4] [-6] target_name

Options:
-d Do not resolve addresses to hostnames.
-h maximum_hops Maximum number of hops to search for target.
-j host-list Loose source route along host-list (IPv4-only).
-w timeout Wait timeout milliseconds for each reply.
-R Trace round-trip path (IPv6-only).
-S srcaddr Source address to use (IPv6-only).
-4 Force using IPv4.
-6 Force using IPv6.

说明

tracert(跟踪路由)是路由跟踪公用程序,用于确定 IP 数据包访问目标所采取的路径。Tracert 命令用 IP 生存时间 (TTL) 字段和 ICMP错误消息来确定从一个主机到网路上其它主机的路由。

Tracert 工作原理

透过向目标发送不同 IP 生存时间 (TTL) 值的"Internet 控制消息协议 (ICMP)"回
应数据包,Tracert 诊断程序确定到目标所采取的路由。要求路径上的每个路由器在转
发数据包之前至少将数据包上的 TTL 递减 1。数据包上的 TTL 减为 0 时,路由器应
该将"ICMP已超时"的消息发回源系统。

Tracert 先发送 TTL 为 1 的响应数据包,并在随后的每次发送过程将 TTL 递增1,直
到目标响应或 TTL 达到最大值,从而确定路由。透过检查中间路由器发回的"ICMP已
超时"的消息确定路由。某些路由器不经询问直接丢弃 TTL 过期的数据包,这在Trac
ert 公用程序中看不到。

posted @ 2008-06-27 16:07 思考 阅读(381) | 评论 (0)编辑 收藏

id命令

显示用户信息

oracle:~ # id

uid=0(root) gid=0(root) groups=0(root)

oracle:~ # id esecadm

uid=1000(esecadm) gid=1000(esec) groups=1000(esec),16(dialout),33(video)

groups命令

显示组信息

oracle:~ # groups

root

oracle:~ # groups esecadm

esecadm : esec dialout video

finger命令

显示用户信息

oracle:~ # finger

Login Name Tty Idle Login Time Where

root root pts/0 - Sat 22:16 192.168.100.1

oracle:~ # finger esecadm

Login: esecadm Name:

Directory: /export/home/esecadm Shell: /bin/bash

Never logged in.

No Mail.

No Plan.

oracle:~ # finger root

Login: root Name: root

Directory: /root Shell: /bin/bash

On since Sat Jun 21 22:16 (CST) on pts/0 from 192.168.100.1

New mail received Sat Jun 21 22:09 2008 (CST)

Unread since Fri Jun 20 09:21 2008 (CST)

No Plan.

/etc/paswd

所有用户的信息都存放在该文件中。该文件中每行都代表以该用户,每行的格式如下图所示。因为该文件是所有用户都可以读的,为了系统安全,将用户的口令信息放置在另一文件中。

/etc/shadow

该文件中存放有加密的用户口令信息,并且该文件只有root可读的。

如果用户口令字段是空、*或者!,说明用户不能登录系统。需要通过passwd给用户提供密码,这时用户才能登录系统。

ssh登录

默认情况下,只有root用户可以通过ssh远程登录系统。为了使其它用户登录,需要修改/etc/ssh/sshd_config文件。在文件中加入下面一行:

AllowUsers root esecadm

后面可以跟若干用户,其间用空格分开。

posted @ 2008-06-22 01:52 思考 阅读(2678) | 评论 (0)编辑 收藏

Sentinel 6安装

Sentinel有两种安装方式,一种是通过命令行的方式,一种是通过GUI的方式。本文主要介绍以命令行方式安装Sentinel 6的方法。

首先,在命令行中输入setup.sh -console,则打开安装程序。

oracle:/media/cdrom # ./setup.sh -console

Installing Sentinel Suite in console mode ...

安装程序首先启动JVM装载安装程序。这里需要等待一段时间。

Initializing Wizard........

Launching InstallShield Wizard........

紧接着是选择安装语言,默认是英文。

----------------------------------------------------------------------------

Select a language to be used for this wizard.

[X] 1 - English

[ ] 2 - French

[ ] 3 - German

[ ] 4 - Italian

[ ] 5 - Portuguese (Brazil)

[ ] 6 - Spanish

[ ] 7 - Simplified Chinese

[ ] 8 - Traditional Chinese

[ ] 9 - Japanese

To select an item enter its number, or 0 when you are finished: [0]

下面英文界面的安装向导将出现,回车继续安装。

----------------------------------------------------------------------------

Sentinel 6 - InstallShield Wizard

Welcome to the InstallShield Wizard for Sentinel 6

The InstallShield Wizard will install Sentinel 6 on your computer.

To continue, choose Next.

Sentinel 6

Novell, Inc.

www.Novell.com

Press 1 for Next, 3 to Cancel or 5 to Redisplay [1]

接下来是安装向导提示的Sentinel 6的许可证信息,选择q退出阅读即可。

----------------------------------------------------------------------------

Sentinel 6 - InstallShield Wizard

Please read the following license agreement carefully.

Novell Sentinel 6

Novell Sentinel 6.0

Novell Software License Agreement

PLEASE READ THIS AGREEMENT CAREFULLY. BY INSTALLING, DOWNLOADING OR OTHERWISE

USING THE SOFTWARE, YOU AGREE TO THE TERMS OF THIS AGREEMENT. IF YOU DO NOT

AGREE WITH THESE TERMS, DO NOT DOWNLOAD, INSTALL OR USE THE SOFTWARE. THE

SOFTWARE MAY NOT BE SOLD, TRANSFERRED, OR FURTHER DISTRIBUTED EXCEPT AS

AUTHORIZED BY NOVELL.

This Novell Software License Agreement (Agreement) is a legal agreement between

You (an entity or a person) and Novell, Inc. (Novell). The software product

Press ENTER to read the text [Type q to quit] q

接下来,选择1,回车,同意该许可信息。再按回车继续。

Please choose from the following options:

[ ] 1 - I accept the terms of the license agreement.

[X] 2 - I do not accept the terms of the license agreement.

To select an item enter its number, or 0 when you are finished: [0] 1

[X] 1 - I accept the terms of the license agreement.

[ ] 2 - I do not accept the terms of the license agreement.

To select an item enter its number, or 0 when you are finished: [0]

Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1]

紧接着安装向导提示选择Sentinel 6的安装位置。

----------------------------------------------------------------------------

Sentinel 6 - InstallShield Wizard

Sentinel 6 Install Location

Please specify a directory or press Enter to accept the default directory.

Destination Directory [/opt/novell/sentinel6]

Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1]

接下来选择Sentinel的安装方式。因为这里我们只是用作测试,并安装在虚拟机上,因此选择简单方式。这时,Sentinel的所有组件将被安装在同一台电脑上。

-------------------------------------------------------------------------------

Sentinel 6 - InstallShield Wizard

Choose the installation type that best suits your needs.

[ ] 1 - Simple

All-In-One easy installation.

[X] 2 - Custom

Allows the user to configure a custom installation.

Select the number corresponding to the type of install you would like. Enter 0

to continue: [0]1

[X] 1 - Simple

All-In-One easy installation.

[ ] 2 - Custom

Allows the user to configure a custom installation.

Select the number corresponding to the type of install you would like. Enter 0

to continue: [0]

Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1]

输入Sentinel 6的安装序列号:12345678和许可证:19c3d24adc1df104。输入后,系统会提示这是一个临时许可证,将在2009年5月31日过期。

----------------------------------------------------------------------------

Sentinel 6 - InstallShield Wizard

Serial Number: [] 12345678

License Key: [] 19c3d24adc1df104

You have entered a temporary license key. If a new license key is not provided,

this software will automatically disable itself after the expiration date :

'5/31/09'

[OK]

紧接着系统会询问SMTP服务器和发送邮件的邮件地址信息,默认是本地的SMTP服务器和esecadm。

SMTP Server: [localhost]

E-mail: [esecadm]

下面将询问是否安装Advisor,这里我们不进行安装。

Do you wish to install 'Advisor'?

1. Yes

2. No

Enter one of the options above: [2]

之后,系统会提示输入全局系统口令。其中包括Sentinel管理员用户和数据库用户的口令。并制定数据库用户的用户名,默认是oracle。

Global System Password (used for all Sentinel users)

Password:

Confirm Password:

Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1]

Specify the Oracle username [oracle]

Specify the Oracle username

[OK]

选择已经安装的Oracle版本,选择2并继续。

----------------------------------------------------------------------------

Sentinel 6 - InstallShield Wizard

Select the target database server platform:

1. Oracle 9i

2. Oracle 10g

Enter one of the options above: [1] 2

Oracle JDBC Driver File: [] /opt/oracle/product/10gR2/db/jdbc/lib/ojdbc14.jar

Database Name: [ESEC]

Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1]

接下来将显示前面配置的Oracle安装信息。

----------------------------------------------------------------------------

Sentinel 6 - InstallShield Wizard

Oracle Configuration

SUMMARY

An Oracle database will be created with the following parameters

A new instance will be created named: ESEC.

This database will have a total size of: 10000 MB.

Data file locations are as follows

Data Files: /opt/novell/sentinel6/database

Index Files: /opt/novell/sentinel6/database

Summary Data Files: /opt/novell/sentinel6/database

Summary Index Files: /opt/novell/sentinel6/database

Temporary Files: /opt/novell/sentinel6/database

Redo Logs A: /opt/novell/sentinel6/database

Redo Logs B: /opt/novell/sentinel6/database

The database will listen on port: 1521

The database will use 256 MB of system memory.

The schema will be owned by: esecdba

The application user will be: esecapp

The Sentinel Administrator will be: esecadm

Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1]

接下来,将显示Sentinel 6的安装信息,回车继续。

----------------------------------------------------------------------------

Sentinel 6 - InstallShield Wizard

Sentinel 6 will be installed in the following location:

/opt/novell/sentinel6

with the following features:

Database

Sentinel Services

Communication Server

Correlation Engine

Data Access Server

Sentinel Collector Service

Applications

Sentinel Control Center

Sentinel Data Manager

for a total size:

460.2 MB

Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1]

系统收集完上述信息之后将进行安装,下面是安装时的显示信息。安装时间比较长,跟机器的性能有关。在我的电脑上安装大概进行了40分钟,包括数据库、分区和Sentinel产品各组件的安装。

----------------------------------------------------------------------------

Sentinel 6 - InstallShield Wizard

Installing Sentinel Database. Please wait...

----------------------------------------------------------------------------

Sentinel 6 - InstallShield Wizard

Adding enough partitions for '10' days. Please wait...

----------------------------------------------------------------------------

Sentinel 6 - InstallShield Wizard

Installing Sentinel 6. Please wait...

|-----------|-----------|-----------|------------|

0% 25% 50% 75% 100%

||||||||||||||||||||||||||||||||||||||||||||||||||

Creating uninstaller...

Finalizing the Vital Product Data Registry. Please wait...

----------------------------------------------------------------------------

Sentinel 6 - InstallShield Wizard

Setting JVM permissions...

|-----------|-----------|-----------|------------|

0% 25% 50% 75% 100%

||||||||||||||||||||||||||||||||||||||||||||||||||

----------------------------------------------------------------------------

Sentinel 6 - InstallShield Wizard

Installing Sentinel Communication Server. Please wait...

|-----------|-----------|-----------|------------|

0% 25% 50% 75% 100%

||||||||||||||||||||||||||||||||||||||||||||||||||

----------------------------------------------------------------------------

Sentinel 6 - InstallShield Wizard

Installing Sentinel Communication Server. Please wait...

|-----------|-----------|-----------|------------|

0% 25% 50% 75% 100%

||||||||||||||||||||||||||||||||||||||||||||||||||

----------------------------------------------------------------------------

Sentinel 6 - InstallShield Wizard

Setting permissions on installed files...

|-----------|-----------|-----------|------------|

0% 25% 50% 75% 100%

||||||||||||||||||||||||||||||||||||||||||||||||||

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

Updating container configuration file. Please wait...

----------------------------------------------------------------------------

Sentinel 6 - InstallShield Wizard

Setting permissions on installed files...

|-----------|-----------|-----------|------------|

0% 25% 50% 75% 100%

||||||||||||||||||||||||||||||||||||||||||||||||||

----------------------------------------------------------------------------

Sentinel 6 - InstallShield Wizard

Setting permissions on installed files...

|-----------|-----------|-----------|------------|

0% 25% 50% 75% 100%

||||||||||||||||||||||||||||||||||||||||||||||||||

----------------------------------------------------------------------------

Sentinel 6 - InstallShield Wizard

The InstallShield Wizard has successfully installed Sentinel 6. Choose Finish

to exit the wizard.

Press 3 to Finish or 5 to Redisplay [3]

最后,系统提示需要重新启动系统才能完成安装。

----------------------------------------------------------------------------

Sentinel 6 - InstallShield Wizard

The wizard requires that you logout and log back in. To start Sentinel 6

processes, reboot the machine or log back in and start them manually.

Press 3 to Finish or 5 to Redisplay [3]

Sentinel数据库安装好了之后,会在系统中创建如下用户:

esecdba:数据库Schema所有者,出于安全考虑,该用户并未授予数据库DBA的特权

esecapp:数据库应用程序用户,该用户用来连接数据库

esecadm:Sentinel管理员的数据库用户,该用户不同于Sentinel管理员的操作系统用户

esecrpt:数据库报告用户

posted @ 2008-06-21 20:24 思考 阅读(492) | 评论 (0)编辑 收藏

安装SLES 10 x86_64

分区时使用Ext3文件系统;

选择软件包时,选择"Oracle Server Base"和"C/C++ Compiler and Tools",同时保证选择了"32Bit Runtime Environment";下面是软件包选择的一个截图。

安装SLES 10的Server Pack

使用SPident或者"cat /etc/SuSE-release"来校验

oracle:~ # cat /etc/SuSE-release

SUSE Linux Enterprise Server 10 (x86_64)

VERSION = 10

PATCHLEVEL = 2

oracle:~ # SPident -v

Summary (using 890 packages)

Product/ServicePack conflict match update (shipped)

SLE-10-x86_64 0 0% 325 36.5% 0 (2754 11.8%)

SLE-10-x86_64-SP1 0 0% 470 52.8% 0 (2938 16.0%)

SLE-10-x86_64-SP2 0 0% 889 99.9% 0 (2337 38.0%)

Unknown 1 0.1%

CONCLUSION: System is up-to-date!

found SLE-10-x86_64-SP2

Oracle安装先决条件

SuSE提供了orarun来自动完成很多Oracle预安装的任务。为了下面安装Oracle,需要进行如下配置。

激活oracle用户

在安装了Oracle Server Base之后,系统就自动创建了oracle用户。但是,默认的该用户是被禁用了的。

oracle:~ # vim /etc/passwd

oracle:x:103:106:Oracle user:/opt/oracle:/bin/false

为此,我们需要激活该用户。手工编辑/etc/passwd文件:

oracle:x:103:106:Oracle user:/opt/oracle:/bin/bash

修改oracle用户口令

oracle:~ # passwd oracle

Changing password for oracle.

New Password:

Bad password: too simple

Reenter New Password:

Password changed.

修改Oracle环境变量

编辑/etc/profile.d/oracle.sh文件中Oracle的环境变量如下:

oracle:~ # vim /etc/profile.d/oracle.sh

# ORACLE_HOME=$ORACLE_BASE/product/10.2/db_1

ORACLE_HOME=$ORACLE_BASE/product/10gR2/db

ORACLE_SID=ESEC

修改ORACLE_HOME和ORACLE_SID环境变量。

设置内核参数

运行rcoracle start命令设置内核参数。因为还没有安装Oracle数据库,忽略期间报的错误。

oracle:~ # rcoracle start

#############################################################################

# Begin of O R A C L E startup section #

#############################################################################

Oracle Database Software not yet installed!

SETTINGS start from /etc/sysconfig/oracle

- Set Kernel Parameters for Oracle: yes

- Start Oracle Listener: no

- Start Oracle Database: no

- Start Oracle Webserver: no

- Start Oracle EManager: no

- Start Oracle iSQLPLUS Manager: no

- Start Oracle Agent: no

- Start Oracle Internet Filesystem: no

- Start Oracle Directory Manager: no

Oracle Agent undefinied or not properly set. Please check.

Setting kernel parameters for Oracle, see file

/etc/sysconfig/oracle for explanations.

Shared memory: SHMMAX=3294967296 SHMMNI=4096 SHMALL=2097152

Semaphore values: SEMMSL=1250 SEMMNS=32000 SEMOPM=100 SEMMNI=256

Other values: FILE_MAX_KERNEL=131072 IP_LOCAL_PORT_RANGE=1024 65000

RMEM_DEFAULT=4194304 WMEM_DEFAULT=262144 RMEM_MAX=4194304 WMEM_MAX=262144

Huge Pages: SHM_GROUP=dba NR_HUGE_PAGES=0

ULIMIT values: MAX_CORE_FILE_SIZE_SHELL=unlimited

FILE_MAX_SHELL=65536 PROCESSES_MAX_SHELL=16384

Kernel parameters set for Oracle: done

- Starting Listener... unused

+ Starting Database(s)...

unused

- Starting Apache... unused

- Starting Application Server... unused

- Starting Application Server Console... unused

- Starting Agent... unused

- Starting Enterprise Manager... unused

- Starting iSQLPLUS Manager... unused

- Starting Oracle Internet Filesystem... unused

- Starting Oracle Internet Directory... unused

#############################################################################

# End of O R A C L E section #

#############################################################################

检验oracle用户

oracle:~ # su oracle

oracle@oracle:/root> id

uid=103(oracle) gid=106(oinstall) groups=106(oinstall),107(dba)

安装Oracle 10g

解压Oracle软件

#gunzip 10201_database_linux_x86_64.cpio.gz

#cpio -idmv < 10201_database_linux_x86_64.cpio

安装Oracle 10g SP2

确保使用oracle用户登录系统,必须使用图形界面进行安装。为了在SuSE 10上安装Oracle 10g,必须手工修改安装配置文件,以确保Oracle支持SuSE 10系统。在Oracle安装文件路径下编辑文件:

vim install/oraparam.ini

[Certified Versions]

Linux=redhat-3,SuSE-9,SuSE-10,redhat-4,UnitedLinux-1.0,asianux-1,asianux-2

选择高级安装

选择默认的Inventory目录

选择安装企业版

在安装之前,Oracle会检查系统设置灯信息是否符合要求。我们将检查未成功的选择为"User Verified"。

选择"Install database Software only"

查看安装概要并选择安装

下面是安装进程。

在安装结束之前,系统会提示使用root用户登录,执行下面脚本。

使用另一个窗口登录,执行脚本。

选择"Exit"完成安装。

安装补丁

在Novell官方的文档中,Sentinel需要Oracle安装补丁10.2.0.3。从metalink网站上下载Oracle的补丁p5337014_10203_Linux-x86-64.zip。该补丁有1G多,而且下载时需要metalink的帐号才能下载。

下载后解压,并确保使用oracle用户运行Disk1中的runInstaller进行安装。跟安装Oracle 10g时一样,安装程序首先要检查系统兼容性,为了在SLES 10上安装,需要修改配置文件,使之支持在SuSE 10上的安装。修改方法与Oracle 10g安装时的一样。

下图是安装时的欢迎界面。

首先现在Oracle 10g的安装目录。

接下来,是安装的信息。确认后执行安装。

下图是安装进度。

安装结束前,提示需要用户以root身份手工执行root.sh脚本。

打开另一个窗口,执行ORACLE_HOME目录下的root.sh脚本。

执行完脚本后,点击"OK",系统提示完成补丁安装,点击"Exit"退出系统安装。

应用关键补丁

下面,需要通过opatch工具安装Oracle的关键补丁。同样,首先从metalink网站上下载补丁:p5881721_10203_Linux-x86-64.zip并解压。请确保使用oralce用户进行下面的操作。

进入5881721目录,运行$ORACLE_HOME/OPatch/opatch apply -local。下图是安装过程。

输入y之后继续安装。

y

User Responded with: Y

Backing up files and inventory (not for auto-rollback) for the Oracle Home

Backing up files affected by the patch '5881721' for restore. This might take a while...

Backing up files affected by the patch '5881721' for rollback. This might take a while...

Execution of 'sh /mnt/hgfs/oracle/Oracle10g/Linux/patch/p5881721_10203_Linux-x86-64/5881721/custom/scripts/pre -apply 5881721 ':

Return Code = 0

Patching component oracle.sysman.repository.core, 10.2.0.3.0a...

Updating jar file "/opt/oracle/product/10gR2/db/sysman/jlib/emDB.jar" with "/sysman/jlib/emDB.jar/oracle/sysman/emo/util/DBVerify.class"

Updating jar file "/opt/oracle/product/10gR2/db/sysman/jlib/emDB.jar" with "/sysman/jlib/emDB.jar/oracle/sysman/emo/util/dbclone/DBCloneObject.class"

Updating jar file "/opt/oracle/product/10gR2/db/sysman/jlib/emDB.jar" with "/sysman/jlib/emDB.jar/oracle/sysman/emo/util/dbclone/DBCloneVerify.class"

Patching component oracle.sysman.bsln, 10.2.0.3.0...

Updating jar file "/opt/oracle/product/10gR2/db/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/emSDK/chart/EmChartBean.class"

Updating jar file "/opt/oracle/product/10gR2/db/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/emSDK/svlt/RedirectServlet.class"

Patching component oracle.sysman.agent.core, 10.2.0.3.0a...

Updating archive file "/opt/oracle/product/10gR2/db/sysman/lib32/libnmem.a" with "sysman/lib32/libnmem.a/nmemdisp.o"

Updating archive file "/opt/oracle/product/10gR2/db/sysman/lib32/libnmexml.a" with "sysman/lib32/libnmexml.a/nmex.o"

Updating archive file "/opt/oracle/product/10gR2/db/sysman/lib32/libnmehl.a" with "sysman/lib32/libnmehl.a/nmehl.o"

Patching component oracle.rdbms, 10.2.0.3.0...

Updating archive file "/opt/oracle/product/10gR2/db/lib/libserver10.a" with "lib/libserver10.a/qmurd.o"

Copying file to "/opt/oracle/product/10gR2/db/cpu/CPUJan2007/catcpu.sql"

Copying file to "/opt/oracle/product/10gR2/db/cpu/CPUJan2007/catcpu_rollback.sql"

ApplySession adding interim patch '5881721' to inventory

Verifying the update...

Inventory check OK: Patch ID 5881721 is registered in Oracle Home inventory with proper meta-data.

Files check OK: Files from Patch ID 5881721 are present in Oracle Home.

--------------------------------------------------------------------------------****************************************************************************************************************************************************************** ATTENTION **** **** Please note that the Security Patch Installation (Patch Deinstallation) is **** not complete until all the Post Installation (Post Deinstallation) **** instructions noted in the Readme accompanying this patch, have been **** successfully completed. **** ******************************************************************************************************************************************************************

--------------------------------------------------------------------------------

Execution of 'sh /mnt/hgfs/oracle/Oracle10g/Linux/patch/p5881721_10203_Linux-x86-64/5881721/custom/scripts/post -apply 5881721 ':

Return Code = 0

Running make for target libnmemso

Running make for target ioracle

The local system has been patched and can be restarted.

OPatch succeeded.

最后,通过$ORACLE_HOME/OPatch/opatch lsinventory命令进行补丁状态检查。

oracle@oracle:/mnt/hgfs/oracle/Oracle10g/Linux/patch/p5881721_10203_Linux-x86-64/5881721> /opt/oracle/product/10gR2/db/OPatch/opatch lsinventory

Invoking OPatch 10.2.0.3.0

Oracle interim Patch Installer version 10.2.0.3.0

Copyright (c) 2005, Oracle Corporation. All rights reserved..

Oracle Home : /opt/oracle/product/10gR2/db

Central Inventory : /opt/oracle/oraInventory

from : /etc/oraInst.loc

OPatch version : 10.2.0.3.0

OUI version : 10.2.0.3.0

OUI location : /opt/oracle/product/10gR2/db/oui

Log file location : /opt/oracle/product/10gR2/db/cfgtoollogs/opatch/opatch2008-06-20_14-33-53PM.log

Lsinventory Output file location : /opt/oracle/product/10gR2/db/cfgtoollogs/opatch/lsinv/lsinventory2008-06-20_14-33-53PM.txt

--------------------------------------------------------------------------------Installed Top-level Products (2):

Oracle Database 10g 10.2.0.1.0

Oracle Database 10g Release 2 Patch Set 2 10.2.0.3.0

There are 2 products installed in this Oracle Home.

Interim patches (3) :

Patch 5881721 : applied on Fri Jun 20 14:26:08 GMT+08:00 2008

Created on 19 Feb 2007, 02:16:34 hrs US/Pacific

Bugs fixed:

5885186, 5881721

Patch 5556081 : applied on Fri Jun 20 11:51:55 GMT+08:00 2008

Created on 9 Nov 2006, 22:20:50 hrs PST8PDT

Bugs fixed:

5556081

Patch 5557962 : applied on Fri Jun 20 11:51:46 GMT+08:00 2008

Created on 9 Nov 2006, 23:23:06 hrs PST8PDT

Bugs fixed:

4269423, 5557962, 5528974

--------------------------------------------------------------------------------

OPatch succeeded.

如果成功,将出现"OPatch succeeded."字样。

至此,针对Sentinel 6的Oracle安装已经完成。接下来就是进行Sentinel产品的安装。

安装SLES 10的Server Pack

使用SPident或者"cat /etc/SuSE-release"来校验

oracle:~ # cat /etc/SuSE-release

SUSE Linux Enterprise Server 10 (x86_64)

VERSION = 10

PATCHLEVEL = 2

oracle:~ # SPident -v

Summary (using 890 packages)

Product/ServicePack conflict match update (shipped)

SLE-10-x86_64 0 0% 325 36.5% 0 (2754 11.8%)

SLE-10-x86_64-SP1 0 0% 470 52.8% 0 (2938 16.0%)

SLE-10-x86_64-SP2 0 0% 889 99.9% 0 (2337 38.0%)

Unknown 1 0.1%

CONCLUSION: System is up-to-date!

found SLE-10-x86_64-SP2

Oracle安装先决条件

SuSE提供了orarun来自动完成很多Oracle预安装的任务。为了下面安装Oracle,需要进行如下配置。

激活oracle用户

在安装了Oracle Server Base之后,系统就自动创建了oracle用户。但是,默认的该用户是被禁用了的。

oracle:~ # vim /etc/passwd

oracle:x:103:106:Oracle user:/opt/oracle:/bin/false

为此,我们需要激活该用户。手工编辑/etc/passwd文件:

oracle:x:103:106:Oracle user:/opt/oracle:/bin/bash

修改oracle用户口令

oracle:~ # passwd oracle

Changing password for oracle.

New Password:

Bad password: too simple

Reenter New Password:

Password changed.

修改Oracle环境变量

编辑/etc/profile.d/oracle.sh文件中Oracle的环境变量如下:

oracle:~ # vim /etc/profile.d/oracle.sh

# ORACLE_HOME=$ORACLE_BASE/product/10.2/db_1

ORACLE_HOME=$ORACLE_BASE/product/10gR2/db

ORACLE_SID=ESEC

修改ORACLE_HOME和ORACLE_SID环境变量。

设置内核参数

运行rcoracle start命令设置内核参数。因为还没有安装Oracle数据库,忽略期间报的错误。

oracle:~ # rcoracle start

#############################################################################

# Begin of O R A C L E startup section #

#############################################################################

Oracle Database Software not yet installed!

SETTINGS start from /etc/sysconfig/oracle

- Set Kernel Parameters for Oracle: yes

- Start Oracle Listener: no

- Start Oracle Database: no

- Start Oracle Webserver: no

- Start Oracle EManager: no

- Start Oracle iSQLPLUS Manager: no

- Start Oracle Agent: no

- Start Oracle Internet Filesystem: no

- Start Oracle Directory Manager: no

Oracle Agent undefinied or not properly set. Please check.

Setting kernel parameters for Oracle, see file

/etc/sysconfig/oracle for explanations.

Shared memory: SHMMAX=3294967296 SHMMNI=4096 SHMALL=2097152

Semaphore values: SEMMSL=1250 SEMMNS=32000 SEMOPM=100 SEMMNI=256

Other values: FILE_MAX_KERNEL=131072 IP_LOCAL_PORT_RANGE=1024 65000

RMEM_DEFAULT=4194304 WMEM_DEFAULT=262144 RMEM_MAX=4194304 WMEM_MAX=262144

Huge Pages: SHM_GROUP=dba NR_HUGE_PAGES=0

ULIMIT values: MAX_CORE_FILE_SIZE_SHELL=unlimited

FILE_MAX_SHELL=65536 PROCESSES_MAX_SHELL=16384

Kernel parameters set for Oracle: done

- Starting Listener... unused

+ Starting Database(s)...

unused

- Starting Apache... unused

- Starting Application Server... unused

- Starting Application Server Console... unused

- Starting Agent... unused

- Starting Enterprise Manager... unused

- Starting iSQLPLUS Manager... unused

- Starting Oracle Internet Filesystem... unused

- Starting Oracle Internet Directory... unused

#############################################################################

# End of O R A C L E section #

#############################################################################

检验oracle用户

oracle:~ # su oracle

oracle@oracle:/root> id

uid=103(oracle) gid=106(oinstall) groups=106(oinstall),107(dba)

安装Oracle 10g

解压Oracle软件

#gunzip 10201_database_linux_x86_64.cpio.gz

#cpio -idmv < 10201_database_linux_x86_64.cpio

安装Oracle 10g SP2

确保使用oracle用户登录系统,必须使用图形界面进行安装。为了在SuSE 10上安装Oracle 10g,必须手工修改安装配置文件,以确保Oracle支持SuSE 10系统。在Oracle安装文件路径下编辑文件:

vim install/oraparam.ini

[Certified Versions]

Linux=redhat-3,SuSE-9,SuSE-10,redhat-4,UnitedLinux-1.0,asianux-1,asianux-2

选择高级安装

选择默认的Inventory目录

选择安装企业版

在安装之前,Oracle会检查系统设置灯信息是否符合要求。我们将检查未成功的选择为"User Verified"。

选择"Install database Software only"

查看安装概要并选择安装

下面是安装进程。

在安装结束之前,系统会提示使用root用户登录,执行下面脚本。

使用另一个窗口登录,执行脚本。

选择"Exit"完成安装。

安装补丁

在Novell官方的文档中,Sentinel需要Oracle安装补丁10.2.0.3。从metalink网站上下载Oracle的补丁p5337014_10203_Linux-x86-64.zip。该补丁有1G多,而且下载时需要metalink的帐号才能下载。

下载后解压,并确保使用oracle用户运行Disk1中的runInstaller进行安装。跟安装Oracle 10g时一样,安装程序首先要检查系统兼容性,为了在SLES 10上安装,需要修改配置文件,使之支持在SuSE 10上的安装。修改方法与Oracle 10g安装时的一样。

下图是安装时的欢迎界面。

首先现在Oracle 10g的安装目录。

接下来,是安装的信息。确认后执行安装。

下图是安装进度。

安装结束前,提示需要用户以root身份手工执行root.sh脚本。

打开另一个窗口,执行ORACLE_HOME目录下的root.sh脚本。

执行完脚本后,点击"OK",系统提示完成补丁安装,点击"Exit"退出系统安装。

应用关键补丁

下面,需要通过opatch工具安装Oracle的关键补丁。同样,首先从metalink网站上下载补丁:p5881721_10203_Linux-x86-64.zip并解压。请确保使用oralce用户进行下面的操作。

进入5881721目录,运行$ORACLE_HOME/OPatch/opatch apply -local。下图是安装过程。

输入y之后继续安装。

y

User Responded with: Y

Backing up files and inventory (not for auto-rollback) for the Oracle Home

Backing up files affected by the patch '5881721' for restore. This might take a while...

Backing up files affected by the patch '5881721' for rollback. This might take a while...

Execution of 'sh /mnt/hgfs/oracle/Oracle10g/Linux/patch/p5881721_10203_Linux-x86-64/5881721/custom/scripts/pre -apply 5881721 ':

Return Code = 0

Patching component oracle.sysman.repository.core, 10.2.0.3.0a...

Updating jar file "/opt/oracle/product/10gR2/db/sysman/jlib/emDB.jar" with "/sysman/jlib/emDB.jar/oracle/sysman/emo/util/DBVerify.class"

Updating jar file "/opt/oracle/product/10gR2/db/sysman/jlib/emDB.jar" with "/sysman/jlib/emDB.jar/oracle/sysman/emo/util/dbclone/DBCloneObject.class"

Updating jar file "/opt/oracle/product/10gR2/db/sysman/jlib/emDB.jar" with "/sysman/jlib/emDB.jar/oracle/sysman/emo/util/dbclone/DBCloneVerify.class"

Patching component oracle.sysman.bsln, 10.2.0.3.0...

Updating jar file "/opt/oracle/product/10gR2/db/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/emSDK/chart/EmChartBean.class"

Updating jar file "/opt/oracle/product/10gR2/db/sysman/jlib/emCORE.jar" with "/sysman/jlib/emCORE.jar/oracle/sysman/emSDK/svlt/RedirectServlet.class"

Patching component oracle.sysman.agent.core, 10.2.0.3.0a...

Updating archive file "/opt/oracle/product/10gR2/db/sysman/lib32/libnmem.a" with "sysman/lib32/libnmem.a/nmemdisp.o"

Updating archive file "/opt/oracle/product/10gR2/db/sysman/lib32/libnmexml.a" with "sysman/lib32/libnmexml.a/nmex.o"

Updating archive file "/opt/oracle/product/10gR2/db/sysman/lib32/libnmehl.a" with "sysman/lib32/libnmehl.a/nmehl.o"

Patching component oracle.rdbms, 10.2.0.3.0...

Updating archive file "/opt/oracle/product/10gR2/db/lib/libserver10.a" with "lib/libserver10.a/qmurd.o"

Copying file to "/opt/oracle/product/10gR2/db/cpu/CPUJan2007/catcpu.sql"

Copying file to "/opt/oracle/product/10gR2/db/cpu/CPUJan2007/catcpu_rollback.sql"

ApplySession adding interim patch '5881721' to inventory

Verifying the update...

Inventory check OK: Patch ID 5881721 is registered in Oracle Home inventory with proper meta-data.

Files check OK: Files from Patch ID 5881721 are present in Oracle Home.

--------------------------------------------------------------------------------****************************************************************************************************************************************************************** ATTENTION **** **** Please note that the Security Patch Installation (Patch Deinstallation) is **** not complete until all the Post Installation (Post Deinstallation) **** instructions noted in the Readme accompanying this patch, have been **** successfully completed. **** ******************************************************************************************************************************************************************

--------------------------------------------------------------------------------

Execution of 'sh /mnt/hgfs/oracle/Oracle10g/Linux/patch/p5881721_10203_Linux-x86-64/5881721/custom/scripts/post -apply 5881721 ':

Return Code = 0

Running make for target libnmemso

Running make for target ioracle

The local system has been patched and can be restarted.

OPatch succeeded.

最后,通过$ORACLE_HOME/OPatch/opatch lsinventory命令进行补丁状态检查。

oracle@oracle:/mnt/hgfs/oracle/Oracle10g/Linux/patch/p5881721_10203_Linux-x86-64/5881721> /opt/oracle/product/10gR2/db/OPatch/opatch lsinventory

Invoking OPatch 10.2.0.3.0

Oracle interim Patch Installer version 10.2.0.3.0

Copyright (c) 2005, Oracle Corporation. All rights reserved..

Oracle Home : /opt/oracle/product/10gR2/db

Central Inventory : /opt/oracle/oraInventory

from : /etc/oraInst.loc

OPatch version : 10.2.0.3.0

OUI version : 10.2.0.3.0

OUI location : /opt/oracle/product/10gR2/db/oui

Log file location : /opt/oracle/product/10gR2/db/cfgtoollogs/opatch/opatch2008-06-20_14-33-53PM.log

Lsinventory Output file location : /opt/oracle/product/10gR2/db/cfgtoollogs/opatch/lsinv/lsinventory2008-06-20_14-33-53PM.txt

--------------------------------------------------------------------------------Installed Top-level Products (2):

Oracle Database 10g 10.2.0.1.0

Oracle Database 10g Release 2 Patch Set 2 10.2.0.3.0

There are 2 products installed in this Oracle Home.

Interim patches (3) :

Patch 5881721 : applied on Fri Jun 20 14:26:08 GMT+08:00 2008

Created on 19 Feb 2007, 02:16:34 hrs US/Pacific

Bugs fixed:

5885186, 5881721

Patch 5556081 : applied on Fri Jun 20 11:51:55 GMT+08:00 2008

Created on 9 Nov 2006, 22:20:50 hrs PST8PDT

Bugs fixed:

5556081

Patch 5557962 : applied on Fri Jun 20 11:51:46 GMT+08:00 2008

Created on 9 Nov 2006, 23:23:06 hrs PST8PDT

Bugs fixed:

4269423, 5557962, 5528974

--------------------------------------------------------------------------------

OPatch succeeded.

如果成功,将出现"OPatch succeeded."字样。

至此,针对Sentinel 6的Oracle安装已经完成。接下来就是进行Sentinel产品的安装。

posted @ 2008-06-21 20:14 思考 阅读(2239) | 评论 (0)编辑 收藏

在suse中设置用字符界面启动,第一个终端下面有特效。今天无意中看到在哪里可以改。记下来。
/etc/sysconfig/bootsplash

## Path:        System/Boot
## Description: selects bootsplash graphics theme
## Type:        string
## Default:     SuSE-SLES
# Choose the bootsplash theme. It should be based in
# /etc/bootsplash/themes/
THEME="SuSE-SLES"
## Path:        System/Boot
## Description: enables/disables bootup graphics
## Type:        yesno
## Default:     yes
#
# SPLASH can be set to "no" to turn off the splash-screen on console 1
# at boot time (after kernel load).
#
# SPLASH=no to disable the splash screen
#
# SPLASH=yes to show the splash screen
#
SPLASH="yes"

posted @ 2007-09-15 18:58 思考 阅读(520) | 评论 (1)编辑 收藏
     摘要: 网上有很多源代码可以实现Base64编码的转换,但是主要是对中文转换的时候有问题。 后来在网上找了很多资料,发现原来在Java默认的实现机制中,内部使用UTF-16编码,而所有算法是针对英文UTF-8的。因此,在对中文字符串转换的过程中会出现截取错误。后来在源代码的基础上进行了小的调整,最好可以实现Base64编码。 下面贴出一个实现代码:   1package ...  阅读全文
posted @ 2007-09-15 18:40 思考 阅读(7684) | 评论 (5)编辑 收藏
suse:~ # help test
test: test [expr]
    Exits with a status of 0 (true) or 1 (false) depending on
    the evaluation of EXPR.  Expressions may be unary or binary.  Unary
    expressions are often used to examine the status of a file.  There
    are string operators as well, and numeric comparison operators.
   
    File operators:
   
        -a FILE        True if file exists.
        -b FILE        True if file is block special.
        -c FILE        True if file is character special.
        -d FILE        True if file is a directory.
        -e FILE        True if file exists.
        -f FILE        True if file exists and is a regular file.
        -g FILE        True if file is set-group-id.
        -h FILE        True if file is a symbolic link.
        -L FILE        True if file is a symbolic link.
        -k FILE        True if file has its `sticky' bit set.
        -p FILE        True if file is a named pipe.
        -r FILE        True if file is readable by you.
        -s FILE        True if file exists and is not empty.
        -S FILE        True if file is a socket.
        -t FD          True if FD is opened on a terminal.
        -u FILE        True if the file is set-user-id.
        -w FILE        True if the file is writable by you.
        -x FILE        True if the file is executable by you.
        -O FILE        True if the file is effectively owned by you.
        -G FILE        True if the file is effectively owned by your group.
        -N FILE        True if the file has been modified since it was last read.
   
      FILE1 -nt FILE2  True if file1 is newer than file2 (according to
                       modification date).
   
      FILE1 -ot FILE2  True if file1 is older than file2.
   
      FILE1 -ef FILE2  True if file1 is a hard link to file2.
   
    String operators:
   
        -z STRING      True if string is empty.
   
        -n STRING
        STRING         True if string is not empty.
   
        STRING1 = STRING2
                       True if the strings are equal.
        STRING1 != STRING2
                       True if the strings are not equal.
        STRING1 < STRING2
                       True if STRING1 sorts before STRING2 lexicographically.
        STRING1 > STRING2
                       True if STRING1 sorts after STRING2 lexicographically.
   
    Other operators:
   
        -o OPTION      True if the shell option OPTION is enabled.
        ! EXPR         True if expr is false.
        EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.
        EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.
   
        arg1 OP arg2   Arithmetic tests.  OP is one of -eq, -ne,
                       -lt, -le, -gt, or -ge.
   
    Arithmetic binary operators return true if ARG1 is equal, not-equal,
    less-than, less-than-or-equal, greater-than, or greater-than-or-equal
    than ARG2.
posted @ 2007-08-12 10:38 思考 阅读(236) | 评论 (0)编辑 收藏
在SuSE Linux Enterprise Server 9上安装Oracle9i后,及时使用了安装了orarun-1.8-109.15.i586.rpm包,也无法正常启动。

后来跟踪了启动的Shell脚本,最后发现是需要更改$ORACLE_HOME/bin/dbstart文件。在该文件中,定义变量PFILE:
PFILE=${ORACLE_HOME}/dbs/init${ORACLE_SID}.ora
其中,在Oracle9i中已经通过spfile${ORACLE_SID}.ora。因此,将PFILE变量修改为:
PFILE=${ORACLE_HOME}/dbs/spfile${ORACLE_SID}.ora
同时,为了可以在关机的时候关闭数据库,同时在$ORACLE_HOME/bin/dbshut文件中对应的位置也需要修改PFILE文件的定义。

另外,还有一种方法,就是生成pfile。用sqlplus连接数据库,
conn / as sysdba
create pfile from spfile;
这样,就会参考${ORACLE_HOME}/dbs/spfileora9i.ora生成initora9i.ora这个pfile。这样就不用改启动脚本文件了。

以上两种方法已经证明都可以正常工作。
posted @ 2007-07-15 18:26 思考 阅读(882) | 评论 (0)编辑 收藏
在SuSE下,由于SuSE特有的脚本管理方法,Should-Stop和Default-Stop选项被忽略了。同时,在脚本开始处执行/etc/rc.status脚本,可以通过调用rc_status -v检查启动命令的执行结果并彩色显示出来。

#!/bin/bash
#
# /etc/init.d/oracle
#
### BEGIN INIT INFO
# Provides:
# Required-Start: $network $syslog
# Should-Start:
# Required-Stop:
# Should-Stop:
# Default-Start: 3 5
# Default-Stop: 0 1 2 4 6
# Description: Startup/shutdown script for oracle listener and instance;
### END
. /etc/rc.status
rc_reset
       
start()
{
       
        #when system stop redhat  check /var/lock/subsys/oracle
        #to make sure oracle is running.
        touch /var/lock/subsys/oracle
        # start tsnlisnter    
        echo -n "Start tsnlisnter:"
                su - oracle -c "lsnrctl start" >/dev/null 2>/dev/null
        rc_status -v
        # start database
        echo -n "Start Oracle database instance:"
        su - oracle -c "echo \"
                        CONN / AS SYSDBA
                        STARTUP
                        exit \"|sqlplus /NOLOG" >/dev/null 2>/dev/null
        rc_status -v
        # start enterprise manager
        echo -n "Start Enterprise Manager:"
        su - oracle -c "emctl start dbconsole" >/dev/null 2>/dev/null
        rc_status -v
        #start isqlplus
        echo -n "Start isqlplus"
        su - oracle -c "isqlplusctl start">/dev/null 2>/dev/null
        rc_status -v
}
stop()
{
        #when system stop redhat  check /var/lock/subsys/oracle
        #to make sure oracle is running.
        rm -rf /var/lock/subsys/oracle
        # shutdown database
        echo -n "Shutdown Oracle database instance:"
        su - oracle -c "echo \"
                        CONN / AS SYSDBA
                        SHUTDOWN immediate
                        exit \"|sqlplus /NOLOG">/dev/null 2>/dev/null
        rc_status -v
        # stop tsnlisnter
        echo -n "Stop tsnlisnter:"
                su - oracle -c "lsnrctl stop">/dev/null 2>/dev/null
        rc_status -v
        # stop enterprise manager
        echo -n "Stop Enterprise Manager:"
        su - oracle -c "emctl stop dbconsole"
        rc_status -v
        # stop isqlplus
        echo -n "Stop isqlplus:"
        su - oracle -c "isqlplusctl stop"
        rc_status -v
}
case "$1" in
start)
        start
        echo "Oracle Start at:" `date` >>/var/log/oracle.log
        ;;
stop)
        stop
        echo "Oracle Stop at:" `date` >>/var/log/oracle.log
        ;;
restart)
        echo "Oracle Restart at:" `date` >>/var/log/oracle.log
        stop
        start
        ;;
*)
        echo "Usage: $0 { start | stop| restart }"
        exit 1
 
       ;;
esac
rc_exit
posted @ 2007-06-05 09:50 思考 阅读(1481) | 评论 (0)编辑 收藏

在用Struts开发项目的时候遇到了一个问题,当上传文件时,中文文件名会出现乱码问题。
于是,在Google和Baidu上面进行了搜索。结果发现有无数人遇到了相同的问题,大家也都在迫切的询问此类问题。但是回帖的结果却让人特别生气!

回帖的内容大致可分为两类:
第一类,都是把别人的帖子转来转去,也不著名出处。更是有几个人都在自己的博客上写的内容完全一样,还说是自己写的!
另一类相对要好一些,对问题进行了解答。但是,按照他们所说的进行了更改,根本就不能解决问题。真是不知道他们是这么解决这个问题的。

后来在玉米田http://www.yumt.com/showlog.jspe?log_id=56#71的博客上有一篇文章说道了此事,才能彻底解决这个问题。看了之后才知道,原来Struts的upload功能是对jakarta apache的commons-fileUpload进行了封装实现的。但是在实现时,没有考虑到文件编码的问题。所以,需要对struts.jar中的文件进行修改并重新编译打包。事实证明,这样作问题解决了。

但是回过头来,那些通过在JSP页面中设置编码方式为UTF-8或者在得到文件名进行编码转译的人是如何解决这个问题的,难道我的系统跟他们的不一样吗?

由此,可以看出很多网友不能够踏踏实实的做人,人云亦云。抱着一种极其不负责任的态度,这样作不但是自己不能真正理解问题的本质,得不到提高和进步,更加影响了对此类问题不甚了解并渴望解答的人所误解。

同时,一旦这种风气发展下去,下次提问者作为解答者的时候这种现象又会出现。如果此类现象愈演愈烈,势必会对我们中国整个软件业甚至这个中华民族带来及其深刻的影响!

希望跟我有同感的IT同仁可以从自己做起,认真回答网友的提问。我们从自己做起,从现在做起!

posted @ 2006-12-20 20:33 思考 阅读(260) | 评论 (0)编辑 收藏
今天看了Sun的Java编程习惯,记录一下:
http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html
posted @ 2006-11-12 17:08 思考 阅读(314) | 评论 (1)编辑 收藏

好久没来了,感觉没有对社区做出点贡献,有愧版主的头衔,今日在这里为大家提供两则小技巧,以便帮你强行杀死“顽固不化”的病毒进程。 


  根据进程名查杀 


  这种方法是通过WinXP系统下的taskkill命令来实现的,在使用该方法之前,首先需要打开系统的进程列表界面,找到病毒进程所对应的具体进程名。 

接着依次单击“开始→运行”命令,在弹出的系统运行框中,运行“cmd”命令;再在DOS命令行中输入“taskkill /im aaa”格式的字符串命令,单击回车键后,顽固的病毒进程“aaa”就被强行杀死了。比方说,要强行杀死“conime.exe”病毒进程,只要在命令提示符下执行“taskkill /im conime.exe”命令,要不了多久,系统就会自动返回结果。 


  根据进程号查杀 


  上面的方法,只对部分病毒进程有效,遇到一些更“顽固”的病毒进程,可能就无济于事了。此时你可以通过Win2000以上系统的内置命令——ntsd,来强行杀死一切病毒进程,因为该命令除System进程、SMSS.EXE进程、CSRSS.EXE进程不能“对付”外,基本可以对付其它一切进程。但是在使用该命令杀死病毒进程之前,需要先查找到对应病毒进程的具体进程号。 


  考虑到系统进程列表界面在默认状态下,是不显示具体进程号的,因此你可以首先打开系统任务管理器窗口,再单击“查看”菜单项下面的“选择列”命令,在弹出的设置框中,将“PID(进程标志符)”选项选中,单击“确定”按钮。返回到系统进程列表页面中后,你就能查看到对应病毒进程的具体PID了。 


  接着打开系统运行对话框,在其中运行“cmd”命令,在命令提示符状态下输入“ntsd -c q -p PID”命令,就可以强行将指定PID的病毒进程杀死了。例如,发现某个病毒进程的PID为“444”,那么可以执行“ntsd -c q -p 444”命令,来杀死这个病毒进程。

posted @ 2006-08-21 14:50 思考 阅读(914) | 评论 (0)编辑 收藏
1.在拖地的水中加入幾滴薰衣草精油
2.家中几个角落放些"灭蚁灵",一元一包,一天至两天,让它一窝端
3.家人无意收听到了一则红蚂蚁遇到橡皮筋就走开的广播,便打算试一试。
4.用鸡蛋壳数个,放在炉子上烤黄(不能烤焦),然后辗成粉末状,撒在蚂蚁窝周围及其经常出入的地方,因为此粉末有香味,蚂蚁特别爱吃,吃多了就会被撑死。
posted @ 2006-08-13 13:00 思考 阅读(394) | 评论 (0)编辑 收藏
今天看了一则报道“广州现新型犯罪方式 将路边行人拉上车抢劫强奸”,其中说道广州警察为了打击犯罪,依法开了12枪,3个被击毙,9个被打伤。这个命中率也太高了吧,100%。
posted @ 2006-07-21 22:03 思考 阅读(307) | 评论 (1)编辑 收藏
首先声名,本人不是球迷,看球完全是一种消遣。
在看完昨天世界杯后,中央5台的主持人张斌在节目中,首先讲述了很多足球解说人的路子都是从球迷、记者到主持人这样一步一步走过来的。然后,就请现场的一位观众对刚刚进行完的比赛中德国队的第一个进球做现场解说。结果,那位是中国宽带网的观众的表现可想而知,不能令人满意。接下来,张斌就得出这样一个结论:你看,做一名足球解说不是那么容易的事吧……如果你说了3000场比赛,你也可以说的很好。大概是这样的吧,具体我也没有记住。然后他大腹便便、心满意足的回到了主持人的坐席上,继续支持他的节目。
说实话,当时我真想冲到北京打他一顿,说的什么狗屁话。他的言外之意就是他们的工作有难度,不想我们想象中那么简单,所以口误是正常的。首先,那个观众是第一次说球,能说成这样已经不错了。但是不能因为他说的不好,就能够证明你们的工作有多么多么的难。其次,即使我们承认解说员工作存在难度,也不能为你们的口误找借口啊。不然,中央台为什么付薪水给你,而不去找其它人。话说回来,我也听过ESPN的主持人的解说,虽然不是常听,但是至少在我收看时没有发现口误的问题。最后,不能因为工作存在困难,就堂而皇之的为自己的失职寻找客观原因。不要说是人,就连机器都有出错的时候,这点我们是可以理解的。但是,如果希望观众,至少是那些吹毛求疵的观众,可以理解你们,最起码的为自己失职的道歉还是应该有的吧!
posted @ 2006-06-21 12:05 思考 阅读(210) | 评论 (0)编辑 收藏

         1、孔子路过泰山脚下,有一个妇女在墓前哀伤地哭泣。孔子手扶车沿听她哭诉,并让弟子问她缘由,妇女说:“以前我的公公被老虎咬死,我的丈夫跟着被老虎咬死,现在我的儿子也被老虎咬死了;”
  孔子说:“事情都过去了,又何必伤心?”
  妇女说:“不仅如此,这里还有繁重的苛捐杂税”;
  孔子道:“那为什么不离开这里呢?”
  妇女说:“我怕失去低收入者作为纳税人的荣誉!”
  孔子于是对弟子道:“小子识之,苛政虽猛于虎,然纳税人的荣誉牛B于苛政也!”
  ----全国人大农业与农村委员会委员任正隆则认为,起征点太高剥夺了低收入者作为“纳税人”的荣誉。  
  
  2、汉朝的淮南王刘安派人进山访仙,从仙翁手里得到了一张仙方。他把自己关进暗房里,炼起仙丹来。八卦炉里炼出一些圆滚滚的仙丹,他一口气吞下5颗,飘飘悠悠飞上天去了!门外的鸡犬一看,也跟着大吃起来,不一会,空中一阵鸡鸣狗叫,原来它们也飞上天了!有人问道:“刘安,你家的鸡犬怎么也跟着成仙了?”
  刘安说:“为了防止拉登发动恐怖袭击、撞击天庭,我特意实行“一人得道,鸡犬升天”制,在任何紧急情况下,都能及时帮助疏散与救援,这是一个安全上的举措,并不是专门把成仙作为福利”。
  ----广州地铁线网听政会上,地铁员工家属免费坐地铁引起代表争议,地铁总经理解释,是为了“反恐需要”。
  
  3、秦始皇修筑万里长城时死了许多人,孟姜女的丈夫万喜良也在其中。听到这个消息,孟姜女只觉得天昏地暗,一下子昏倒在地,醒来后,她伤心地痛哭起来,只哭得天愁地惨,日月无光。不知哭了多久,忽听得天摇地动般地一声巨响,长城崩塌了几十里,露出了数不清的尸骨。孟姜女咬破手指,把血滴在一具具的尸骨上,她心里暗暗祷告:如果是丈夫的尸骨,血就会渗进骨头,如果不是,血就会流向四方。终于,孟姜女用这种方法找到了万喜良的尸骨。她抱着这堆白骨,哭着说道:“老万,你的死跟你丫本人素质不高有关啊!”
  ----11月30日,七煤公司一领导在接受采访时表示,“11·27”矿难的主要原因归咎于井下矿工对规章制度执行不力,劳动者的素质离我们的要求还差很远。
  
  4、三国演义里,诸葛亮造木牛流马,用来运送粮草,以此大败曹军。但后来木牛流马却失传了,即便是诸葛亮的得意弟子姜维也不会造。诸葛军师临终前众将问他:“军师,木牛流马这般好用,为何您再也不造了?”
  孔明长叹一声曰:“某交通学大学士、大教授的研究结果表明,木牛流马的污染比汽车飞机大,为了子孙后代的幸福,你们还是等着坐汽车吧!”
  ----“中国城市环境污染不是由汽车造成的,而是由自行车造成的”。国内一家搞环境研究的权威机构经过一番调查与研究后得出的一个“科学”结论。
  
  5、老栓也向那边看,却只见一堆人的后背;颈项都伸得很长,仿佛许多鸭,被无形的手捏住了的,向上提着。静了一会,似乎有点声音,便又动摇起来,轰的一声,都向后退;一直散到老栓立着的地方,几乎将他挤倒了。
  “喂!一手交钱,一手交货!”一个浑身黑色的人,站在老栓面前,眼光正像两把刀,刺得老栓缩小了一半。那人一只大手,向他摊着;一只手却撮着一个鲜红的馒头,那红的还是一点一点的往下滴。
  老栓慌忙摸出洋钱,抖抖的想交给他,却又不敢去接他的东西。那人便焦急起来,嚷道,“怎么?嫌贵?舍不得银子?” 老栓还踌躇着,黑的人便抢过灯笼,一把扯下纸罩,裹了馒头,
  塞与老栓;一手抓过洋钱,捏一捏,转身去了。嘴里哼着说:“这血馒头是药,不能当馒头卖!价格不贵,不同意降价!”
  ----“药品怎么能当馒头卖?”在“看病难,药价贵”呼声高涨时,东盛制药集团总裁陶朝辉却反其道而行之,抛出“馒头论”,坚持“药价不贵,不同意降价”。
  
  6、宋代穷儒陈世美,进京考中状元,被招为驸马。其发妻秦香莲带二子上京寻亲,陈世美翻脸不认人;秦香莲悲痛欲绝,发誓要讨还情债。陈世美勃然大怒,上表朝廷奏曰:臣以为,开封自古就是神圣之地,岂容外地人随便进入?应该建立人口准入制度!同时,对那些恶意讨情之人,应坚决打击!”
  ----在刚刚结束的北京市“两会”上,政协委员张惟英教授提出“建立人口准入制度”的建议:目前北京市的居住人口已超过各种资源的人口承载极限,严重制约了北京的发展,建议摸清北京市实际需要的人才类别,用准入制度进行合理的引入,规范人口流动。
  
  7、武松醉打蒋门神、替施恩夺了快活林之后,中了张都监、张团练的计,几乎命丧飞云浦。武松杀了张都监的几名爪牙,寻思了半晌,怨恨冲天:“不杀得张都监,如何出得这口恨气!”便去死尸身边解下腰刀,选好的取把将来跨了,拣条好朴刀提着,直奔孟州城张都监的后花园。
  张都监、张团练、蒋门神正在鸳鸯楼吃酒,冷不防武松闯了进来,噗噗几刀砍死蒋门神、张团练。武松踏着张都监的脑袋喝道:“你们这帮贼子,为何黑道白道勾结、串通一气害我?”
  张都监颤颤巍巍地答道:“说句实话,官匪勾结的重要原因,是我们的待遇过低了!”
  
  --成都火车站派出所副所长付小华接受采访时表示:“出现‘警匪勾结’这种情况的重要原因是警察待遇过低”  
  
  8、有一日,窦娥碰到苏三、杨乃武、小白菜等人,就问他们:“你们都平反昭雪了吗?”众人说:“都昭雪了”;窦娥又问:“那少奇兄弟、德怀兄弟、志新妹妹呢?”众人说:“也都平反了”。窦娥便道:“我说什么来着,咱们的司法就是公正!那么多案件从错的纠成正的,这难道不是司法公正的体现吗?”
  ----被无辜关押11年的佘祥林被宣告无罪了,但这一悲剧投石入湖的震荡,远远没有平息。当事人申请国家赔偿、责任人被追究法律责任,尚都在公众的持续关注中。种种怨怒未消之下,另一方面却居然频频出现奇怪的言论:4月1日湖北高院向该省法院系统发出通知,要求认真总结避免佘祥林被冤杀的经验;最高法副院长万鄂湘日前在就此案答媒体问时又说:“是否司法不公应该从最后纠正的结果看。这个案件从错的又纠成正的,难道不是司法公正的体现吗?”
  
  9、一天,周扒皮去找刘文彩,“刘大哥,我们村那些穷棒子们发牢骚,说他们活得太苦、活得没意思”;
  刘文彩说:“他们是我国巨大的财富,没有他们的辛苦哪有咱们少数人的享乐,他们的存在和维持现在的状态是很有必要的。”
  周扒皮说:“有的长工说他想读书!”
  刘文彩道:“咱们的教育改革已经成功了,他还嚷嚷个屁!”
  周扒皮说:“他们说收租院放高利贷是暴利”;
  刘文彩道:“放高利贷就该暴利,谁让他们不幸生在X国了?我们就是要把暴利进行到底!”
  周扒皮说:“他们还说现在收入差距过大,存在两极分化”;
  刘文彩道:“纯属放屁!大家都在同一个经纬度上,又不是一个在南极、一个在北极,哪来的两极分化?!”
  -- 经济学家厉以宁如是说“8亿多农民和下岗工人是中国巨大的财富,没有他们的辛苦哪有少数人的享乐,他们的存在和维持现在的状态是很有必要的。”
  
  10、董存瑞牺牲后到了天堂,上帝问他:“你是怎么死的?”董存瑞说:“为了炸敌人的碉堡,被炸药包炸死的”;
  上帝听后勃然大怒,说道:“胡说!你胆敢骗我?”
  董存瑞说:“我没骗您啊!”
  上帝说:“你以为我不懂科学吗?谁不知道,爆炸只会产生水和二氧化碳,你不是被水淹死的、就是被二氧化碳薰死的,怎么可能是被炸死的呢?!”
  吉林石化的人所说:爆炸产生水和二氧化碳,不会污染水源!

posted @ 2006-06-19 10:58 思考 阅读(300) | 评论 (0)编辑 收藏

Do you ever feel like breaking down?
Do you ever feel out of place?
Like somehow you just don't belong
And no one understands you
Do you ever wanna run away?
Do you lock yourself in your room?
With the radio on turned up so loud
That no one hears you screaming

No you don't know what it's like
When nothing feels alright
You don't know what it's like to be like me
To be hurt
To feel lost
To be left out in the dark
To be kicked
When you're down
To feel like you've been pushed around
To be on the edge of breaking down
And no one's there to save you
No you don't know what it's like
Welcome to my life

Do you wanna be somebody else?
Are you sick of feeling so left out?
Are you desperate to find something more
Before your life is over?
Are you stuck inside a world you hate?
Are you sick of everyone around?
With the big fake smiles and stupid lies
While deep inside you're bleeding

No you don't know what it's like
When nothing feels alright
You don't know what it's like to be like me
To be hurt
To feel lost
To be left out in the dark
To be kicked
When you're down
To feel like you've been pushed around
To be on the edge of breaking down
And no one's there to save you
No you don't know what it's like
Welcome to my life

No one ever lies straight to your face
And no one ever stabbed you in the back
You might think I'm happy
But I'm not gonna be ok!
Everybody always gave you what you wanted
You never had to work it was always there
You don't know what it's like
What it's like!

To be hurt
To feel lost
To be left out in the dark
To be kicked
When you're down
To feel like you've been pushed around
To be on the edge of breaking down
And no one's there to save you
No you don't know what it's like
No you don't know what it's like (what it's like)
To be hurt
To feel lost
To be left out in the dark
To be kicked
When you're down
To feel like you've been pushed around
To be on the edge of breaking down
And no one's there to save you
No you don't know what it's like
Welcome to my life
Welcome to my life
Welcome to my life

posted @ 2006-06-14 19:39 思考 阅读(225) | 评论 (0)编辑 收藏
昨天在杂志上看到Combimous公司基于人体工学设计了鼠标和键盘一体的新产品,并在赤塔周立大学(Wichita State University)进行了测试。澳大利亚PC世界杂志给出了如下评价:
         
         “上个世纪,科学家们分割了原子。这个世纪,Ari Zagnoev分割了键盘”

其中,左手除了标准的键盘设计外,在大拇指处添加了鼠标的滚轮设计。而右手除了可以作为键盘使用之外,键盘会根据人手的位置的改变,自动在鼠标和键盘两种工作模式之间切换。并且,之间的时间延迟可以忽略不计。下图是两种工作模式下手的位置。

具体的信息参见网站:http://www.combimouse.com/
期待这款产品可以在中国上市!
posted @ 2006-06-13 17:34 思考 阅读(157) | 评论 (0)编辑 收藏
昨天路考顺利通过!!!
posted @ 2006-06-12 13:01 思考 阅读(187) | 评论 (0)编辑 收藏
经过多次试验,对元组进行切片时,将严格按照从左到右的顺序。如:
a=(0,1,2,3)
b
=a[x:y]
print b
这里面我们假设x和y是变量。我们可以将a看作
   0   1   2   3
            
   ^    ^   ^   ^
±0   1   2   3
  -4  -3  -2  -1
也就是说,x=1和x=-3代表相同的位置。同理,y=3跟y=-1也代表相同的位置。这样,切片a[x:y]中,x和y分别表示元组a中元素的位置。并且,此时x的位置一定在y的左面。如若不然,b将得到一个空的元组()。
>>> a=(0,1,2,3)
>>> print a[0:0]
()
>>> print a[0:3]
(0, 
12)
>>> print a[0:5]
(0, 
123)
>>> print a[-3:2]
(
1,)
>>> print a[1:-1]
(
12)
>>> print a[1:2]
(
1,)
>>> print a[1:3]
(
12)
>>> print a[2:1]
()
>>> print a[-4:-3]
(0,)
>>> print a[-3:-4]
()
>>> 
posted @ 2006-06-07 18:38 思考 阅读(1092) | 评论 (0)编辑 收藏
今天一早7点就爬起来,等到下午2点才开始考试!!
不过幸运的是考场的红外线系统坏掉了:)
考试通过,庆祝一下!
posted @ 2006-06-04 20:13 思考 阅读(168) | 评论 (0)编辑 收藏
犹太人(希伯来语:יהודי)原来是居住在阿拉伯半岛的一个游牧民族,最初被称为希伯来人,意思是“游牧的人”。根据记载他们历史的圣经《旧约》传说,他们的远祖亚伯拉罕(阿拉伯语发音为易卜拉辛)原来居住在苏美尔人的乌尔帝国附近,后来迁移到迦南(今巴勒斯坦一带)。他有两子,嫡幼子以撒成为犹太人祖先,而其与侍女夏甲所生的庶长子以实玛利(阿拉伯发音易斯玛仪)的后代就是阿拉伯人。《古兰经》中也承认亚伯拉罕是阿拉伯人的祖先。

犹太人的祖先名字叫雅各(阿拉伯发音为叶尔孤白),雅格是以撒的儿子亚伯拉罕(阿拉伯发音为易卜拉欣)的孙子,希伯的后代,后来改名叫以色列,意思是“和天使搏斗的人”,并且在他和天使搏斗的时候伤了腿筋,所以他们宰杀动物时都要把腿筋挑出来丢弃。

雅各生有12个儿子,在一次灾荒中迁移到埃及,受到当时统治埃及的喜克索斯人的优待,居住在尼罗河下游,转变为农业民族。喜克索人被努比亚人暴动赶出埃及后,犹太人的地位急剧下降,沦为埃及人的奴隶,他们在摩西(阿拉伯发音为穆萨)的带领下逃出埃及,逃回巴勒斯坦定居,以色列的12个儿子的后代形成十二支族,原来在巴勒斯坦分居,后来统一成一个国家,由犹大支族的大卫担任国王,以色列国家在大卫的儿子所罗门(阿拉伯称为苏莱曼大帝)担任国王期间达到鼎盛。

所罗门死后,所罗门的儿子罗波安继承王位。由于他及一班年青的大臣所施行的苛刻政策,使北部10个支族的人拉出去,单独成立以色列国,并推举尼八的儿子耶罗波安为王;犹大支族和便雅悯支族联合成立了犹大国。以色列国不久即被亚述人消灭,犹太国尚坚持了几百年,后来也终于被巴比伦帝国攻占。人民被虏到巴比伦成为奴隶,波斯帝国消灭巴比伦后,犹太人被允许回国重建耶路撒冷圣殿,并成立傀儡的犹太国,并相继沦为希腊和罗马帝国的属国。到了公元2世纪初,最终因起义反对罗马人,耶路撒冷被罗马大军攻破,圣殿被拆毁,犹太人被迫流落到世界各地,开始自称为犹太人。

中世纪及近代
犹太人到世界各地后,语言、风俗逐渐和当地居民同化,但他们坚持信仰本民族的宗教,以此维持民族的独立性,仍然用自己的希伯来字母书写文字,在意大利、西班牙的犹太人,语言被同化,用希伯来字母书写的叫“拉丁诺文”;在德国、波兰的犹太人语言为“意第绪语”;在中国的犹太人,由于他们的宗教信仰也不吃猪肉,被称为“蓝帽回回”,并逐渐和其他回族混淆。因为他们信仰不同,在基督教国家受到歧视,不得拥有土地,只好经商,逐渐积累商业经验,基督教徒不允许放高利贷,而犹太人的信仰不禁止,可以从事信贷活动,逐渐成为欧洲的著名商人和银行家,更为低层平民所憎恶,不时发生打击犹太人事件。

现当代
19世纪末期,由于东欧的迫害加剧,成千上万的犹太人逃离此地,大多数投奔美国、加拿大和西欧。到1924年,共有大约两百万犹太人移民至美国,因当时美国社会对待犹太族群的态度相比东欧而言更加宽容。欧洲对犹太人的迫害终于在希特勒德国时期达到顶峰,发生了灭绝约600万犹太人的大屠杀,几乎彻底摧毁犹太人在欧洲2000年的文化历史沉淀。

1948年年以色列国建立,是自罗马摧毁耶路撒冷后近2000年来第一个成立的犹太人国度,并人为复兴口语希伯来语的正式使用。但以色列建国的地点是在巴勒斯坦地区,导致和当地定居已久的阿拉伯裔巴勒斯坦人矛盾激化,使中东成为世界的热点地区,并致使原先居住在阿拉伯国家的近90万犹太人也陷入困境。

到21世纪初,美国和以色列是犹太人的主要集中地。犹太人也在美国社会的政治、经济、文化领域积攒了很大的势力。

知名犹太人列表
马克思
爱因斯坦
冯·诺依曼
奥本海默
沙龙
哈同
弗洛伊德
库尔特·图霍夫斯基
斯宾诺莎
雅各·路德维希·费里克斯·门德尔松·巴尔托迪
摩西·门德尔松
基辛格
哈默
霍夫曼







犹大 (יְהוּדָה 意思是"赞美",标准希伯来语 Yəhuda,Tiberian 希伯来语 Yəhûḏāh) 是雅各和利亚的第四个儿子,生在巴旦亚兰 (创世纪)是犹太人十二列祖之一。(创世纪,圣经第一卷)

他父亲雅各在临终前曾这样给他祝福:
犹大阿,你弟兄们必赞美你;你手必掐住仇敌的颈项;你父亲的儿子们必向你下拜。 犹大是个小狮子;我儿阿,你抓了食便上山去。他蹲伏如公狮,又如母狮,谁敢惹他? 权杖必不离犹大,王杖必不离他两脚之间,直到细罗来到,万民都必归顺。犹大把小驴拴在葡萄树上,把驴驹拴在美好的葡萄树上。他在葡萄酒中洗了衣服,在葡萄汁中洗了袍褂。他的眼睛因酒红润;他的牙齿因奶白亮。 (创世纪49:8-12)

摩西是这样祝福的:论犹大,他这样祝福说,耶和华阿,求你听犹大的声音,引导他归于本族;他曾用手为他们争战,愿你帮助他攻击敌人。 (申命记 33:7 )
在弟兄们中间,犹大富于怜悯。犹大曾经阻止其他兄弟杀害弟弟约瑟,建议把他卖给以实马利商人。下埃及 买粮食时,犹大向父亲雅各担保 弟弟便雅悯安全回来。因此他和约瑟,利未共同得到流便失去的长子名份.约瑟得到了双份的土地,利未成为圣别的祭司,而犹大在弟兄中领头( "犹大和他的兄弟们" ,创世纪)。

按照创世纪,犹大生了三个儿子:珥,俄南和 示拉。珥娶了他玛,没有孩子就死了。按照习俗他玛嫁给了俄南,俄南不愿给哥哥留后,被神击打而死。犹大不愿意示拉再娶他玛,于是他玛伪装成妓女,从公公犹大怀孕生了法勒斯和谢拉。法勒斯是大卫王的祖先 (路得记4:12, 18-22),也是耶稣肉身的祖先。(马太福音1:2)
参考资料:维基百科简体版
posted @ 2006-05-28 17:06 思考 阅读(2033) | 评论 (1)编辑 收藏
1.牛只有母牛会产奶,公牛不能产奶。

2.所有的母牛都能产奶,包括黄牛、水牛等,但有某些品种的(如黑白花的那种牛)产奶量比较大,所以一般黄牛、水牛被用作耕地拉车,黑白花牛用途是产奶。

3.黑白花的牛也有公、母之分,公牛一般用作“奶牛”的种牛,但由于这种牛是国外引进的,价格比较高昂。初期都是引进的母牛,再用其他品种(如黄牛)的公牛来配种。因为种不纯,产奶量会下降,但当时也是没有办法的办法。

所以,也正由于国内初期引进的“黑白花牛”多是母牛,所以造成在国内看不见“黑白花牛”的公牛。所以,“黑白花”奶牛公母的问题也就搞得很乱,呵呵。
posted @ 2006-05-12 14:55 思考 阅读(220) | 评论 (0)编辑 收藏

Today I got a song of Beatles, which is about the word a man said to her girl maybe and the lyric of which is blow.

When I get older losing my hair ,
Many years from now.
Will you still be sending me a valentine
Birthday greetings bottle of wine.
If I'd been out till quarter to three
Would you lock the door
,
Will you still need me
,  will you still feed me ,
When I'm sixty-four.
You'll be older too
,
And it you say the word
,
I could stay with you.
I could be handy
,  mending a fuse
When your lights have gone.
You can knit a sweater by the fireside
Sunday mornings go for a ride
,
Doing the garden
,  digging the weeds ,
Who could ask for more.
Will you still need me
,  will you still feed me ,
When I'm sixty-four.
Every summer we can rent a cottage
,
In the Isle of Wight
,  if it's not too dear
We shall scrimp and save
Grandchildren on your knee
Vera Chuck & Dave
Send me a postcard
,  drop me a line ,
Stating point of view
Indicate precisely what you mean to say
Yours sincerely
,  wasting away
Give me your answer
,  fill in a form
Mine for evermore
Will you still need me
,  will you still feed me ,
When I'm sixty-four.


 

posted @ 2006-04-24 22:51 思考 阅读(231) | 评论 (0)编辑 收藏
星期天上午参加了桩考的考试,郁闷ing
posted @ 2006-04-18 10:17 思考 阅读(193) | 评论 (0)编辑 收藏
为了使FTP用户成功上传文件之后,可以执行某个脚本程序,使其可以根据上传的内容(如多媒体)做相应的操作。最初有这个想法的时候,我们系统上默认安装的是vsftpd。找遍了相关的资料,也没有找到描述vsftpd可以实现相关功能。感谢irc.pchome.net上nok兄弟,告诉了我可以使用pure-ftpd来实现上面的功能。

经过2天的学习和探索,终于测试成功!期间,发现了一些问题,也都一一解决了:)
posted @ 2006-04-12 22:10 思考 阅读(328) | 评论 (0)编辑 收藏

1 .简介

自从 0.99.2 版本开始, pure-ftpd 就开始支持虚拟用户。虚拟用户方式十分类似 /etc/passwd ,将用户的相关信息,如口令、姓名、 uid 、目录等,存入文件。但是该文件只适用于 FTP

这意味着,可以为 FTP 设置虚拟用户,而不需要在系统中添加系统用户。同时,可以为这些用户单独设置配额、 ratio 、带宽等限制。很多虚拟用户可以共享同一个系统用户的属性,因此建议为这些虚拟用户单独创建一个系统用户,从而方便管理。

首先,可以在系统中添加相应的用户和组,如 ftpuser ftpgroup 。如:

groupadd ftpgroup

useradd -g ftpgroup -d /dev/null -s /etc ftpuser

可以使用 ”pure-pw” 来创建虚拟用户。虚拟用户的信息以每个用户一行的方式存放在相应的文件中,其格式如下所示:

<account>:<password>:<uid>:<gid>:<gecos>:<home directory>:<upload bandwidth>:<download bandwidth>:<upload ratio>:<download ratio>:<max number of connections>:<files quota>:<size quota>:<authorized local IPs>:<refused local IPs>:<authorized client IPs>:<refused client IPs>:<time restrictions>

其中,除了帐号、口令、 uid gid home 目录之外,其它的可以是空值。

2 .创建一个用户

接下来,我们来创建一个新的用户。 pure-pw 的语法规范如下:

pure-pw useradd <login> [-f <passwd file>] -u <uid> [-g <gid>]

      -D/-d <home directory> [-c <gecos>]

      [-t <download bandwidth>] [-T <upload bandwidth>]

      [-n <max number of files>] [-N <max Mbytes>]

      [-q <upload ratio>] [-Q <download ratio>]

      [-r <allow client host>[/<mask>][,<allow client host>[/<mask>]]...]

      [-R <deny client host>[/<mask>][,<deny client host>[/<mask>]]...]

      [-i <allow local host>[/<mask>][,<allow client host>[/<mask>]]...]

      [-I <deny local host>[/<mask>][,<deny local host>[/<mask>]]...]

      [-y <max number of concurrent sessions>]

      [-z <hhmm>-<hhmm>] [-m]

假设我们要创建 joe 这样一个虚拟用户,则可以使用如下命令:

pure-pw useradd joe -u ftpuser -d /home/ftpusers/joe

其中, -u 将虚拟用户 joe 同系统用户 ftpuser 关联在一起。 -d 参数使 joe 只能访问其 home 目录。而如果想让他访问整个文件系统,可以用 -D 选项。

这时,如果 pure-ftpd 启动时加入 -j(--createhome) 选项,则不需要创建 /home/ftpuser/joe 目录。系统会在该用户第一次登陆时自动创建。

-z 选项运用用户在一天当中指定的时间段连接服务器。如 -z 0900-1800 ,则该用户只能在上午 9 点到晚上 6 点之间连接服务器。

-r 选项或 -R 选项,可以限制用户从指定 IP 和掩码连入服务器

-y ,用户同一时间的并发连接数。 ’’ 或者 0 意味着不限制

-f ,默认虚拟用户的信息会被存放在 /etc/pureftpd.passwd 文件中,通过该选项可以改变该文件的位置。

用户的口令会根据系统对加密方式的支持情况,选择一个最安全的方式进行加密。

3 .更改一个用户

pure-pw adduser 唯一不同的是,使用 pure-pw usermod 不是创建一个用户,而是更改已经存在用户的某些属性。

重置某些属性的语法如下:

pure-pw usermod <user> -n '' :禁用文件配额

pure-pw usermod <user> -N '' :禁用文件大小配额

pure-pw usermod <user> -q '' -Q '' :禁用 ratio

pure-pw usermod <user> -t '' :禁用下载带宽限制

pure-pw usermod <user> -T '' :禁用上传带宽限制

pure-pw usermod <user> <-i,-I,-r or -R> '' :禁用 IP 过滤

pure-pw usermod <user> -z '' :禁用时间段约束

pure-pw usermod <user> -y '' :禁用并发数限制

4 .删除一个用户

删除一个用的命令语法是:

pure-pw userdel <login> [-f <passwd file>] [-m]

这时,用户的信息会被从指定的 passwd 文件中删除,但是用户的 home 目录会被保留,需要手工删除。

5 .改变用户口令

更改一个用户口令的语法是:

pure-pw passwd <login> [-f <passwd file>] [-m]

6 .显示用户信息

/etc/pureftpd.passwd 文件中记录的信息不方便用户的阅读,因此 pure-ftpd 提供了显示用户信息的命令。其语法是:

pure-pw show <login> [-f <passwd file>]

7 .提交更改

可以通过上面提到的命令,或者以手工方式对 /etc/pureftpd.passwd 文件进行修改,从而创建、修改和删除一个虚拟用户信息。但是,只有提交这些更改时, pure-ftpd 访问才能生效。

提交更改,意味着系统会根据 /etc/pureftpd.passwd (或者指定的其它文件)来创建一个 pure-ftpd 可读的二进制格式的文件 /etc/pureftpd.pdb 。通常,通过下面的命令:

pure-pw mkdb

可以通过 /etc/pureftpd.passwd 文件自动创建 /etc/pureftpd.pbd 文件。但是,如果需要指定特定的文件,可以通过下面的方式来实现:

pure-pw mkdb /etc/accounts/myaccounts.pdb -f /etc/accounts/myaccounts.txt

这时,没有必要去重启 pure-ftpd 服务,对虚拟用户进行的更改可以更新。同时,也可以通过 -m 选项,在对 /etc/pureftpd.passwd 文件进行修改的时候自动进行提交。

8 .打开对虚拟用户的支持

使得 pure-ftpd 支持虚拟用户,需要在编译的时候加入选项 --with-puredb 。这时,可以通过在启动服务是的 ’-l’ 参数来设置。如:

/usr/local/sbin/pure-ftpd -j -lpuredb:/etc/pureftpd.pdb &

可以在后台,以自动创建虚拟用户 home 目录,用 puredb 的方式来支持虚拟用户。

9 .转换系统用户

可以通过如下命令,将系统用户转换为虚拟用户:

pure-pwconvert

如果以 root 用户运行该命令,系统用户的口令一并被转入虚拟用户配置文件。如:

pure-pwconvert >> /etc/pureftpd.passwd

10 .环境变量

默认的情况下,如果指定了环境变量 PURE_PASSWDFILE ,则虚拟用户的 passwd 文件位置由该变量的值指定。否则,默认是 /etc/pureftpd.passwd 。用样, PURE_DBFILE 环境变量用来指定 pdb 文件的位置。默认是 /etc/pureftpd.pdb

posted @ 2006-04-11 00:27 思考 阅读(3722) | 评论 (0)编辑 收藏

转载(http://www.linux-ntfs.org/content/view/127/63/

This documentation should help you choosing the right RPM for your kernel and Linux distribution, and assist you in installing (and testing) it.

Which RPM

It is important to install exactly the same version of NTFS kernel module as the kernel you have installed. Below are some simple instructions to help you find the file you need.

A quick way to find the version is to use the 'whichrpm' script. Save the file and run it. Then go to the install section.

				

    chmod  700  whichrpm
    ./whichrpm


The script, above, just automates what we will do next. First we need to decide which release you have. Run this command:
				

    cat /etc/redhat-release


and you will probably see one of the following responses:
				

    Fedora Core release 
3  (Heidelberg)
    Fedora Core release 
4  (Stentz)
    Fedora Core release 
5  (Bordeaux)
    Red Hat Linux release 
9  (Shrike)


Next find out your kernel version:

				

    uname -r


You should see a response something like one of these:

				

    
2.4.18 - 3    
    
2.4.18 - 17.7 .x
    
2.4.22 - 1.2115 .nptl
    
2.6.8 - 1.521


The version might also have one of the following suffixes:

				

    smp
    bigmem
    hugemem
    BOOT


Note: If the result ends with smp then you have a multi-processor computer (you probably already knew that).

Next find out what sort of processor you have. This command will ask which kernel rpm was installed for you.

Note: If your version number had a suffix, then use it here, e.g. replace kernel with kernel-smp, or kernel-bigmem.

				

    rpm -q --queryformat 
" %{ARCH}\n "  kernel


Most people will have an i686 processor (a recent Pentium computer). Other options are athlon, i586 or i386.

Next download the RPM. Follow the links for

* Fedora 4 (Stentz)
* Fedora 3 (Heidelberg)
* Fedora 2 (Tettnang)
* Fedora 1 (Yarrow)
* RedHat Enterprise 4 (Nahant)
* RedHat Enterprise 3 (Taroon)
* RedHat 9 (Shrike)
* RedHat 8.0 (Psyche)
* RedHat 7.3 (Valhalla)

When you have downloaded the RPM, we will continue with the installation instructions.

Install

You must be root for the rest of the commands. The examples will continue as if you downloaded kernel-ntfs-2.4.18-14.i686.rpm.

Note: Newer NTFS RPMs have names like


    kernel-module-ntfs-
2.6.8-1.541-2.1.17-0.fc.1.2.i586.rpm


Next install the rpm:

    rpm -ihv kernel-ntfs-2.4.18-14.i686.rpm

    Preparing...      ############################### 
[100%]
       
1:kernel-ntfs  ############################### [100%]


There should be no errors, just some '#'-charakters.

Note: newer NTFS RPMs will also print a message telling you if install succeeded.

If something goes wrong see the Help Section.

This is the only command we actually needed, but we'll go on and test what we have done.

Next load the kernel module


    /sbin/modprobe ntfs


There should be no output. If there are a lot of error messages see the Help Section.

The next command, dmesg prints the kernel logs. We search them for NTFS using grep.


    dmesg | grep NTFS

    NTFS driver v1
.1.22 [Flags: R/O MODULE]


We can now check that the kernel really understands NTFS. The output may vary slightly, but you are looking for the entry ntfs.


    cat /proc/filesystems

    nodev   rootfs
    nodev   bdev
    nodev   proc
    nodev   sockfs
    nodev   tmpfs
    nodev   shm
    nodev   pipefs
            ext3
            ext2
    nodev   ramfs
    nodev   devpts
            ntfs


 

Mount

Mounting an NTFS Volume is covered in more detail in Section 4 of the Linux-NTFS FAQ (in the Wiki).

First you need to know which device your NTFS Volume is on and you need to create a directory as a mount point.

    /sbin/fdisk -l


The output might look like:

    Disk /dev/hda: 64 heads, 63 sectors, 4465 cylinders
    Units = cylinders of 4032 * 512 bytes

       Device Boot    Start       End    Blocks   Id  System
       /dev/hda1             1      2125   4283968+  07  NTFS/HPFS
       /dev/hda2          2126     19851  35735616   0f  Win95 Ext'd (LBA)
       /dev/hda5   *      2126      4209   4201312+  83  Linux
       /dev/hda6          4210      4465    516064+  82  Linux swap
          

    mkdir /mnt/windows
    mount /dev/hda1 /mnt/windows -t ntfs -r -o umask=0222
    ls -l /mnt/windows

    ...
    -r-xr--r-- 1 root root  9719 Aug 24 1996 ansi.sys
    -r-xr--r-- 1 root root 15252 Aug 24 1996 attrib.exe
    -r-xr--r-- 1 root root 28096 Aug 24 1996 chkdsk.exe
    -r-xr--r-- 1 root root  5175 Aug 24 1996 choice.com
    ...


Hopefully everything is working for you now.

Note: Now, please read the NTFS FAQ (Frequently Asked Questions, in the Wiki), especially if you want to know:

* How to change the owner or permissions of the mounted partition (Section 4.9) * How to have Linux mount the partition automatically at boot time (Section 4.10)

Uninstall

If you wish to remove the NTFS RPM, first list all the RPMs with ntfs in their name. You output might look something like this:

    rpm -qa | grep -i ntfs

    kernel-module-ntfs-2.6.9-1.667smp-2.1.20-0.fc.1.2


Then, cut and paste the name into the rpm erase command:

    rpm -e kernel-module-ntfs-2.6.9-1.667smp-2.1.20-0.fc.1.2
posted @ 2006-04-06 14:49 思考 阅读(468) | 评论 (0)编辑 收藏

      为了充分教研室服务器的资源,打算在服务器上安装一个流媒体点播系统。为此,选择使用Real公司的Helix产品。只要有合适的License,Helix可以支持绝大多数的流媒体格式,包括:
RealNetworks:          RealAudio (.rm, .ra), RealVideo (.rm, .rmvb), RealPix (.rp),RealText (.rt), Multi-Rate Container (.mrc)
Macromedia:             Flash (.swf)
Microsoft:                 Windows Media (.asf, .wma, .wmv)
Apple:                      QuickTime (.mov)
Standards-Based:      MPEG-4, MP3
Image Formats:         GIF (.gif), JPEG (.jpg, jpeg), PNG (.png)
Other:                      AU (.au), AIFF (.aif, .ief), WAV (.wav)

      教研室的服务器安装的是Fedora Core 4 x86_64系统,开始只找到了Helix Server 9.0.2.794。安装之后,运行时提示错误:

* Heartbeat Failure 1 (Step 3)

-------------------------------------------------------------------------------
*** Helix Server Heartbeat Failure Report
When: 04-Apr-06 14:09:41
Environment: linux-2.2-libc6-i586-server, , 9.0.2.794
* Heartbeat Failure 2 (Step 3)

-------------------------------------------------------------------------------
*** Helix Server Heartbeat Failure Report
When: 04-Apr-06 14:10:04
Environment: linux-2.2-libc6-i586-server, , 9.0.2.794
* Heartbeat Failure 3 (Step 3)


Helix Server not responding normally...
Heartbeat check disabled
* Heartbeat Failure 4 (Step 3)
* Heartbeat Failure 5 (Step 3)
* Heartbeat Failure 6 (Step 3)
* Heartbeat Failure 7 (Step 3)

在网上找了很多相关的资料,都没解决这个问题。后来考虑可能时系统版本的问题,于是下载了Helix Server 11.0.1.1884。在这个版本自带的文档中介绍了遇到上述问题时,可以在配置文件结尾加入如下3行代码:
<List Name="IPBindings">。
      <Var Address_01="any"/>
</List>
其中,any指得是服务器的IP地址。但是,按照这种方式修改,在我们的服务器上依然存在上面的问题,不知道其它版本的Linux系统是否可以解决。遇到相同问题的人可以尝试一下这种办法。

         在11这个版本中,启动时已经不会出现这个问题了。但是当服务启动了之后,我在本地计算机上无法访问。但是在服务器上通过localhost可以正常使用。这个问题可能是防火墙的问题,于是加入了相应的规则,但是依然无法访问。后来,经过翻阅资料,得知如果是服务器上有多个网卡,需要对其进行绑定。否则,只能通过localhost来访问。原来是这样,在服务器上通过浏览器,在管理员界面加入了相应的规则。重启服务,哈哈,终于可以访问了!

         最后,可以在sample页面对支持的流媒体格式进行测试。在测试的时候,还有一些小的插曲。因为我们现在多数人用的是暴风影音,像我就根本没有安装realplayer。所以,开始是出现rmvb格式的媒体无法观看的问题。后来重新安装了realoneplayer之后解决了上述问题。另外一个让我弄了一个多小时的问题是,无法播放MP3格式的文件。最后,把用来播放MP3的插件——mp3fformat.so的文件从Plugins目录移出,重启系统,再移入,重启系统。后来就可以播放了。具体原因还不知道为什么:?不管怎么样,最后是大功告成了,可以正常使用了。

         接下来的任务就是设置加载点,使用ftp目录中的媒体来供教研室的同学访问了。

PS:Helix似乎不支持中文,所以接下来可能要作一件事情,就是如何将中文文件名可以被使用。

posted @ 2006-04-04 14:39 思考 阅读(2390) | 评论 (3)编辑 收藏

dmesg   查看启动信息
chkconfig   配置启动信息
setup         图形化的安装配置信息

makewhatis    为man手册页建立索引
whatis            以完整字符匹配的方式查询man手册页
apropos         查询man手册页

updatedb      建立和更新slocate的数据库
slocate         以更安全的方式向用户提供在整个文件系统中搜索有权限的文件
locate            slocate的符号连接,在GNU Linux下
whereis         定位源文件、二进制文件和手册页

rpm -ivh      安装RPM包
rpm -e         删除RPM包
rpm -qpl      RPM包中的文件内容
rpm -qa      查询系统中已经安装的RPM包信息

ntpdate -u    根据指定网络时间服务器的时间更新系统时间

mount -t vfat -o CHARSET=cp936
                     可以显示Windown FAT32系统中的中文

posted @ 2006-03-31 11:19 思考 阅读(308) | 评论 (0)编辑 收藏
     摘要: F1 打开帮助。 ...  阅读全文
posted @ 2006-03-28 23:12 思考 阅读(256) | 评论 (0)编辑 收藏
前一段时间因为搞鉴定,所以就把手头的工作停了下来,现在搞完了,可以继续写些东西了。
posted @ 2006-03-28 14:29 思考 阅读(134) | 评论 (0)编辑 收藏
昨天同组的在安装GT4后,启动容器时发生上面的错误。
因为我使用相同的方法在另外一台服务器上已经成功安装,并且没有问题。所以这个问题让我们很多人都不知道如何是好。后来用-debug参数启动进行分析,只有可能是数据库的问题。因为两台服务器上mysql的数据库的版本不同。所以我们怀疑是mysql的connector的版本不同造成的。
今天早晨下了一个3.2.0版本的connector,将原先的3.1.10版本的connector替换掉问题就解决了。
但是,后来发现问题不是这个版本造成的。因为3.1.10版本的connector包含了两个文件:
               mysql-connector-java-3.1.10-bin-g.jar
               mysql-connector-java-3.1.10-bin.jar
只要把mysql-connector-java-3.1.10-bin-g.jar的文件删掉也可以成功启动。
后来看了一些connector的说明文档,发现带-g的是用来做debug用的。
posted @ 2005-10-29 16:35 思考 阅读(6034) | 评论 (3)编辑 收藏
刚才在安装mysql之后,用netstat -a |grep 3306来查看mysqld是否已经运行的时候,发现无法查看。
后来高手指点说,应该将命令改为netstat -an |grep 3306。果然,这样一改,可以看到了。原来-n参数是指用数字来代替使用可能的host、port或user name。所以要使用这个参数。相反,如果命令改成这样,也应该可以正确执行:
netstat -a |grep mysql
posted @ 2005-10-27 18:21 思考 阅读(209) | 评论 (0)编辑 收藏

困扰我多久的在SecurityCRT中登录Linux是,有些英文显示出现乱码。
今天无意间发现了SecurityCRT帮助文件中Strip 8 bit的修改。才想到可能是这个问题。
随后,选择在Options->Session Options->Terminal->Advanced下面的Strip 8 bit选项。应用后在此键入可能造成乱码的命令,如man route。发现原先显示乱码的部分变成了英文了:)
分析原因,是因为在纯英文终端上(最原始的终端类型),每个英文字母是用7位表示的。而后来为了增加对其它语言的支持,又加入了第8位。这就是当初使用BBS是,telnet后面要加入-8的参数的原因。但是正是因为这样,我们的Linux服务器没有配置中文的支持,所以以7位方式来传输英文。而这时SecurityCRT安装8位进行解释,可能就造成乱码的错误。

posted @ 2005-10-27 18:05 思考 阅读(1529) | 评论 (1)编辑 收藏

which - shows the full path of (shell) commands.
whereis - locate the binary, source, and manual page files for a command.
slocate - Security Enhanced version of the GNU Locate. 
          Secure  Locate  provides  a  secure  way to index and quickly search for files on your system. It uses
       incremental encoding just like GNU locate to compress its database to make searching faster, but it  will
       also store file permissions and ownership so that users will not see files they do not have access to.

          This  manual page documents the GNU version of slocate.  slocate Enables system users to search entire
       filesystems without displaying unauthorized files.

tee - read from standard input and write to standard output and files
vipw, vigr - edit the password or group files
cat - concatenate files and print on the standard output
cat /etc/passwd

id - print real and effective UIDs and GIDs
who - show who is logged on
users - print the user names of users currently logged in to the current host
finger - user information lookup program

!! - execute the last command

posted @ 2005-10-26 16:25 思考 阅读(270) | 评论 (1)编辑 收藏

        前天给学生上课,想给大家演示一个JDBC的小程序的调试过程。开始一切都十分顺利,通过修改拼写错误和语法错误,程序可以正常编译了。下面的步骤就是运行程序显示结果了。

       可是当我在命令行里面键入:
               java CreateStudent
时,系统弹出如下错误提示:
               Exception in thread "main" java.lang.NoClassDefFoundError: CreateStudent
当时我找了很多地方都没有发现问题。

       后来等我回来,在网上找了一些资料才发现,原来需要在CLASSPATH中加入“.”,程序才能正常运行。或者在运行时加入参数-cp或-classpath,如:
               java -classpath . CreateStudent
这样问题就解决了!

posted @ 2005-10-21 09:21 思考 阅读(59133) | 评论 (19)编辑 收藏
ldconfig - configure dynamic linker run time binding
ELF- Executable and Linking Format
GSI - Grid Security Infastructure
GSS-API - Generic Security Service Application Program Interface

推荐两本Tcl/Tk的书
Tcl and Tk Toolkit , John K. Ousterhout(Tcl/Tk
的创始者), Addison Wesley 1994
Practical Programming in Tcl and Tk Brent B. Welch, Prentice-Hall, 1995
 
下面是一些可以找到Tcl/Tk的地方...
ftp://ftp.cs.berkeley.edu.tw/ucb/tcl
ftp://ftp.ibp.fr/pub/tcl
ftp://src.doc.ic.ac.uk/packages/tcl/
ftp://ftp.luth.se/pub/unix/tcl/
ftp://sunsite.unc.edu/pub/languages/tcl/

ftp://ftp.funet.fi/pub/languages/tcl/

posted @ 2005-10-16 16:20 思考 阅读(205) | 评论 (0)编辑 收藏
今天是第一天,一早来到教研室。还好陈先到了,不然就进不了安全门了:)

早晨收到了女友的短信,挺高兴的!
posted @ 2005-10-01 10:40 思考 阅读(321) | 评论 (0)编辑 收藏
昨天帮老婆买了专业课的教材
花了一天半的时间帮她把人家上课勾画的东西Copy了一边
弄得我是头昏眼花,四肢发麻,腰算背疼啊!
最后我连黑色跟蓝色都分不清楚了。

是不是第一例色盲或色弱患者就是长期像我这样劳累,最后
基因突变造成的啊?

今天中午把书记过去了,花了六十多!
嗨,累死了拉倒,
下辈子作女人!
posted @ 2005-09-25 21:45 思考 阅读(370) | 评论 (0)编辑 收藏

前天听同学说成都伊藤超市里有买的,今天去看看传说中的百里香是什么样的:)

posted @ 2005-04-15 10:56 思考 阅读(537) | 评论 (2)编辑 收藏
大家还记得《毕业生》歌曲中的歌词嘛?其中就有提到了thyme。昨天收拾房间的时候,发现了朋友留下的空心粉,记得他从国外回来的时候给我们做过。所以,索性自己也来试一试:)
可是当我在网上看了做法时候,发现还要加“百里香”和奥利根努oregano 。下面是我找到的相关资料,贴出来。


學名:Thymus vulgaris

科名:唇形科

別名:麝香草

種類:百里香的品種極多,包含了約350種帶有香味的常綠灌木或小灌木。多栽種於英國、美國和法國。莖長20公分,長著迴旋狀的葉片,有金黃色、銀色、黃色等顏色。花朵為白色、粉紅色、紫色。大都是小型叢生或匍伏成毯的植物,因品種不同,分直立性及蔓生性﹝或稱鋪地香﹞。台灣常見的品種有開白花的百里香(common,garden thyme)(直立型),及開紅花的鋪地香(Creeping or wild thyme)又名紅花百里香(匍匐型)。

產地:原生於歐亞大陸的岩石區或乾燥草原。現於西班牙、法國、阿爾及利亞、英國、美國、南斯拉夫都可見到。

生長期:多年生。春天播種、夏天開花。

特徵:多年生草本植物。生命力強韌、完全耐寒。全株都有芳香的氣味,特別是葉片有濃郁的香味,可以散佈得很廣。高約30公分。葉子對生,呈橢圓形,葉面邊緣會略向背面翻捲。

                            種植要點:喜日照、排水通風良好

               種植方法:扦插、分株、播種。適度修剪可促使側芽生長,讓植株茂盛,扦插繁植存活率高。

作用:

        百里香自古即被視為藥用植物,今日也被廣泛的運用在芳香療法中;另外也被廣為用於烹飪、養生香草茶中。

百里香豐富的麝香草酚成份,可以鎮靜、提振精神、消除疲勞、強心、抗風濕、恢復體力、減輕婦女經痛。可用泡澡來舒緩和鎮定神經,或溶入化妝水中可恢復疲勞;可強化肺臟,浸劑中加蜂蜜可治感冒、喉嚨痛、止咳化痰、保護呼吸道,尤適於處理扁桃腺炎、支氣管炎等症狀;還能刺激白血球的製造,協助身體抵抗疾病,控制細菌蔓延,有助於免疫系統;泡茶能幫夠助消化、消除腸胃脹氣並解酒,對提振消化系統特別有助益,也能改善胃部不適引起的頭痛;能健化頭皮,對頭皮屑和抑制落髮十分有效;也可使皮膚的傷口、瘡、濕疹早日復原。

另外還有殺菌、防蟲、去腥味、防腐的作用,所以廣泛應用在料理及食品保存劑上,葉片可結合各式肉類、魚貝類料理。

                            歷史與神話:

希臘神話中說,百里香是維納斯的眼淚所幻化出來的,因為她聽聞特洛伊戰爭死傷慘重,而她不忍心這麼多人傷亡,便傷心掉淚,淚珠落地後就誕生了百里香。從中古世紀起,百里香就被賦予勇氣和活力的象徵。貴婦人會在裙子繡上百里香和一隻蜜蜂,然後送給騎士,象徵勇氣與活力。

百里香原產地中海沿岸,所以有古希臘的山被百里香的芳香保護著的說法。因濃郁的香味,總是引來蜂群的圍繞,就好似黏暱的求婚者。因此古希臘有個傳說,思春的少女只要在衣裳上繡上百里香的圖樣,或身上別株百里香,就意味著要尋找愛人,等待追求者的示愛。

百里香在古代藥典申出現的時間很早,它也是製作香水的主要成分之一。事實上,百里香其名之希臘字根即為「使之芬芳」,因此它常被使用來薰香,在希臘神祉的神壇前燃燒。

據說,是羅馬人將百里香引進歐陸各地。百里香強烈的抗菌特質,讓它在中世紀後期的司法系統裡扮演了很重要的角色,法官通常會帶著成束的百里香上法庭,以防細菌感染。

圖片:

                              

                           薰衣草百里香                                         銀斑百里香                             

                                           

                                檸檬百里香  

posted @ 2005-04-11 10:02 思考 阅读(1312) | 评论 (0)编辑 收藏

在上英语口语课的时候老是要求叫作业,格式采用APA(American Psychological Association)制定的格式标准。由于对它不是很了解,所以简单地做了一下研究。在这里写出我的心得体会跟大家共享,希望对其他人有能有所帮助。

虽然APA格式是由美国心理学会制定的,但是它不仅适用于心理学,同时还可以应用的到社会学、护理学等其他科学领域。这个主要是根据老是的要求。同时指出,当APA的格式跟老是给出的格式发生出入时,以任课老师给定的格式为准。

页面格式
      我们将从以下六个方面介绍APA格式的页眉格式设置问题。
      页边距,页边距是指文字(不包括页眉和页脚)距离页面边框的距离。如果选择竖着打印,由于通常左面有装订线,所以要比右边多一点。APA格式要求所有页边距至少为1英寸,同时左对齐,右边可以是参差不齐的。在Word 2003中,为了产生比较理想的效果,可以将页眉的距离设成1英寸,同时将页边距的上边距设为1.3英寸。
      字体,使用12pt的Tiems New Roman或Courier字体。
      行间距,APA格式要求通篇文档采用双倍行距。其中包括引用、参考列表、作者信息(author identification notes)、内容脚注、图片说明和表格的所有部分。
      标点符号空格,分别在逗号、冒号和分号后面,在句子结尾的标点符号后面,在分隔参考引用部分的句号后面,在名字自首大写字母句号的后面,加入一个空格。在缩写内的句号后面没有必要加入句号,如:U.S.,p.m.,e.g.。
      页眉和页号,页眉的标题使用题目的头两个或三个字母。页号从第一页开始。并且将页眉和页号之间使用5个空格,采用右对齐。比如我们的题目是:Death Penalty Decreases Crime: That is Undoubtedly。这样,我们的页眉和页号看起来应该是这样的:
                                                                                                                                                            Death Penalty     1
      段落缩进,段落的首行要缩进5到7个空格,文章的其他部分,除了摘要、块引用、文章标题、标题、表头、注释和图片说明,都使用左对齐方式。
      标题页,在右上角是页眉和页号,下面是Running head。Runnig head左对齐,中冒号“:”跟后面的分开。同时,将标题的前4个或5个字母作为Running head,但是千万不要超过5个。可以选择使用大写。紧跟着后面就是文章的标题,居中书写。后面是作者的表示信息,同样居中书写。标题页看上去是这样的:
                                                                                                                                                            Death Penalty     1
Running head: DEATH PENALTY DCREASES CRIME



Death Penalty Decreases Crime:

That Is Undoubtedly

Likun Han    200510501001

Yuanxun Li    200510301007

Heng Liu    200410602016

Tiejun Wang  200410602017

Ke Lian     200510701006

University of Electronic Science and Technology of China

      摘要,要求在120字内介绍文章的内容。摘要页是文章的第二页,如果有的话。Abstract位于第一行,居中。另外一个需要主意的是,摘要的段落格式是没有缩进的,而且只有一段。

文章的顺序是:
      标题页
      摘要
      正文
      参考文献
      附录
      脚注
      表
      图片说明
      图片


APA标题,一共有5级标题。不过通常使用的只有3级,分别为:
居中标题,每个单词的首字母要大写

Death Penalty Decreases Crime:

That Is Undoubtedly


左起平的标题,斜体,每个单词的首字母要大写
Death Penalty Fails to Rehabilitate
缩进标题,斜体,只有首字母大写
      Life is Sacred.


参考文献,要求在新的一页中居中书写References。APA格式要求每个参考文献条目采用挂起缩进格式,即首行左对齐,而参考文献条目的其他行采用缩进格式。如:

posted @ 2005-04-04 01:21 思考 阅读(17291) | 评论 (7)编辑 收藏

去除页眉横线
   1、改变页眉的样式为“正文”
   2、取消页眉的边框格式
   3、编辑-清除-格式
在同一行中使用多种对齐效果
   可以分别将鼠标移到空白行的“左侧”、“中间”和“右侧,当发现鼠标指针变形后,双击就可以实现相应的对齐方式

posted @ 2005-04-04 01:00 思考 阅读(924) | 评论 (0)编辑 收藏