2008年12月22日星期一

IE无法正常登陆邮箱?部分网页无法正常浏览?无法缩略图查看文件?

IE无法正常登陆邮箱?部分网页无法正常浏览?无法缩略图查看文件?



有遇到过E-mail,输入帐号密码后,页面空白,但状态栏显示完毕;有遇到过部分网页打开后空白,无法正常浏览;以下文字可能会对你有所帮助。在说解决方法前,先介绍一下与修复紧密相关的Regsvr32命令。(如果不想了解,请直接跳过,看文章最后的“解决实例”部分)

Regsvr32命令
在windows的system32文件夹下有一个regsvr32.exe的程序,它就是windows自带的activex注册和反注册工具。

regsvr32的用法为:
"regsvr32 [/s] [/n] [/i(:cmdline)] dllname”。其中dllname为activex控件文件名,建议在运行前将第三方activex控件文件拷贝到system32文件夹下。
参数有如下意义:
/u——反注册控件
/s——不管注册成功与否,均不显示提示框
/c——控制台输出
/i——跳过控件的选项进行安装(与注册不同)
/n——不注册控件,此选项必须与/i选项一起使用

执行该命令的方法:
1、可以在“开始”--“运行”,调出运行的对话框,也可以使用Win+R热键,然后直接在输入栏输入即可
2、在开始--运行 输入cmd,调出‘命令提示符’窗口,然后再执行regsvr32命令。


解决实例:(修复IE浏览器方法在此不作实例介绍了,有需要可点击相关文字查看链接)

一、运行下两条 (本实例即可解决email,输入帐号密码后,页面空白问题)
regsvr32 jscript.dll,
regsvr32 vbscript.dll,
作用:
1、跟以前讲的修复IE浏览器方法配合使用(可以不配),可以很好的解决浏览某些网页无法正常显示和功能不正常,如:
a.不显示某些验证码
b.不显示某些动态图片
c.不显示某些论坛的帖子列表
d.论坛快速跳转功能无用
e.论坛发贴时按Ctrl+Enter提交无反应
f.email,输入帐号密码后,页面空白,但状态栏显示完毕
2、修复个别窗口空白,如XP的‘搜索’功能的搜索助理操作面板空白、系统还原页面空白和用户帐户页面空白等。(可修复把握度100%)
3、解决windows media player 9或以上版本打开时提示‘出现内部应用程序错误’。(可修复把握度100%)
4、可以修复win 2000的‘添加/删除程序’打开后一片空白。(可修复把握度99%)

二、修复无法缩略图查看文件问题
2000: 开始→运行,输入regsvr32 thumbvw.dll
XP: 开始→运行,输入regsvr32 shimgvw.dll

三、解决打开系统功能时无反应
regsvr32 shdocvw.dll
作用:
有时从开始菜单里点击XP系统的搜索功能、帮助和支持或管理工具等,但就是无任何反应,这是它们的打开方式缺少关联,所以我们只要用regsvr32注册它们需要调用的动态连接库文件就行了。

四、修复添加/删除程序打不开 (部分与修复IE的注册项重复)
regsvr32 appwiz.cpl
regsvr32 mshtml.dll
regsvr32 jscript.dll
regsvr32 msi.dll
regsvr32 "c:\program files\common files\system\ole db\oledb32.dll"
regsvr32 "c:\program files\common files\system\ado\msado15.dll"
regsvr32 mshtmled.dll
regsvr32 /i shdocvw.dll
regsvr32 /i shell32.dll
作用:
当打开控制面板中的添加/删除程序时,双击它的图标后无反应,或者打开后自动关闭了,尝试使用以上命令可以解决。

2008年12月15日星期一

EBS R12 多节点安装

开启vncserver服务,然后作以下设置(默认VNC服务不启动)
5.1 设置/etc/sysconfig/vncservers
去掉以下两行注释符
VNCSERVERS="1:myusername"
VNCSERVERARGS[1]="-geometry 800x600"
5.2 启动vncserver,修改vnc口令
#vncserver (如出现口令界面)
#vncpasswd
5.3 打开/root/.vnc/xstartup
去掉以下两行注释
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
以下可选:
修改tvm 为 startkde(KDE环境)
修改tvm 为 gnome-session(KDE环境)
5.4 错误可能:error opening security policy file /usr/X11R6/lib/X11/xserver/SecurityPolicy
ln -s /usr/X11R6/lib/X11/xserver /etc/X11/xserver
可能是软件本身的错误,所以需要修正目录,字体问题也可参照该逻辑修改。
5.5 关闭/启用
vncsever -kill [:num] / vncserver : [num]

hosts文件
以root用户登录系统。
在目录/etc/下找到hosts文件,按照如下方式加入主机名等信息。
127.0.0.1 localhost.localdomain localhost
192.168.0.7 ebsdb.domain.com ebsdb

其中需要注意的是:192.168.0.7是你定的系统的IP地址、ebsdb是主机名、domain.com是域名。在同一行中,主机名写在主机名.域名的后边。比如ebs12写在ebs12.koki.com的后边。
network文件
以root用户登录系统。
检查/etc/sysconfig/network文件中是否包含如下这行,如果没有,则追加这一行。
HOSTNAME=ebsdb.domain.com
检查/etc/sysconfig/networking/profiles/default/network这个文件是否存在。如果存在则删除或者重命名。
网络连通确认
执行ping命令,确保以下命令通过。



以root用户登录系统。编辑/etc/sysctl.conf文件,追加如下内容。

kernel.sem = 256 32000 100 142
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.msgmax = 8192
kernel.msgmnb = 65535
kernel.msgmni = 2878
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144

修改完毕后保存文件,执行 sysctl –p 命令把这些修改反映到当前系统中。
编辑/etc/security/limits.conf文件。在文件的最后追加如下内容:

hard nofile 65535
soft nofile 4096
hard nproc 16384
soft nproc 2047

创建安装目录
以root用户登录系统,执行如下命令

# mkdir /d01 ##用来存放数据库层,应用层和数据库文件等
# chmod -R 777 /d01
# mkdir /stage12 ##用来存放安装文件
# chmod -R 777 /stage12

创建用户
按照标准要创建两个用户分别用来管理数据库层和应用层。但也可以创建一个用户,通过实行不同的环境变量来区分。
以root用户登录系统,执行如下命令:
# /usr/sbin/groupadd dba ##增加一个用户组
# /usr/sbin/useradd –g dba –d /d01 oracledb ##增加一个用户,主目录是/d01
# /usr/sbin/passwd oracledb ##给oracledb添加密码

检验安装的软件包

检验是否存在如下软件包:

rpm -q glibc-2.3.4-2.25
rpm -q glibc-common-2.3.4-2.25
rpm -q binutils-2.15.92.0.2-21
rpm -q compat-libstdc++-296-2.96-132.7.2
rpm -q gcc-3.4.6-3.1
rpm -q gcc-c++-3.4.6-3.1
rpm -q libgcc-3.4.6-3
rpm -q libstdc++-3.4.6-3.1
rpm -q libstdc++-devel-3.4.6-3
rpm –q libaio_0.3.105-2
rpm –q libaio_devel_0.3.105-2 #这个包在第3张光盘上
rpm -q openmotif21-2.1.30-11.RHEL4.6
rpm -q pdksh-5.2.14-30.3
rpm -q setarch-1.6-1
rpm -q make-3.80-6.EL4
rpm -q gnome-libs-1.4.1.2.90-44.1
rpm -q sysstat-5.0.5-11.rhel4 #这个包在第4张光盘上
rpm -q compat-db-4.1.25-9
rpm -q control-center-2.8.0-12.rhel4.5
rpm -q xscreensaver-4.18-5.rhel4.11

注意
这一步千万不能忽视,不要以为在安装Linux的时候已经默认安装了全部开发软件包就万事大吉了。事实上,上边的sysstat-5.0.5-11.rhel4和libaio_devel_0.3.105-2的软件包并没有被默认安装。而这2个文件的漏缺,会分别导致在安装过程中安装数据库出错和安装完毕后连接Forms的时候出现错误FRM-92101。
在检验以上软件包是否已经被安装的时候,可以通过以下的命令进行模糊查询:
#rpm –qa | grep 软件包的前边几个字符
如果没有发现以上的软件包被安装,或者安装的版本比列出的低的话,在Linux安装盘上去寻找然后安装。安装的方法,如果是在图形环境里的话双击运行就可以了。和Windows没有什么两样。但最好通过rpm来安装。确认并安装完所有的包后,运行 ldconfig –v
修改以上建立的oracle用户的系统登录文件
以oracle用户登录系统,修改oracle用户的登录文件.bash_profile,追加如下两行:
LD_ASSUME_KERNEL=2.6.9-78 #这个可以通过在Linux运行uname –r来获得
export LD_ASSUME_KERNEL
放置Oracle产品信息的Global Inventory的创建
以Oracle用户登录系统,执行如下命令:
$ mkdir /d01/oraInventory
以root用户登录系统,创建如下文件:/etc/ oraInst.loc
文件内容:
inventory_loc=/d01/oraInventory

以上DB和AP服务器都要进行如上设置
……………………………………………………………………………………………………………………
DB 节点
添加用户
Groupadd dba
Useradd –g dba –d /d01 oracledb
Passwd oracledb
安装jdk1.50
Chmod 777 jdk-1_5_0_15-linux-i586-rpm.bin
./ jdk-1_5_0_15-linux-i586-rpm.bin
建立LINK:
ln -s jdk /usr/java/jdk1.5.0_10
在/etc/profile增加以下变量:
export JAVA_HOME="/usr/jdk"
export CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib:.
export PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin
在用户oracledb/d01目录下的.bash_profile中添加如下变量说明
PATH=$PATH:$HOME/bin:/usr/java/jdk1.5.0_10/bin:/usr/java/jdk1.5.0_10/jre/bin
export PATH
运行./rapidwiz
进行安装
在Database Node configuration 输入你的DB节点的信息
我的是
Databse type: Fresh Database
Database SID: PROD
Host Name: ebsdb
Domain name. Domain.com
Operating system linuxt (32bit)
Database OS user: oracledb
Database OS Group: dba
Base directory: /d01/oracle/PROD
在Selcet Country - specific Functionalities
添加 China-CN
在Select Internationalization settings
添加Simplified_Chinese - ZHS
Default territory: CHINA
其他都设为 UTF8 (注意此项不添加无法进行语言激活与安装)
在Primary application node configuration输入你的AP节点信息
我的是
Host Name: ebsap
Domain name. Domain.com
Operating system linuxt (32bit)
Database OS user: oracleap
Database OS Group: dba
Base directory: /d01/oracle/PROD
Instance directory: /d01/oracle/PROD/inst
点击下一步,下一步开始安装
安装完毕后
用户profile设置
在oracledb/.bash_profile 添加:
. /d01/oracle/PROD/db/tech_st/10.2.0/PROD_ebsdb.env 注意.和/之间有一个空格
$source .bash_profile
注:根据APPL所在文件夹去添加路径
保存退出后,执行如下命令,使修改后的生效。
注销oracledb 重新登陆oracledb

确认Oracle home目录
echo $ORACLE_HOME
启动oracle DB
./addbctl.sh start prod ($ORACLE_HOME/appsutil/scripts/PRODebsdb)
启动Oracle db listener
./addlnctl.sh start prod ($ORACLE_HOME/appsutil/scripts/PRODebsdb)


停止数据库服务器和数据库侦听器:(使用oracle用户登录系统)
./addlnctl.sh stop PROD ($ORACLE_HOME/appsutil/scripts/PRODebsdb)
./addbctl.sh stop ($ORACLE_HOME/appsutil/scripts/PRODebsdb)

登录到prod数据库
sqlplus apps/apps@prod
匿名登陆
sqlplus /nolog
以DBA登陆到数据库
connect /as sysdba
以apps登陆到数据库
connect apps/apps

AP 节点
添加用户
Groupadd dba
Useradd –g dba –d /d01 oracleap
Passwd oracleap
安装jdk1.50
Chmod 777 jdk-1_5_0_15-linux-i586-rpm.bin
./ jdk-1_5_0_15-linux-i586-rpm.bin
建立LINK:
ln -s jdk /usr/java/jdk1.5.0_10
在/etc/profile增加以下变量:
export JAVA_HOME="/usr/jdk"
export CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib:.
export PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin
在用户oracleap/d01目录下的.bash_profile中添加如下变量说明
PATH=$PATH:$HOME/bin:/usr/java/jdk1.5.0_10/bin:/usr/java/jdk1.5.0_10/jre/bin
export PATH
从ebsdb(/d01/oracle/PROD/db/tech_st/10.2.0/appsutil)复制conf_PROD.txt到ebsap
在安装 AP 到
Install Oracle Applications - configuration choice
选择 Load the following saved configuration
选择 Browse
选择 conf_PROD.txt
其余的都按下一步。就可以了。

安装完毕后
用户profile设置
在oracleap/.bash_profile 添加:
. /d01/oracle/PROD/apps/apps_st/appl/APPSPROD_ebsap.env 注意.和/之间有一个空格
$source .bash_profile
注:根据APPL所在文件夹去添加路径
保存退出后,执行如下命令,使修改后的生效。
注销oracleap 重新登陆oracleap


启动APPL,用applprod用户登录,打开命令终端
#cd /d01/oracle/PROD/inst/apps/PROD_ebsdb/admin/scripts/
#./adstrtal.sh apps/apps
注:这里一定要先启动数据库然后再启动apps,不然会报错。
关闭系统
停止应用服务器:(使用oracle用户登录系统)
cd /d01/oracle/PROD/inst/apps/PROD_ebsdb/admin/scripts/
./adstpall.sh apps/apps

分别检查进程ps -ef|grep oracleap/oracledb
ps -ef|grep oradb
ps -ef|grep oraprod
ps -ef|grep applprod
kill -9 -1 杀掉所有进程

调整数据库SGA区的大小
默认安装完毕后,数据库的SGA的大小是1G。而我的内存一共才1G。所以就会非常非常的累,我把SGA减小为512M。如果你的内存1.5G以上的话就完全没有必要调整了。
修改Oracle数据库的初始化文件
/d01/oracle/VIS/db/tech_st/10.2.0/dbs/initVIS.ora
修改如下内容
sga_target = 500M ###默认值 1G
pga_aggregate_target = 500M ###默认值 1G

启动应用服务器的时候,上边使用了adstatall.sh这条Shell命令。其实它启动了应用服务器的所有服务。也可以分别启动或停止服务。adstatall.sh中包括的服务和说明如下:

adopmnctl.sh OPMN ./adopmnctl.sh start或stop
adapcctl.sh APACHE ./adapcctl.sh start或stop
adoacorectl.sh OACORE ./adoacorectl.sh start或stop
adformsctl.sh FORMS ./adformsctl.sh start或stop
adoafmctl.sh OAFM ./adoafmctl.sh start或stop
adanctl.sh Report Engin ./adanctl.sh start apps/apps或stop
adcmctl.sh concurrent manager ./adcmctl.sh start或stop
jttfmctl.sh Fulfillment ./jttfmctl.sh或stop

添加中文 登陆到ebs系统 打开system administration->License Manager->Languages-
>选择中文 选择一个基本语言。这里选择中文。下一步->submit 在AP节点 注销重新登录
打开terminal 输入unset LANG 输入adadmin 要求输入SYSTEM口令 输入 manager
要求输入APPS口令 输入 apps 选择 5. Change Maintenance Mode 选择 1. Enable
Maintenance Mode 选择 4. Maintain Applications Database Entities menu 选择 3.
Maintain Muti-Lingual Tables 结束后,一路回车,退出ADADMIN命令。 check language
等待的时间会比较长。我的就等了2个多小时
第一次关闭数据库将会花费比较长的时间。请不要误以为出现了问题而进行强制关闭。如果
确实等了很长时间都没有回应的话,请执行如下命令: (首先按下CTRL+C
(中止正在进行的数据库关闭操作) 再者以sys用户登录。在命令行下输入:sqlplus / as
sysdba 再强制终止。在sql提示符下输入:shutdown immediate
最后在sql提示符下输入:exit 来退出。) 数据库关闭后进入中文补丁所在目录 运行
unset LANG 运行 adpatch 按要求输入system 密码 manager 按要求输入APPS 密码 apps
按要求输入patch文件时:输入 u6394500.drv
再输入APPS密码后与输入,patch文件之间会等待很长时间,我大概等待了2个小时
接下来便是adpatch 过程。 这个过程非常漫长。。。。。。。。9-
20小时之间(由DB服务器的配置决定) UTF8的设定
如果再上述的EBS安装中使用了UTF8字符集的话,那么要对以下的文件进行设定:
/d01/oracle/PROD/apps/tech_st/10.1.2/guicommon/tk/admin/ Tk2Motif.rgb
如果你安装了英文以外其它语言包的话,还要对相应语言包名称下的该文件进行设定,比如
简体中文语言包的话:
/d01/oracle/PROD/apps/tech_st/10.1.2/guicommon/tk/admin/ZHS/ Tk2Motif.rgb 修改前
!Tk2Motif*fontMapCs: iso8859-2=EE8ISO8859P2 修改后 Tk2Motif*fontMapCs: iso8859-
1=UTF8 快照(Snap)更新
所谓快照更新,就是维护文件最近版本的view。一般在进行Patch后,都建议更新一下。进?
型耆煺战峄ǚ驯冉铣さ氖奔洌饫锏幕?个小时。
启动adadmin。(启动方法参考上述章节) 按照如下路径进入快照: [2.Maintain
Applications Files menu] → [4.Maintain snapshot information] → [2.Update
current view snapshot] → [ 1.Update Complete APPL_TOP] 完了后退出adadmin。
关闭维护模式(必需)
这一步非常重要,如果不做的话将不能进入EBS。
启动adadmin。(启动方法参考上述章节)
按照如下路径关闭维护模式
[5. Change Maintenance Mode] → [2. Disable Maintenance Mode]
完了后退出adadmin。
启动应用服务器,登录EBS

EBSr12 多节点安装

开启vncserver服务,然后作以下设置(默认VNC服务不启动)
5.1 设置/etc/sysconfig/vncservers
去掉以下两行注释符
VNCSERVERS="1:myusername"
VNCSERVERARGS[1]="-geometry 800x600"
5.2 启动vncserver,修改vnc口令
#vncserver (如出现口令界面)
#vncpasswd
5.3 打开/root/.vnc/xstartup
去掉以下两行注释
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
以下可选:
修改tvm 为 startkde(KDE环境)
修改tvm 为 gnome-session(KDE环境)
5.4 错误可能:error opening security policy file /usr/X11R6/lib/X11/xserver/SecurityPolicy
ln -s /usr/X11R6/lib/X11/xserver /etc/X11/xserver
可能是软件本身的错误,所以需要修正目录,字体问题也可参照该逻辑修改。
5.5 关闭/启用
vncsever -kill [:num] / vncserver : [num]

hosts文件
以root用户登录系统。
在目录/etc/下找到hosts文件,按照如下方式加入主机名等信息。
127.0.0.1 localhost.localdomain localhost
192.168.0.7 ebsdb.domain.com ebsdb

其中需要注意的是:192.168.0.7是你定的系统的IP地址、ebsdb是主机名、domain.com是域名。在同一行中,主机名写在主机名.域名的后边。比如ebs12写在ebs12.koki.com的后边。
network文件
以root用户登录系统。
检查/etc/sysconfig/network文件中是否包含如下这行,如果没有,则追加这一行。
HOSTNAME=ebsdb.domain.com
检查/etc/sysconfig/networking/profiles/default/network这个文件是否存在。如果存在则删除或者重命名。
网络连通确认
执行ping命令,确保以下命令通过。



以root用户登录系统。编辑/etc/sysctl.conf文件,追加如下内容。

kernel.sem = 256 32000 100 142
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.msgmax = 8192
kernel.msgmnb = 65535
kernel.msgmni = 2878
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144

修改完毕后保存文件,执行 sysctl –p 命令把这些修改反映到当前系统中。
编辑/etc/security/limits.conf文件。在文件的最后追加如下内容:

hard nofile 65535
soft nofile 4096
hard nproc 16384
soft nproc 2047

创建安装目录
以root用户登录系统,执行如下命令

# mkdir /d01 ##用来存放数据库层,应用层和数据库文件等
# chmod -R 777 /d01
# mkdir /stage12 ##用来存放安装文件
# chmod -R 777 /stage12

创建用户
按照标准要创建两个用户分别用来管理数据库层和应用层。但也可以创建一个用户,通过实行不同的环境变量来区分。
以root用户登录系统,执行如下命令:
# /usr/sbin/groupadd dba ##增加一个用户组
# /usr/sbin/useradd –g dba –d /d01 oracledb ##增加一个用户,主目录是/d01
# /usr/sbin/passwd oracledb ##给oracledb添加密码

检验安装的软件包

检验是否存在如下软件包:

rpm -q glibc-2.3.4-2.25
rpm -q glibc-common-2.3.4-2.25
rpm -q binutils-2.15.92.0.2-21
rpm -q compat-libstdc++-296-2.96-132.7.2
rpm -q gcc-3.4.6-3.1
rpm -q gcc-c++-3.4.6-3.1
rpm -q libgcc-3.4.6-3
rpm -q libstdc++-3.4.6-3.1
rpm -q libstdc++-devel-3.4.6-3
rpm –q libaio_0.3.105-2
rpm –q libaio_devel_0.3.105-2 #这个包在第3张光盘上
rpm -q openmotif21-2.1.30-11.RHEL4.6
rpm -q pdksh-5.2.14-30.3
rpm -q setarch-1.6-1
rpm -q make-3.80-6.EL4
rpm -q gnome-libs-1.4.1.2.90-44.1
rpm -q sysstat-5.0.5-11.rhel4 #这个包在第4张光盘上
rpm -q compat-db-4.1.25-9
rpm -q control-center-2.8.0-12.rhel4.5
rpm -q xscreensaver-4.18-5.rhel4.11

注意
这一步千万不能忽视,不要以为在安装Linux的时候已经默认安装了全部开发软件包就万事大吉了。事实上,上边的sysstat-5.0.5-11.rhel4和libaio_devel_0.3.105-2的软件包并没有被默认安装。而这2个文件的漏缺,会分别导致在安装过程中安装数据库出错和安装完毕后连接Forms的时候出现错误FRM-92101。
在检验以上软件包是否已经被安装的时候,可以通过以下的命令进行模糊查询:
#rpm –qa | grep 软件包的前边几个字符
如果没有发现以上的软件包被安装,或者安装的版本比列出的低的话,在Linux安装盘上去寻找然后安装。安装的方法,如果是在图形环境里的话双击运行就可以了。和Windows没有什么两样。但最好通过rpm来安装。确认并安装完所有的包后,运行 ldconfig –v
修改以上建立的oracle用户的系统登录文件
以oracle用户登录系统,修改oracle用户的登录文件.bash_profile,追加如下两行:
LD_ASSUME_KERNEL=2.6.9-78 #这个可以通过在Linux运行uname –r来获得
export LD_ASSUME_KERNEL
放置Oracle产品信息的Global Inventory的创建
以Oracle用户登录系统,执行如下命令:
$ mkdir /d01/oraInventory
以root用户登录系统,创建如下文件:/etc/ oraInst.loc
文件内容:
inventory_loc=/d01/oraInventory

以上DB和AP服务器都要进行如上设置
……………………………………………………………………………………………………………………
DB 节点
添加用户
Groupadd dba
Useradd –g dba –d /d01 oracledb
Passwd oracledb
安装jdk1.50
Chmod 777 jdk-1_5_0_15-linux-i586-rpm.bin
./ jdk-1_5_0_15-linux-i586-rpm.bin
建立LINK:
ln -s jdk /usr/java/jdk1.5.0_10
在/etc/profile增加以下变量:
export JAVA_HOME="/usr/jdk"
export CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib:.
export PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin
在用户oracledb/d01目录下的.bash_profile中添加如下变量说明
PATH=$PATH:$HOME/bin:/usr/java/jdk1.5.0_10/bin:/usr/java/jdk1.5.0_10/jre/bin
export PATH
运行./rapidwiz
进行安装
在Database Node configuration 输入你的DB节点的信息
我的是
Databse type: Fresh Database
Database SID: PROD
Host Name: ebsdb
Domain name. Domain.com
Operating system linuxt (32bit)
Database OS user: oracledb
Database OS Group: dba
Base directory: /d01/oracle/PROD
在Selcet Country - specific Functionalities
添加 China-CN
在Select Internationalization settings
添加Simplified_Chinese - ZHS
Default territory: CHINA
其他都设为 UTF8 (注意此项不添加无法进行语言激活与安装)
在Primary application node configuration输入你的AP节点信息
我的是
Host Name: ebsap
Domain name. Domain.com
Operating system linuxt (32bit)
Database OS user: oracleap
Database OS Group: dba
Base directory: /d01/oracle/PROD
Instance directory: /d01/oracle/PROD/inst
点击下一步,下一步开始安装
安装完毕后
用户profile设置
在oracledb/.bash_profile 添加:
. /d01/oracle/PROD/db/tech_st/10.2.0/PROD_ebsdb.env 注意.和/之间有一个空格
$source .bash_profile
注:根据APPL所在文件夹去添加路径
保存退出后,执行如下命令,使修改后的生效。
注销oracledb 重新登陆oracledb

确认Oracle home目录
echo $ORACLE_HOME
启动oracle DB
./addbctl.sh start prod ($ORACLE_HOME/appsutil/scripts/PRODebsdb)
启动Oracle db listener
./addlnctl.sh start prod ($ORACLE_HOME/appsutil/scripts/PRODebsdb)


停止数据库服务器和数据库侦听器:(使用oracle用户登录系统)
./addlnctl.sh stop PROD ($ORACLE_HOME/appsutil/scripts/PRODebsdb)
./addbctl.sh stop ($ORACLE_HOME/appsutil/scripts/PRODebsdb)

登录到prod数据库
sqlplus apps/apps@prod
匿名登陆
sqlplus /nolog
以DBA登陆到数据库
connect /as sysdba
以apps登陆到数据库
connect apps/apps

AP 节点
添加用户
Groupadd dba
Useradd –g dba –d /d01 oracleap
Passwd oracleap
安装jdk1.50
Chmod 777 jdk-1_5_0_15-linux-i586-rpm.bin
./ jdk-1_5_0_15-linux-i586-rpm.bin
建立LINK:
ln -s jdk /usr/java/jdk1.5.0_10
在/etc/profile增加以下变量:
export JAVA_HOME="/usr/jdk"
export CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib:.
export PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin
在用户oracleap/d01目录下的.bash_profile中添加如下变量说明
PATH=$PATH:$HOME/bin:/usr/java/jdk1.5.0_10/bin:/usr/java/jdk1.5.0_10/jre/bin
export PATH
从ebsdb(/d01/oracle/PROD/db/tech_st/10.2.0/appsutil)复制conf_PROD.txt到ebsap
在安装 AP 到
Install Oracle Applications - configuration choice
选择 Load the following saved configuration
选择 Browse
选择 conf_PROD.txt
其余的都按下一步。就可以了。

安装完毕后
用户profile设置
在oracleap/.bash_profile 添加:
. /d01/oracle/PROD/apps/apps_st/appl/APPSPROD_ebsap.env 注意.和/之间有一个空格
$source .bash_profile
注:根据APPL所在文件夹去添加路径
保存退出后,执行如下命令,使修改后的生效。
注销oracleap 重新登陆oracleap


启动APPL,用applprod用户登录,打开命令终端
#cd /d01/oracle/PROD/inst/apps/PROD_ebsdb/admin/scripts/
#./adstrtal.sh apps/apps
注:这里一定要先启动数据库然后再启动apps,不然会报错。
关闭系统
停止应用服务器:(使用oracle用户登录系统)
cd /d01/oracle/PROD/inst/apps/PROD_ebsdb/admin/scripts/
./adstpall.sh apps/apps

分别检查进程ps -ef|grep oracleap/oracledb
ps -ef|grep oradb
ps -ef|grep oraprod
ps -ef|grep applprod
kill -9 -1 杀掉所有进程

调整数据库SGA区的大小
默认安装完毕后,数据库的SGA的大小是1G。而我的内存一共才1G。所以就会非常非常的累,我把SGA减小为512M。如果你的内存1.5G以上的话就完全没有必要调整了。
修改Oracle数据库的初始化文件
/d01/oracle/VIS/db/tech_st/10.2.0/dbs/initVIS.ora
修改如下内容
sga_target = 500M ###默认值 1G
pga_aggregate_target = 500M ###默认值 1G

启动应用服务器的时候,上边使用了adstatall.sh这条Shell命令。其实它启动了应用服务器的所有服务。也可以分别启动或停止服务。adstatall.sh中包括的服务和说明如下:

adopmnctl.sh OPMN ./adopmnctl.sh start或stop
adapcctl.sh APACHE ./adapcctl.sh start或stop
adoacorectl.sh OACORE ./adoacorectl.sh start或stop
adformsctl.sh FORMS ./adformsctl.sh start或stop
adoafmctl.sh OAFM ./adoafmctl.sh start或stop
adanctl.sh Report Engin ./adanctl.sh start apps/apps或stop
adcmctl.sh concurrent manager ./adcmctl.sh start或stop
jttfmctl.sh Fulfillment ./jttfmctl.sh或stop

添加中文 登陆到ebs系统 打开system administration->License Manager->Languages-
>选择中文 选择一个基本语言。这里选择中文。下一步->submit 在AP节点 注销重新登录
打开terminal 输入unset LANG 输入adadmin 要求输入SYSTEM口令 输入 manager
要求输入APPS口令 输入 apps 选择 5. Change Maintenance Mode 选择 1. Enable
Maintenance Mode 选择 4. Maintain Applications Database Entities menu 选择 3.
Maintain Muti-Lingual Tables 结束后,一路回车,退出ADADMIN命令。 check language
等待的时间会比较长。我的就等了2个多小时
第一次关闭数据库将会花费比较长的时间。请不要误以为出现了问题而进行强制关闭。如果
确实等了很长时间都没有回应的话,请执行如下命令: (首先按下CTRL+C
(中止正在进行的数据库关闭操作) 再者以sys用户登录。在命令行下输入:sqlplus / as
sysdba 再强制终止。在sql提示符下输入:shutdown immediate
最后在sql提示符下输入:exit 来退出。) 数据库关闭后进入中文补丁所在目录 运行
unset LANG 运行 adpatch 按要求输入system 密码 manager 按要求输入APPS 密码 apps
按要求输入patch文件时:输入 u6394500.drv
再输入APPS密码后与输入,patch文件之间会等待很长时间,我大概等待了2个小时
接下来便是adpatch 过程。 这个过程非常漫长。。。。。。。。9-
20小时之间(由DB服务器的配置决定) UTF8的设定
如果再上述的EBS安装中使用了UTF8字符集的话,那么要对以下的文件进行设定:
/d01/oracle/PROD/apps/tech_st/10.1.2/guicommon/tk/admin/ Tk2Motif.rgb
如果你安装了英文以外其它语言包的话,还要对相应语言包名称下的该文件进行设定,比如
简体中文语言包的话:
/d01/oracle/PROD/apps/tech_st/10.1.2/guicommon/tk/admin/ZHS/ Tk2Motif.rgb 修改前
!Tk2Motif*fontMapCs: iso8859-2=EE8ISO8859P2 修改后 Tk2Motif*fontMapCs: iso8859-
1=UTF8 快照(Snap)更新
所谓快照更新,就是维护文件最近版本的view。一般在进行Patch后,都建议更新一下。进?
型耆煺战峄ǚ驯冉铣さ氖奔洌饫锏幕?个小时。
启动adadmin。(启动方法参考上述章节) 按照如下路径进入快照: [2.Maintain
Applications Files menu] → [4.Maintain snapshot information] → [2.Update
current view snapshot] → [ 1.Update Complete APPL_TOP] 完了后退出adadmin。
关闭维护模式(必需)
这一步非常重要,如果不做的话将不能进入EBS。
启动adadmin。(启动方法参考上述章节)
按照如下路径关闭维护模式
[5. Change Maintenance Mode] → [2. Disable Maintenance Mode]
完了后退出adadmin。
启动应用服务器,登录EBS

2008年12月12日星期五

解决感染autorun病毒c,d,e,f盘打不开的办法

电脑中autorun病毒了,c,d,e,f盘双击打不开了,很郁闷,下面就介绍一个解决c,d,e,f盘打不开的好办法,新建个记事本将下面的复制进去,最后把.txt后缀改成.bat,双击就可以了。
@echo on
taskkill /im explorer.exe /f
taskkill /im wscript.exe
start reg add HKCUSOFTWAREMicrosoftWindowsCurrentVersionEXplorerAdvanced /v ShowSuperHidden /t REG_DWORD /d 1 /f
start reg import kill.reg
del c:autorun.* /f /q /as
del %SYSTEMROOT%system32autorun.* /f /q /as
del d:autorun.* /f /q /as
del e:autorun.* /f /q /as
del f:autorun.* /f /q /as
del g:autorun.* /f /q /as
del h:autorun.* /f /q /as
del i:autorun.* /f /q /as
del j:autorun.* /f /q /as
del k:autorun.* /f /q /as
del l:autorun.* /f /q /as
start explorer.exe

2008年12月7日星期日

如何用一个命令同时解压多个zip文件

如何用一个命令同时解压多个zip文件

法一:用分号隔开(适用于对象较少的时候)

# ls
p2848731_11i_SOLARIS.zip p2848731_11i_zhs.zip p4262360_11i_GENERIC.zip
#unzip p2848731_11i_SOLARIS.zip ;unzip p2848731_11i_zhs.zip ;unzip p4262360_11i_GENERIC.zip

法二:

#find . -name '*.zip' -exec unzip {} \;

法三:

#ls *.zip | xargs -n1 unzip

法四:(借用一个循环)

# for i in *

> do

> unzip $i

> done

2008年12月2日星期二

Redhat AS4 添加硬盘

下面我们以原有一块scsi硬盘添加一块新的scsi硬盘为例进行说明。
在服务器上把硬盘接好,启动redhat,以root登陆。
1.确认认到新硬盘执行如下命令
#dmesg|grep sd
如果命令结果中有设备名sdb说明新硬盘已经被操作系统正确识别
(注:linux中scsi硬盘设备名
SCSI的第1个硬盘 /dev/sda,第2个硬盘 /dev/sdb依此类推 )

2.使用fdisk命令对新硬盘进行分区
#fdisk /dev/sdb
进入fdisk模式:
Command (m for help):m //查看fdisk命令帮助
命令简介:n命令创建一个新分区;d命令删除一个存在的分区;p命令显示分区列表;t命令修改分区的类型;l命令显示分区类型的列表;a命令指定启动分区;w命令是将对分区表的修改存盘让它发生作用。

Command (m for help):n //创建新分区

Command action
e extended //输入e为创建扩展分区
p primary partition (1-4) //输入p为创建主分区,这里我们选择p

Partion number(1-4):1 //第一个扩展分区,按需求可以最多分4个主分区
First Cylinder(1-1014,default 1): 1 //第一个主分区起始的磁盘块数,可以选择默认值
Last cylindet or +siza or +sizeM or +sizeK: +1024MB //可以是以MB为单位的数字或者以磁盘块数,这 里我们输入+1024MB表示分区大小为1G
这样我们就创建完一个分区,如果要创建更多分区可以照上面的步骤继续创建。所有分区创建完后用w保存分区。
Command (m for help): w
The partition table has been altered!

保存完成后重启服务器,可以用
#fdisk -l 命令检查刚刚所建分区,可以在返回结果中确认/dev/sdb1的信息

3.格式化分区
用如下命令将新建的分区格式化为ext3
#mkfs -t ext3 -c /dev/sdb1

4.挂载分区
格式化完后我们需要进行挂载分区
#mkdir /test
#mount /dev/sdb1 /test
#df //用df命令进行查看
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 101089 9463 86407 10% /boot
none 62988 0 62988 0% /dev/shm
/dev/sdb1 485906 8239 452580 2% /test //新挂载的分区

为了在每次系统启动时自动挂载新分区,需要修改/etc/fstab文件来进行自动挂载。在文件的末位加入如下一行:
/dev/sdb1 /test ext3 defaults 1 2

这样服务器每次启动都会自动挂载此分区,到此添加新硬盘的工作就结束了
重启后,通过fdisk -l命令可以看到有需要格式化的磁盘/dev/sdc,于是执行命令fdisk /dev/sdc
  进入fdisk界面后打n(新建一分区),开始我选择的是e(扩展分区),然后在分区编号中选择了1,将整个硬盘都分给了这个区,最后通过w命令保存分区信息。可是格式化分区(mkfs.ext3 /dev/sdc1)时却报错:/dev/sdc1: Invalid argument passed to ext2 library while setting up superblock,而通过命令fdisk -l可以看到/dev/sdc1是存在的。
后来尝试着在分区类型处先了p(主分区),再继续下去,就一切正常了。
为了每次系统启动后自动加载该分区,在/etc/fstab中增加这么一行,但后面参数不清楚:
/dev/sdc1 /data2 ext3 defaults 1 1

2008年11月26日星期三

(转)部署Windows Server 2003终端服务

在Windows Server 2003中,终端服务没有被默认安装,需要我们进行手动添加:

  依次单击“开始→控制面板→添加或删除程序”,在“添加或删除程序”对话框中单击“添加/删除Windows组件”选项卡。然后勾选“组件”列表中的“终端服务器”选项。这时可能会弹出一个关于IE安全配置的警告对话框,单击“是”按钮将其关闭并依次单击“下一步”按钮。

  在打开的“为应用程序兼容性选择默认权限”对话框中,系统给出了两种安装模式,即“完整安全模式”和“宽松安全模式”。我们选择“完整安全模式”并单击“下一步”按钮。无需插入安装光盘,文件复制完毕单击“完成”按钮即可。

  ■ 配置终端服务器

  1. 赋予用户权限

  默认情况下只有系统管理员组用户(Administrators)和系统组用户(SYSTEM)拥有访问和完全控制终端服务器的权限,另外远程桌面用户组(Remote Desktop Users)的成员只拥有访问权限而不具备完全控制权。而在很多时候,默认的权限设置往往并不能完全满足我们的实际需求,因此我们还需要赋予某些特殊用户远程连接的权限:

  依次单击“开始→管理工具→终端服务配置”,在打开的“终端服务配置”对话框中双击右侧窗格中的“RDP-Tcp” 连接。打开“RDP-Tcp属性”对话框。然后切换到“权限”选项卡下,单击“添加”按钮,在“输入对象名称来源”编辑框中填入准备赋予权限的用户名(如 hanjiang)并单击“确定”按钮。

  返回“RDP-Tcp属性”对话框后,在“组和用户名称”列表中单击刚刚添加的用户“hangjiang”,然后根据需要勾选权限列表框中的复选框。例如我们勾选允许“来宾访问”、“用户访问”复选框(如图1)。

2. 限制并发连接数量

  默认情况下,终端服务对远程连接不限制数量,并且只允许两个并发管理远程桌面连接。考虑到节约服务器系统资源问题,我们可以对并发连接数量加以限制,以保证服务器保持较高的性能。设置方法如下:

  在“RDP-Tcp属性”对话框中切换至“网卡”选项卡。在“网卡”下拉列表中选中使用RDP-Tcp协议的网卡,然后点选“最多连接数”单选框,并在右侧的微调框中调整并发连接数值(例如:20)。

  3. 设置客户端可用的本地资源

  在“RDP-Tcp属性”对话框中切换至“客户端设置”选项卡,可以勾选“禁用下列项目”区域中的项目以限制对客户端资源的使用。例如在勾选“音频映射 ”复选框后,服务器端的声音将不能通过客户端的声卡播放。而有时用户的需求恰恰相反,比如必须使用本地的打印机。那么这时必须保证“Windows打印机映射”和“LPT端口映射”两项是非选中状态(如图2)。

  ■ 连接终端服务器

  1. 安装客户端

  用户要想远程连接到终端服务器,首先需要安装客户端。假设Windows Server 2003的系统目录在C盘,那么可以在“C:WindowsSystem32ClientTsclientWin32”目录下找到客户端安装程序。通过“ 网上邻居”或其他方式将客户端安装程序分发给客户机并完成安装。

  2. 远程连接

  在客户机上依次单击“开始→所有程序→远程桌面连接”,在打开的对话框中单击“选项”按钮切换至详细的登录对话框。在“计算机名”编辑框中键入终端服务器的IP地址,在“用户名”编辑框中键入“hanjiang”并单击“连接”按钮。出现Windows登录对话框后键入已授权的用户名的密码即可完成连接。

  小提示:当然要想成功连接到终端服务器,必须保证允许进行“远程桌面”连接:右击“我的电脑”→执行“属性”→切换至“远程”选项卡→勾选“允许用户远程连接到您的计算机”复选框。

  ■ 应用实例

  假设用户“hanjiang”不在单位,但是需要在单位服务器的Windows Server 2003环境下运行某一应用程序。这时他就可以在本地机安装终端服务器客户端,然后通过“远程桌面连接”连接至单位的终端服务器进行操作

win2003 安装 UF 852 安装注册错误解决办法

win2003 安装 UF 852 安装注册错误解决办法
复制C:\Program Files\Common Files\System\ado下的
msadox.dll 和 msadomd.dll到c:\windows\system32
运行
regsvr32 msadox.dll
regsvr32 msadomd.dll
修复u852重新启动server

2008年11月21日星期五

Set up LDAP

LDAP ports
By default the LDAP task listens for LDAP client requests over TCP/IP port 389, but the LDAP service can also listen for requests over an SSL port, usually port 636.
Run directory tree verification manually
You Can run directory tree verification manually, for example if you've added document to a directory since you last started the LDAP service.
Tell Ldap VerifyDIT
Note:
If you organization uses more than one Global Domain document, you must select "Yes" in the Use as default Global domain" field of the Global Domain document you want to use LADP service forms.
A DNS domain name retrieved from the OS of the machine on which the LDAP service runs.
The syntax is: user's hierarchical name%notesdomain@hostname
For example Randin Boweker/Marketing/East/Acme%Acme@acme.com
Prevent the LDAP service on the administration server
DA->Configuration->All server documents->select server->edit server->Ports->Internet Ports->Directory
Disable "SSL port status"
Disable "TCP/IP port status"
Save & Close
run restark task LDAP
Disable LDAP service
Add Notes.ini setting "DisableLDAPOnAdmin=1"
Remove LDAP from the Server Tasks on Notes.ini setting
Change LDAP service port and security configuration
DA->Configuration->All server documents->select server->edit server->Ports->Internet Ports->Directory
Enforce server access settings:
Yes to apply the "Access server" and "Not access server" settings set in the server access section on the security tab of this server document to authenticated LDAP clients connecting to the LDAP service over the TCP/IP port.
No (Default) to specify that the LDAP service ignore the Server Access settings.
Save & Close
Run restart task LDAP
Full-text index directories serverd by LDAP
DA->Configuration->LDAP->Settings (If you see the prompt "Unable to locate a server configuration document for this domain. Would you like to create one now?" Click Yes->LDAP tab->Edit LDAP settings->"Automatically FUll Text Index Domino Directory?"
Yes to enable the LDAP service to create and update full-text indexes automatically.
No (default) to prevent the LDAP service from creating and updating full-text indexes automaticlly.
Click Save&Close
Note: If you select No to disable this feature, you must delete manually any full text index(s) which you want to remove.
Choose which method to use
When you use the Domain Configuration Settings document to allow or deny access to an attribute, the access applies to all entries that contain the attribute. However, when you use the database ACL/Extended ACL, you can deny access to an attribute contained in entries at a particular branch of the directory tree.
Use the Domain Configuration settings document to customize anonymous LDAP search access to a directory
DA->Configuration->LDAP->Settings (If you see the prompt "Unable to locate a server configuration document for this domain. Would you like to create one now?" Click Yes->LDAP tab->Edit LDAP settings->"Choose fields that anonymous users can query via LDAP "Select Attribute Types"
Add/Remove attributes on the field.
Click OK ->Save & Close
Enable/Disable LDAP write access
DA->Configuration->LDAP->Settings (If you see the prompt "Unable to locate a server configuration document for this domain. Would you like to create one now?" Click Yes->LDAP tab->Edit LDAP settings->"Allow LDAP user write access"
Yes to allow directory change
No (default) to prevent directory changes via LDAP
Save & Close
Restart Domino server
Rules to follow when this directory is the primary directory and there are multiple matches on the distinguished name being compared/modified
″Don’t modify any″ (default):
Prevents the operation from occurring. The LDAP service returns an error, and you can investigate the duplicate names/naming rules.
″Modify first match″:
v Carries out the LDAP modify, delete, or compare operation on the first entry encountered in a directory enabled for LDAP write operations that matches the distinguished name specified in the operation.
v Carries out the LDAP add operation in the Domino Directory configured in directory assistance database that is enabled for LDAP write operations and has the most specific matching rule and the lowest search order
″Modify all matches″
v Carries out the LDAP modify, delete, or compare operation on all the entries encountered that match the distinguished name specified in the operation.
v Carries out the LDAP add operation in all the Domino Directories configured in the directory assistance database with a matching rule that most specifically matches the distinguished name specified in the add operation, and that are enabled for LDAP write operations.

Timeout
The maximum time, in seconds, allowed for LDAP client searches; default is 0.
Maximum number of entries returned
The maximum number of directory entries the LDAP service returns to LDAP clients as search results; default is 0, meaning that there is no limit. For example, specify 100.
Minimum characters for wildcard search
The minimum number of characters that must precede the first wildcard in a search filter when the wildcard is combined with a substring; default is 1.
Enable LDAP alternate language search
Allow Alternate Language Information documents Yes
DN Required on Bind
Yes to require distinguished names as LDAP client logon names for name-and-password security
No (default) to not require distinguished names for client logon names.
Configuring character encoding for LDAP V2 clients
To support LDAP V2 clients that don’t use UTF-8, you can change the default encoding to prevent the LDAP service from using UTF-8 character encoding for V2 clients. If you prevent the use of UTF-8 character encoding for LDAP V2 clients, then the LDAP service may sometimes be unable to return results containing international characters to V2 clients that use UTF-8.
Note: The LDAP service always uses UTF-8 character encoding when returning results with international characters to LDAP V3 clients, for example, Microsoft Outlook Express clients and Notes clients.
Encode results in UTF8 for LDAPV2 clients
Yes (default) to use UTF-8 character encoding for LDAP V2 clients.
v No to prevent the use of UTF-8 character encoding for LDAP V2 clients.
Add Alternative language for users
DA->People & Groups->Open select people->edit person->Action->Add Alternate Language
Use desktop policy to automate setup of LDAP account for the LDAP service.
DA->People & Groups->Policy->New policy->Desktop Policy->Account
Inherit Default Accounts Settings from Parent
Select to inherit default account settings from parent
Enforce Default Accounts Settings in Children
Select to enforce default account settings in children
Account Names
A descriptive name for the LDAP service account; users see this name in the list of directories the client can search. If you specify more than one account -- for example, an account for another Internet service -- separate account names with commas (,).
Server Addresses
The host name of the server running the LDAP service -- for example, ldap.acme.com.
Protocols
LDAP
Use SSL Connection
Yes to use SSL; otherwise, No.
Show current LDAP service configuration
Tell ldap showconfig
To show the status of LDAP service configuration as well as the status of the LDAP service settings controlled through the NOTES.INI file,
Tell ldap showconfig debug

安装配置MRTG

一:安装网络流量监视[默认5分钟采集一次]

切换到超级用户:
sudo -sH

安装软件:
apt-get install apache2
apt-get install mrtg
apt-get install snmpd

编辑snmpd
vim /etc/snmp/snmpd.conf

查找到类似的行,修改为如下所示:(仅仅修改屏蔽或放开)
# sec.name source community
# com2sec paranoid default public # kommentieren
com2sec readonly default public # <- auskommentieren
#com2sec readwrite default private

重启snmpd服务:
/etc/init.d/snmpd restart

重新生成mrtg的配置文件:
cfgmaker public@localhost > /etc/mrtg.cfg

(注意)如果仅仅监视一个IP地址采用如下命令:
cfgmaker public@192.168.0.1 >> /etc/mrtg.cfg

生成mrtg的主页:
indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html

二安装CPU负载监视[默认5分钟采集一次]

切换到超级用户:
sudo -sH

安装软件:
apt-get install sysstat

建立CPU脚本:
mkdir /opt/mrtg
vim /opt/mrtg/mrtg.cpu
#!/bin/bash
cpuusr=`/usr/bin/sar -u 1 3 | grep Average | awk '{print $3}'`
cpusys=`/usr/bin/sar -u 1 3 | grep Average | awk '{print $5}'`
UPtime=`/usr/bin/uptime | awk '{print $3""$4""$5}'`
echo $cpuusr
echo $cpusys
echo $UPtime
hostname

使脚本可以执行:
chmod +755 /opt/mrtg/mrtg.cpu

修改 /etc/mrtg.cfg 在文件最后加入cpu项目
Target[cpu]: `/opt/mrtg/mrtg.cpu`
MaxBytes[cpu]: 100
Options[cpu]: gauge, nopercent, growright
YLegend[cpu]: CPU loading (%)
ShortLegend[cpu]: %
LegendO[cpu]: CPU us;
LegendI[cpu]: CPU sy;
Title[cpu]: CPU Loading
PageTop[cpu]:

CPU Loading



重新生成索引页面:
indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html

三安装WWW连接数监视[默认5分钟采集一次]

切换到超级用户:
sudo -sH

建立WWW脚本:
mkdir /opt/mrtg
vim /opt/mrtg/mrtg.www
#!/bin/bash
all=`netstat -a | grep www|awk '{print $5}'|sort | wc -l|awk '{print$1 - 1}'`
user=`netstat -a | grep www|awk '{print $5}'|cut -d":" -f1|sort| uniq |wc -l | awk '{print $1 - 1}'`
if [ "$all" = "-1" ]; then
echo 0
else
echo $all
fi
if [ "$user" = "-1" ]; then
echo 0
else
echo $user
fi
UPtime=`/usr/bin/uptime | awk '{print $3 " " $4 " " $5}'`
echo $UPtime
hostname


使脚本可以执行:
chmod +755 /opt/mrtg/mrtg.www

修改 /etc/mrtg.cfg 在文件最后加入www项目
Target[www]: `/opt/mrtg/mrtg.www`
MaxBytes[www]: 500
Options[www]: nopercent, growright
YLegend[www]: Online Users
ShortLegend[www]: %
LegendI[www]: Connect :
LegendO[www]: Online :
Title[www]: WWW Connect
PageTop[www]:

WWW Connect




重新生成索引页面:
indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html

访问:
http://localhost/mrtg/

四安装内存使用监视[默认5分钟采集一次]

切换到超级用户:
sudo -sH

建立RAM脚本:
mkdir /opt/mrtg
vim /opt/mrtg/mrtg.ram
#!/bin/bash
# run this script to check the mem usage.
totalmem=`/usr/bin/free |grep Mem |awk '{print $2}'`
usedmem=`/usr/bin/free |grep Mem |awk '{print $3}'`
UPtime=`/usr/bin/uptime | awk '{print $3""$4""$5}'`
echo $totalmem
echo $usedmem
echo $UPtime
hostname

使脚本可以执行:
chmod +755 /opt/mrtg/mrtg.ram

修改 /etc/mrtg.cfg 在文件最后加入ram项目
Target[ram]: `/opt/mrtg/mrtg.ram`
#Unscaled[ram]: dwym
MaxBytes[ram]: 2048000
Title[ram]:Memory
ShortLegend[ram]: &
kmg[ram]:kB,MB
kilo[ram]:1024
YLegend[ram]: Memory Usage :
Legend1[ram]: Total Memory :
Legend2[ram]: Used Memory :
LegendI[ram]: Total Memory :
LegendO[ram]: Used Memory :
Options[ram]: growright,gauge,nopercent
PageTop[ram]:

Memory



重新生成索引页面:
indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html

访问:
http://localhost/mrtg/

五安装FTP连接数监视[默认5分钟采集一次]

切换到超级用户:
sudo -sH

建立FTP脚本:
mkdir /opt/mrtg
vim /opt/mrtg/mrtg.ftp
#!/bin/bash
all=`netstat -a | grep ftp|awk '{print $5}'|sort | wc -l|awk '{print$1 - 1}'`
user=`netstat -a | grep ftp|awk '{print $5}'|cut -d":" -f1|sort| uniq |wc -l | awk '{print $1 - 1}'`
if [ "$all" = "-1" ]; then
echo 0
else
echo $all
fi
if [ "$user" = "-1" ]; then
echo 0
else
echo $user
fi
UPtime=`/usr/bin/uptime | awk '{print $3 " " $4 " " $5}'`
echo $UPtime
hostname


使脚本可以执行:
chmod +755 /opt/mrtg/mrtg.ftp

修改 /etc/mrtg.cfg 在文件最后加入ftp项目
Target[ftp]: `/opt/mrtg/mrtg.ftp`
MaxBytes[ftp]: 500
Options[ftp]: nopercent, growright
YLegend[ftp]: Online Users
ShortLegend[ftp]: %
LegendI[ftp]: Connect :
LegendO[ftp]: Online :
Title[ftp]: FTP Connect
PageTop[ftp]:

FTP Connect




重新生成索引页面:
indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html

访问:
http://localhost/mrtg/

六安装CPU温度监视[默认5分钟采集一次]

切换到超级用户:
sudo -sH

安装软件:
apt-get install mbmon

建立CPU温度脚本:
mkdir /opt/mrtg
vim /opt/mrtg/mrtg.temp
#!/bin/bash
/usr/bin/mbmon -c 1 -i -T 4 -u -n
exit 0


使脚本可以执行:
chmod +755 /opt/mrtg/mrtg.temp

修改 /etc/mrtg.cfg 在文件最后加入cpu项目
Target[temp]: `/opt/mrtg/mrtg.temp`
MaxBytes[temp]: 100
Title[temp]: CPU Temperature
PageTop[temp]:

CPU Temperature


Options[temp]: gauge,absolute,unknaszero,growright
YLegend[temp]: Temperature(C)
ShortLegend[temp]: (C)
Legend1[temp]: CPU Temperature
Legend2[temp]: M/B Temperature
LegendI[temp]: CPU Temp.
LegendO[temp]: M/B Temp.

重新生成索引页面:
indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html

访问:
http://localhost/mrtg/

七硬盘读写监视[默认5分钟采集一次]

切换到超级用户:
sudo -sH

建立硬盘读写脚本:
mkdir /opt/mrtg
vim /opt/mrtg/mrtg.disk
#!/bin/bash
hd=sda
disk=/dev/$hd
UPtime=`/usr/bin/uptime |awk '{print $3""$4""$5}'`
KBread_sec=`iostat -x $disk|grep $hd |awk '{print 8$}'`
KBwrite_sec=`iostat -x $disk|grep $hd |awk '{print 9$}'`
echo $KBread_sec
echo $KBwrite_sec
echo $UPtime
hostname


使脚本可以执行:
chmod +755 /opt/mrtg/mrtg.disk

修改 /etc/mrtg.cfg 在文件最后加入硬盘读写
Target[disk]: `/opt/mrtg/mrtg.disk`
Title[disk]: Disk HDA I/O Utilization Report
#Unscaled[disk]: dwym
MaxBytes[disk]: 10240000
PageTop[disk]:

Disk I/O Utilization Report


kmg[disk]: KB,MB,GB
LegendI[disk]: Disk I/O KBread/sec
LegendO[disk]: Disk I/O KBwrite/sec
Legend1[disk]: Disk I/O KBread/sec
Legend2[disk]: Disk I/O KBwrite/sec
YLegend[disk]: Megabytes
ShortLegend[disk]: &
Options[disk]: growright,gauge,nopercent

重新生成索引页面:
indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html

访问:
http://localhost/mrtg/

八:磁盘使用

切换到超级用户:
sudo -sH

建立磁盘使用脚本:
mkdir /opt/mrtg
vim /opt/mrtg/mrtg.df
#!/usr/bin/perl
foreach $filesystem (`df -kl | grep -v "Filesystem"`)
{
@df = split(/\s+/,$filesystem);
$total += $df[1];
$usage += $df[2];
}
print "$total\n";
print "$usage\n";
hostname


使脚本可以执行:
chmod +755 /opt/mrtg/mrtg.df

修改 /etc/mrtg.cfg 在文件最后加入
Target[disk]: `/opt/mrtg/mrtg.df`
Title[disk]: Disk Space
Unscaled[disk]: dwym
MaxBytes[disk]: 465247550
kmg[disk]: KB,MB,GB
LegendI[disk]: Total Disk Space
LegendO[disk]: Used Disk Space
Legend1[disk]: Total Disk Space
Legend2[disk]: Used Disk Space
YLegend[disk]: Megabytes
ShortLegend[disk]: &
Options[disk]: growright,nopercent
PageTop[disk]:

Disk Space



重新生成索引页面:
indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html

访问:
http://localhost/mrtg/

九:交换分区

切换到超级用户:
sudo -sH

建立交换分区脚本:
mkdir /opt/mrtg
vim /opt/mrtg/mrtg.swap
#!/bin/bash
# This script to monitor the swap usage.
totalswap=`/usr/bin/free |grep Swap |awk '{print $2}'`
usedswap=`/usr/bin/free |grep Swap |awk '{print $3}'`
echo "$totalswap"
echo "$usedswap"


使脚本可以执行:
chmod +755 /opt/mrtg/mrtg.swap

修改 /etc/mrtg.cfg 在文件最后加入
Target[swap]: `/opt/mrtg/mrtg.swap`
MaxBytes[swap]: 2048000
Title[swap]:Memory State of Server
ShortLegend[swap]: &
kmg[swap]:kB,MB
kilo[swap]:1024
YLegend[swap]: Swap Usage
Legend1[swap]: Total Swap
Legend2[swap]: Used Swap
LegendI[swap]: Total Swap
LegendO[swap]: Used Swap
Options[swap]: growright,gauge,nopercent
PageTop[swap]:

Swap




重新生成索引页面:
indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html

访问:
http://localhost/mrtg/

汉化就是在conf文件里加一个language=chinese或者其它的什么吧,在windows里是这样的,linux下没试过

2008年11月19日星期三

Set up Domino Directroy

The following information is stored on the primary Domino server
Person
Group
Mail-in Database
Resource
Any custom documents you add
Domino Configuration
The configuration server only stores the Domino Configuration information
Change a configuration Directory to a primary Domino directory
DA->Files->open Names.nsf->File->Replication->Options for this application->Space Savers->Select "All Fields" on Include field->Deselect "Documents that meet a selection formula"->OK->make replicate with Domino server.
Restart Domino server
Change a primary Domino to a configuration Directory
DA->Files->open Names.nsf->File->Replication->Options for this application->Space Savers->Select "Configureation Document only" on Include field->Deselect "Documents that meet a selection formula"->OK->make replicate with Domino server.
Note
You can't change the user register server to a configuration server .
Prevent use a Domino Directory as a remote primary
DA->Configuration->server->Current server->Basic->Deselect "Allow this directory to be used as a remote primary directory for other servers"->Save & close
Use Administrator field to control access to individual document
DA->Files->Open names.nsf->open the document which you want to control->Administrator (In the Administrator field, enter the namesof individual administrator or the name of a group of administrators who can edit this document)->Save & Close
Categorize a user by corporatre hierarchy
DA->People & Groups->Select people->edit Person document->Work/Home->Below Hirarchy1, enter categories in the "Leve 0" field by which to sort the user's name (You can add 7 level at most)->Save & Close
Customize the Directory profile
DA->File->open Names.nsf->Action->Edit Directory profile
Change the proper field which you need.
[Domain defined by this Domino Directory
The name of the Domino domain for this directory. Domino completes this field automatically as part of first server setup.
Condensed server directory catalog for domain
The file name for a condensed Directory Catalog used by servers in the domain. As an alternative to using this field, you can specify the file names for individual condensed Directory Catalogs in the ″Directory catalog database name on this server″ field in the Basics section of Server documents. Setting up a directory catalog is optional.
Sort all new groups by default
Choose one:
v Yes to display the members of a new group in alphabetical order.
v No (default) to display members of a group in the order in which you add them. If you select No, you can still override this option and alphabetize members of a specific group.
Use more secure Internet Passwords
Choose one:
v Yes (default) to use strong encryption for Internet passwords.
v No to use less secure encryption available with previous releases of Domino.
Allow the creation of Alternate Language Information documents
Choose one:
v Yes (default) to allow you to create Alternate Language Information documents that enable LDAP clients to search for user information in an alternate language.
v No to prevent the creation of Alternate Language Information documents.
List of administrators who are allowed to create Cross Domain Configuration documents in the Administration Process Requests database
Enter the names of users who can create Cross Domain Configuration documents to allow the Administration Process to submit requests between Domino domains. Scheduling replication of the Domino]

2008年11月10日星期一

Set up the Administration Process

Automates tasks of Administration Process
Name management tasks:
Such as rename person/group, delete person/group/server name, re certify users, and store Internet certificate.
Mail file management tasks:
Such as delete mail file and move mail file.
Server document-management tasks:
Such as store CPU count, Store platform, and place network protocol information in server document.
Roaming user management:
Such as roaming user setup, move roaming users to other servers, upgrade a nonroaming user to roaming status, and downgrade roaming user to nonroaming users
User mail file management tasks:
Such as performing ACL changes and enabling agents.For example, the "Out of Office" agent is enabled and disabled by Notes client users.
Person document management tasks:
Such as storing the user's Notes version and client platform information.
Replica management tasks:
Such as create replica, move replica, or delete all replicas of a database.
Control the size of Administration requests database
DA->File->Select admin4.nsf->right click->Properties->Replication settings->Space saver->
Modify the "Remove document not modified in the last # days" (The default value is 7 days)
Suspend administration request process
DA->Configuration->All Server Documents->Select server->Server task->Administration Process
Suspend admin Process at:
Enter the time of administration requests stops
Restart Admin process at:
Enter the time of administration requests starts
click Save and Close
Force an administration process request to run:
Tell adminp process new/Tell adminp p ne
(Processes request schedule as immediate or interval)
Tell adminp process immediate/ Tell adminp p im
(Processes request schedule as immediate )
Tell adminp process interval / Tell adminp p in
(Processes request schedule as interval)
Tell adminp process daily/ Tell adminp p da
(Processes request schedule as daily)
Tell adminp process delayed/ Tell adminp p de
(Processes request schedule as delayed)
Tell adminp process mail policy/ Tell adminp p ma
(Applies mail policy to affected user's mail file)
Check errors of ADMIN4.NSF
DA->Server->Analyses->Administration requests->All errors by date/All errors by server
Delete errors: "Remove from view"
Reprocess error requests: "Reprocess Select Requests"
Schedule Administration Process requests:
DA->Configuration->All Server Documents->Select server->Server task->Administration
Fill the proper fields
Maximum number of threads:
[Default is 3. You must restart adminp if you have changed the number]
Interval
[The number of minutes that pass between the processing of name-management requests -- rename, delete, and recertify. The default is 60 minutes.]
Execute once a day requests at
[The time when updates to Person documents occur and ″Rename person in unread lists″ requests run. The default is 12 AM.]
Interval between purging mail file and deleting when using object store
[The number of days that pass between running the Object Collect task against a mail file that uses shared mail and deleting the mail file. The default is 14 days.]
Start executing on
[The day on which Updates to Authors and Readers fields in a database and discovery of shared and private design elements for a deleted person occur. The default is Sunday. ]
Start executing at
[The time when the updates to Authors and Readers fields in a database and discovery of shared and private design elements for a deleted person occur. The default is 12 AM.]
Mail file moves expire after
[The number of days during which the Notes client will update mail-related changes. The default is 21 days. Valid values are 7 to 60, inclusive.]
Store Admin Process log entries when status of no change is recorded
[Logs a ″No change″ status entry in the Administration Process log each time a database is scanned to determine whether an administration request requires a change to that database and no change is made. The default is No. Keeping this field set to ″No″ may greatly reduce the size of the Administration Request database.
For more information controlling the size of the Administration Requests database, see the topic ″Controlling the size of the Administration Requests database.″]
Suspend Admin Process at
[(Optional) Time when the Administration Process stops processing requests. To conserve server resources, suspend the Administration Process during peak computer hours.
For more information on suspending the Administration Process, see the topic ″Suspending administration request processing.″]
Restart Admin Process at
[(Optional) Time when the Administration Process starts processing requests again. To conserve server resources, set the Administration Process to restart during non-peak computer usage hours. For more information on suspending the Administration Process, see the topic ″Suspending administration request processing.″]
Add/remove administration server /person:
DA->open "names.nsf"->File->Application->Access control->Extended Access ->Select user /server ->In the Access field , in the allow column, click Administer
Remove
DA->open "names.nsf"->File->Application->Access control->select user/server->Remove

2008年11月7日星期五

用花生壳建立多个邮件域收发邮件实例


用花生壳建立多个邮件域收发邮件实例
1)建立两个Domino域
一个建立在可以连接到internet得主机上可以作为gateway服务器使用。此Domino服务器为
Name: D1
Domain: AAA.net
IP: 192.168.1.2
第二个服务器可以建立在内网任何可以连接到D1的地方. 此服务器为
Name: D2
Domain:BBB.cc
IP:192.168.30
2)D1与D2进行交叉认证
1启动Administrator软件,连接到您的服务器,点击"配置"标签.
2点击右边屏幕"工具"--"验证字"--"交叉验证"
3选择您自己的cert.id或server.id,输入其口令
4选择被验证的对方的cert.id或server.id,点击按钮"交叉验证"
5 把D2的names.nsf 复制到 D1的data目录下改名为d2-names.nsf
6 在notes.ini中添加Names=names.nsf,D2-names.nsf
3)建立两个连接 (Domino Administrator->Messaging->Connection)
D2->D1


D1->D2
把上面连接文档的源和目的进行交换
把relpication/Router下的replication task禁用
4)在D1和D2上分别建立 adjacent 域(Domino Administrator->Messaging->Domain)
D1->D2

D2->D1

5)在D1建立global Domino (Domino Administrator->Messaging->Domain)
1 建立 AAA.net


2 建立 BBB.cc
操作如上图把AAA.net改为BBB.cc就可以了.
6)在D2上设置relay host 为192.168.1.2
Domino Administrator->Configuration->server->Configurations->select server->Basic->
"relay host for messages leaving the local internet domain"
在D1上设置允许外部邮件通过该主机
Domino Administrator->Configuration->server->Configurations->select server->Restrictions & controls ->SMTP inbound Controls->"Allow messages only from the following the ineternet hosts to be sent to external internet Domain"
设置为192.168.1.30
7)
在花生壳的主页
http://www.oray.net/注册一个花生壳护照;
申请两个域名AAA.net 和 BBB.cc
激活域名
在D
1安装并启用一个花生壳客户端,比如花生壳2008
这样就可以同过D1向外发送和接收邮件了
邮件地址分别为
user@AAA.net (D1所在的域)
user@BBB.cc (D2所在的域)

2008年11月5日星期三

如何为大量用户定制自动安装并配置Lotus Notes客户端的方法(转自lotusfans)

作为优秀的群件系统,Lotus Notes在国内有着很广泛的应用。但是对Notes初学者来说,安装和配置它并不是一件简单的事情,特别是在企业内部,如果有很多用户需要安装它,那将是一件很棘手的事情。本文就提供一种为大量用户定制安装并配置Lotus Notes客户端的方法。
一、生成通用的客户端配置文件
虽然Lotus Notes的客户端需要定制安装和配置,但是其中的大部分配置信息是通用的,比如连接方式、指定连接的服务器等。因此我们可以生成一个基本配置,然后在其基础上根据不同用户稍加改动进行定制。我们可以选择一台标准配置的终端进行安装配置(选择企业内部普遍使用的机型和操作系统,这里要求企业内部的电脑配置要一致,最好是一样的)。

安装单个Notes客户端,作为一个Notes管理员应该不是问题,这里不作详细说明。缺省情况下启动后你看到的Notes工作界面有点杂乱无章:很多个工作台标签、在第一个工作台上排列着很多个数据库图标,可是实际情况可能是这样的,我们基于Lotus Notes开发办公系统专门为用户设计了新的界面(比如以某个数据库的导航器作为应用的主导航器),将各种功能进行了新的包装,并不需要用户去直接访问那些“个人邮箱”和“通讯录”等数据库。于是我们可以作如下一些设置:设置运行后直接进入某个数据库的导航器;安排工作台页面;为新邮件到来作提示等等很多个性化的设置(想象一下,如果这些都要手把手的教给每一个最终用户自己去配置,那是一件多么繁琐的事情)。所有这些,我们通过管理员事先的一次标准化配置,都记录在相应的配置文件当中。

最终我们将得到的三个有用的配置文件是,在/notes/data/目录下的:
desktop.dsk
names.nsf
以及在C:/windows目录下的:
notes.ini
有了这三个文件,为其他用户的安装配置就方便多了。当然,我们可以根据需要生成几套不同的配置文件,以针对不同部门或级别的用户安装。当然,个别信息需要针对每个不同的用户来配置,但至少这已经帮助我们减少了很多工作。

二、自动响应安装
实际上Lotus Notes提供税沧翱突Ф说淖远δ埽ㄏ昙镏K幸桓鲎远沧拔募篒NSTNOT.RSP,你可以在它的安装盘目录中找到。该文件中主要内容如下。(每个参数的含义都有英文说明,下文添加了一些中文注释以利表述)

[User Registration]
; 这一段参数用于指定最终用户的基本信息
UserName = AnyUser
CompanyName = MyCompany
[General Information]
; 这一段参数用于指定安装的类型和最终生成的程序组名称
InstallType = 1
ProgramGroup = 某企业办公系统
StartmenuFolder = 某企业办公系统
[NOT]
; 这一段参数用于指定Notes的目录信息,本示例中的参数均指定安装在C盘。
BASEDIR = c:\lotus
NOTDIR = c:\Notes
NOTWORKDIR = c:\Notes\Data
SizeOfInstall = 3
[CustomizeNOT]
; 这一段参数是当前面的SizeOfInstall = 3,即选择自定义安装类型后的具体描述
NOTESPROGRAM = 1
NOTESINTLDIC = 0
NOTESPDATA = 1
NOTESTEMPLATE = 0
NOTESDOCUMENT = 0
NOTESHELP = 0
NOTESHELPLITE = 0
NOTESVIEWER = 0
NOTESBROWSER = 0
NOTESBROWSERSUPPORT = 0
我们可以把这个文件作一个备份,然后根据需求定制它,还可以根据企业中的不同用户群定制多个响应文件以自动完成不同种类的安装配置,分别把它们命名为INSTNOT1.RSP 、INSTNOT2.RSP等,如何使用这些定制好的文件呢,它的注释已经说的很清楚了:
\install.exe /A
实际上在Notes安装目录中还有一个更为具体的定制安装文件,例如指定不安装某个模板文件,或者增加一个新的模板文件。这个文件就是 NOTNODE.INF,它需要和安装目录的另一个文件Install.lst配合使用。这两个文件的使用方法本文不作具体描述,详见该文件内容以及联机帮助“为共享安装而定制安装文件”部分。
最后还需注意的是,把安装目录中的许可文件License.txt改名,这样,在安装开始的时候就不会出现许可协议的提示了。

三、批量生成用户标识符
通常情况下管理员可以用“分别注册新用户”方式为某个用户生成标识符,但是当需要生成大量用户标识符时,这可不是一件轻松的事情。好在 Notes依然为我们提供了批量生成的方法。我们可以使用文本编辑器创建一个文本文件register.txt,包含用于每个用户的下列格式的标识符信息,一个用户一行:
Lastname;Firstname;MiddleInitial;organizational unit; password;IDfiledirectory;IDfilename; homeservername;mailfiledirectory;mailfilename;location;comment;forwarding address;profile name;local administrator
于是,我们可以为一个用户作如下注册定义:
张三;;;信息处;password;c:/notes/data/userid;zhangsan.id;domino/Harbin;;zhangsan.nsf;办公室;;;用户配置简要表1;

文件注册的方法是,从管理面板上,单击“个人”图标并选择“从文件注册”。详情可以参阅联机帮助Domino管理帮助部分的“从文本文件注册一组用户”一节。需要注意的是,在每个用户的注册信息中不要有换行符和回车符的存在。用户标识符生成以后,以适当的途径分发给每个用户。

四、一个简单的自动安装配置程序的实例
有了以上的准备,我们就可以利用各种编程手段(如VB)方便快速的制作一个自动安装配置程序。下面给出一个用DOS批处理命令写的简单的安装程序,旨在阐明具体思路。

假定满足以下条件:用户均在一个企业内部网中,Lotus Notes的安装程序已经放在一台FTP服务器的Notes目录下,该目录中同时包含有前面事先生成的三个配置文件。所有用户都有权访问该服务器。每个用户的标识符user.id均已发到手中。

程序清单如下:
@ECHO OFF
PATH C:\;C:\WINDOWS;C:\WINDOWS\COMMAND;%PATH%
CLS
ECHO ********************************
ECHO 帮助者办公软件安装程序(http://www.oshelper.com/
ECHO ********************************
ECHO.
ECHO 1. 本安装程序适用于WINDOWS95或98,如果是NT请与管理员联系;
ECHO 2. 软件安装于C盘,需40M空间,安装过程还需暂时占用45M空间。
ECHO.
CHOICE " 如果满足以上条件并且您同意安装在C:盘,请按Y键,否则按 N键:"
IF ERRORLEVEL 1 GOTO NEXT1
GOTO QUIT
:NEXT1
 
ECHO 创建临时文件夹
MD MYTEMP>NUL
CD MYTEMP>NUL
ECHO anonymous>setup.dat
ECHO aa@bb>>setup.dat
ECHO user anonymous>>setup.dat
ECHO aa@bb>>setup.dat
ECHO cd notes>>setup.dat
ECHO prompt>>setup.dat
ECHO binary>>setup.dat
ECHO mget *.*>>setup.dat
ECHO quit>>setup.dat
 
ECHO.
ECHO 开始下载安装文件,需要约*分钟时间,如果出错会有提示,请耐心等待....
FTP -v -s:setup.dat ftpserver>NUL
 
IF NOT EXIST INSTALL.EXE GOTO END1
ECHO.
ECHO 开始安装,请稍候....
INSTALL.EXE /A INSTNOT.RSP
 
OOP
ECHO.
CHOICE /C:Y " 注意:安装程序没有完成请不要干预!!! 完成后按 Y键:"
IF ERRORLEVEL 1 GOTO NEXT2
GOTO LOOP
 
:NEXT2
SET ERRORLEVEL = 0
REM 此处为用户进行缺省配置
COPY NAMES.NSF C:\NOTES\DATA\NAMES.NSF>NUL
COPY DESKTOP.DSK C:\NOTES\DATA\DESKTOP.DSK>NUL
COPY NOTES.INI C:\WINDOWS\NOTES.INI>NUL
REM 如果当前执行批处理命令的目录下有用户标识符文件
REM 则将用户标识符文件拷贝到用户数据目录下
IF EXIST ..\*.ID COPY ..\*.ID C:\NOTES\DATA>NUL
IF ERRORLEVEL 1 GOTO END2
 
ECHO.
ECHO 安装成功!
GOTO END
 
:END1
ECHO.
ECHO 网络没有连通,下载安装文件失败,请与管理员联系。
GOTO END
 
:END2
ECHO.
ECHO 安装已完成,但初始化配置失败,请与管理员联系。
 
:END
ECHO.
IF NOT EXIST ..\MYTEMP\*.* GOTO QUIT
ECHO 删除临时文件夹
ECHO Y|DEL *.*>NUL
CD ..
RD MYTEMP
 
UIT
ECHO.
ECHO 结束!
通过以上安装程序,用户不必进行任何干预,喝杯咖啡的功夫,打开的工作台界面就等着他操作了。

2008年11月4日星期二

毗邻域建立,与互发邮件的设置

(一)交叉验证
1启动Administrator软件,连接到您的服务器,点击"配置"标签.
2点击右边屏幕"工具"--"验证字"--"交叉验证"
3选择您自己的cert.id或server.id,输入其口令
4选择被验证的对方的cert.id或server.id,点击按钮"交叉验证"
否则会出现以下错误提示:
Error connecting to server LT/mail: Server error: You are not authorized to use the server
Or
Router: Unable to open mailbox file mail.box: You are not authorized to use the server on remote server
(二)创建连接文档
1启动Administrator软件,连接到您的服务器,点击"配置"标签.
2选择"服务器"视图下的"连接"子视图,点击按钮"添加连接"
3选择连接类型,
如果是局域网,或是利用VPN或DDN组成的局域网。
连接类型选择 Local Area Connection.
需要注意的是域名
源域 (Source Domain) 一定要使你创建服务器时使用的那个域名.
否则会报 连接没有使用的错误
Router: Connection from server NL/NDM not used; Server not in local domain.
目标域的域名 一定要与 下一步建立的adjacent Domain 的名字相同.
不然邮件会在Mail.box里面形成死信.
(三)创建相邻的网络域文档
1启动Administrator软件,连接到您的服务器,点击"配置"标签.
2选择"消息"视图下的"网络域"子视图,点击按钮"添加网络域"
3网络域类型:选择"adjacent Domain"
相邻的网络域名称:输入你创建连接的 目标域的域名
4保存关闭该文档

所有的这些操作都是在刚刚完成的Domino服务器上执行的,并没有启用SMTP相关服务
现在你能够通过user@acme.com 这种形势相对方域用户法邮件了.
如果起用了SMTP.
则需要Domino Administrator->Configuration->Configurations->Router/SMTP->SMTP Allowed with the local internet Domain.
选择MIME message only.

2008年11月3日星期一

个domino域的用户互发邮件的问题 (转自chinaunix.net)

如何在两台服务器之间设置复制路由和邮件路由?
两个不相关的服务器分别属于不同的组织,不同的网络域,您可以按照以下步骤来设置它们的用户互相收发邮件:

(一)交叉验证
1启动Administrator软件,连接到您的服务器,点击"配置"标签.
2点击右边屏幕"工具"--"验证字"--"交叉验证"
3选择您自己的cert.id或server.id,输入其口令
4选择被验证的对方的cert.id或server.id,点击按钮"交叉验证"

(二)创建连接文档
1启动Administrator软件,连接到您的服务器,点击"配置"标签.
2选择"服务器"视图下的"连接"子视图,点击按钮"添加连接"
3选择连接类型,在原服务器和原网络域中输入您的服务器的层次结构名称和Notes网络域名称,在目的服务器和目的网络域中输入对方的服 务器的层次结构名称和Notes网络域
名称,保存关闭该文档

(三)创建相邻的网络域文档
1启动Administrator软件,连接到您的服务器,点击"配置"标签.
2选择"消息"视图下的"网络域"子视图,点击按钮"添加网络域"
3网络域类型:选择"相邻的网络域"
相邻的网络域名称:输入对方的Notes网络域名称
4保存关闭该文档

(四)创建层叠的通信录
1将对方的通信录数据库在自己的服务器上创建一个复本,例如names1.nsf
2编辑服务器的notes.ini文件
names=names.nsf,names1.nsf
3重新启动服务器

注意:双方都应该完成以上四步 。

2008年10月30日星期四

Routing mail over transient connections (Use diapup access remote server)

Sites that do not have permanent connections to the Internet, or to other servers on the Domino network, can send and receive messages over a transient connection, such as a dialup connection.

For example, an organization that does not have a constant connection to the Internet might use a remote mail server at its ISP to hold mail until a local mail server calls in to the ISP server to retrieve or ″pull″pending messages from the ISP server. If the ISP mail server supports the SMTP ETRN command, you can configure the Domino server to ″pull″ mail over SMTP. A local Domino server can also use Notes routing protocols to pull messages from a remote Domino server over a Notes Direct Dialup connection.
Setting up Domino to pull mail from a remote server: By default, when a local server initiates a connection to a remote server, it uses the connection to push messages to the remote server. The local server does not ″pull″ pending messages from the remote server. Instead, the local server only receive mail from the remote server when the remote server initiates a connection to route those pending messages. To change this default behavior and have the local server retrieve messages from a remote server during the same session in which it sends messages to the remote server, set up the local server to send a ″pull request″ to the remote server.

When the local server is configured to send a ″pull request,″ it sends a message to the remote serverrequesting that the server deliver any messages it has pending for the local server. The remote server receiving the pull request can be any SMTP host; it does not have to be a Domino server. When the remote server receives the ″pull request,″ it checks its mail queues for any messages pending for the initiating server and starts the processing necessary to transfer those messages.

If you are using SMTP routing, you must make sure that ETRN protocol extension has been enabled on the other server (the one receiving the ″pull request″), or it will not be able to receive the pull request. Also the remote server must be able to resolve the DNS host name of the initiating server to an IP address to ensure that the messages can be sent. Generally, ETRN requires that the initiating server has a static IP address, which is available in DNS to the server holding the pending messages.

Note: Some ISPs use DHCP to assign a host a new IP address whenever it connects. If the remote system assigns a new IP address every time you connect, do not configure dialup systems to use pull routing.

When configuring dialup routing, you can indicate how long the initiating server keeps the line open to allow the remote server to establish a connection. This is useful to prevent the initiating server from hanging up the line before the remote server is able to attempt to transfer any pending mail. The initiating server sends a pull request, then pushes any messages it has for the remote server, and then waits for any messages pending from the remote server. When sending a pull request, the initiating server can also request messages for other servers, domains, hosts, or any queue name within your organization for which the initiating server is responsible.

The ETRN command: With ETRN support, a dialup SMTP host can notify an SMTP server holding messages for it when to deliver those messages. ETRN enables servers to use bandwidth resources efficiently, because the dialup host sends and receives mail during the course of a single session.

ETRN stands for Extended Turn and is an SMTP service extension command, defined in RFC 1985. that provides improved security over the SMTP TURN command, originally defined in RFC 821. The TURN command allows hosts involved in a SMTP session to reverse their respective roles, so that, for example, if Server1 is sending an SMTP message to Server2, Server1 can issue the TURN command so that Server2 then becomes the sender and Server1, the receiver.

However, because the TURN command has no mechanism for verifying the identity of the calling host, use of the command poses a security risk. A malicious user who spoofs the identify of a server can falsely appear to belong to a someone else’s Internet domain and then use the TURN command to retrieve messages intended for that domain.

The ETRN command plugs this security hole by redefining the sending and receiving roles during the course of the SMTP session. For example, after Server1 issues the ETRN command to Server2, ETRN instructs Server2 to open a new SMTP session with Server1. Because Server2 has to resolve the name of Server1 to an IP number in the DNS, Server2 is more likely to open a new SMTP session with the correct machine.
For Domino to use ETRN to retrieve new mail over a dialup connection, your ISP must support this command. Check with your ISP to verify whether they support this command or not. You can also verify support for the command by establishing a telnet connection to port 25 of the ISP’s SMTP server. After the SMTP session starts, type EHLO and press Enter. The response from the ISP’s SMTP server indicates whether the server supports ETRN. For more information about Notes Direct Dialup Connections and Network Dialup Connections, see the chapter ″Setting Up Server-to-Server Connections.″
To set up a server to route mail over a transient connection:
1. For SMTP routing, on the Router/SMTP Basics tab of the Configuration Settings document for the
sending server, enable SMTP for messages sent outside the local Internet domain.
For information on how to enable SMTP for outbound Internet mail, see the topic ″Setting up SMTP
routing to external Internet domains″ earlier in this chapter.
2. From the Domino Administrator, click the Configuration tab and then expand the Messaging section.
3. Click Connections.
4. Click Add Connection.
5. On the Basics tab, complete these fields:
Connection type Choose one:
Network Dialup - Choose this option for servers that will route mail over SMTP using this
dialup connection. You can also use this option for NRPC routing.
Notes Direct Dialup - Choose this option only for servers that will use this connection to
route mail over NRPC to another Domino server.
Source server
The Notes hierarchical name of the local Domino server initiating the routing request, for
example, SMTP/East/Acme.
Source domain
The Domino domain of the source server, for example, AcmeEast
Use the LAN port(s)
For Network dialup connections, enter the port name for the Domino TCP/IP port on the local server.
Use the port(s)
For Notes Direct Dialup connections, specifies the name of the communications port that
the source server uses.
Destination server
The name of the Domino server, or SMTP server to which you want to route mail.
For SMTP routing connections to an ISP server, enter the host name of the ISP server, for
example, internet.isp.com. Depending on the requirements of your ISP, the specified host
can be used for outbound mail, inbound mail (using ETRN), or both. If the host is used
for outbound mail, enter the same host name on the Router/SMTP - Basics tab of the
Configuration Settings document, in the field ″Relay host for messages leaving the local
Internet domain.″
Destination domain
For routing to Domino servers over Notes routing, enter the Domino domain of the destination server.
Leave this field blank when configuring SMTP routing to an ISP server.
6. On the Routing and Replication tab, complete these fields, and then click Save & Close:
Field Description
Routing task
Select Mail routing
Router type
Push/Wait - Select this option when the destination server is used for outbound mail only, and initiates the connection to the source server. After the source server establishes the dialup connection, it waits to receive a connection from the destination server. When the destination server connects and issues a ″pull request,″ the source server then pushes any messages pending for the remote server.
Push Only - (default) Select this option if the destination server is used for outbound mail only. The source server calls the destination server and sends messages queued for that destination. You’ll need to create a separate Connection document to the server used for inbound mail.
Pull Push - Select this option if the ISP host to which the source server connects is used for both inbound and outbound routing. The source server calls the destination server, pushes, or sends, any pending messages for that destination, and then ″pulls″ messages from the destination server (actually, the calling server issues a request to the other server to push messages back to it). The destination server pushes any pending messages back to the source server. If you select this option, you must specify whether the source server issues the pull request using Notes routing or SMTP.
Pull Only - Select this option if the destination server is used for inbound mail only. The source server calls the destination server and issues a pull request (a request for the other server to push back messages). The destination server pushes any pending messages to the source server. You’ll need to create a separate Connection document to the server used for outbound mail.
Pull routing request protocol
Notes RPC - The server makes the pull request using Notes Remote Procedure Calls.
SMTP - The server makes the pull request using SMTP. Select this option for SMTP connections that support ETRN.

Note: When the destination server is a Domino server, the protocol specified in this field
only applies when the Router type is set to Pull Only. By contrast, if the Router type is
set to Pull/Push, the sending server always uses the same protocol to issue the pull
request that it used to transfer messages to the destination server.
Request the following when issuing a pull request
Specifies the servers, hosts, or domains on whose behalf the source server issues a pull request. As a result of the request, the remote server sends all messages it is holding for the specified entities. Choose one or more of the following:
vSource server name (both Notes and Host) - (default) The source server requests that the remote server transfer any messages addressed to recipients on the source server. The source server receives messages for addresses that specify either the Domino server name or the DNS host name (for example, CN=Server/Org=ACME or server1.acme.com).
vAll local primary Internet domains listed Global Domain(s) - (default) The source server requests that the destination server transfer all messages it is holding for recipients with addresses in the primary Internet domain named in the source server’s Global Domain document (for example, acme.com).
v All alternate Internet domain aliases listed in Global domain(s) - The source server requests that the destination server transfer all messages it is holding for recipients with addresses in any of the Internet domain names listed in the source server’s Global Domain document (for example, acme.com, sales.acme.com, acme-alias.com).
v The following servers/domains/hosts - The source server requests that the destination server transfer all messages it is holding for recipients in the specified Domino servers,
Internet domains, or DNS host names. If you select this option, list the specific servers,
domains, or hosts on whose behalf the pull request is made. Use this option if the
remote server requires the calling server to use a specific syntax or name when
sending the ETRN pull request to initiate message transfer.
Pull router timeout
The number of seconds that the calling server waits for the answering server to respond to a pull request before disconnecting. The default is 30 seconds.
7. For outbound SMTP connections, configure other servers on the local network to use the dialup system as a relay.
8. The change takes effect after the next Router configuration update. To put the new setting into effect immediately, reload the routing configuration.

CMD 在批处理中的用法

Syntax
CMD [charset] [options] [My_Command]

Options
/C Carries out My_Command and then terminates
/K Carries out My_Command but remains

My_Command : The NT command, program or batch script to be run.
This can even be several commands separated with '&&'
(the whole should also be surrounded by "quotes")

/T:fg Sets the foreground/background colours

/X Enable extensions to CMD.EXE
under Windows 2000 you can also use /E:ON

/Y Disable extensions to CMD.EXE
under Windows 2000 you can also use /E:OFF

/A Output ANSI Characters
/U Output UNICODE Characters
These 2 swiches are useful when piping or redirecting to a file
Most common text files under WinNT are ANSI, use these switches
when you need to convert the character set.

more below

Win2K / XP switches

The CMD switches below were first introduced with Windows 2000

   /D Ignore registry AutoRun commands
HKLM | HKCU \Software\Microsoft\Command Processor\AutoRun

/F:ON Enable auto-completion of pathnames entered at the CMD prompt

/F:OFF Disable auto-completion of pathnames entered at the CMD prompt (default)

At the command prompt Ctrl-D gives folder name completion and
Ctrl-F gives file and folder name completion.

These ctrl keys build up a list of paths that match and display the
first matching path. Thereafter, repeated pressing of the same control
key will cycle through the list of matching paths. Pressing SHIFT
with the control key will move through the list backwards.

/Q Turn echo off

/S Strip quote characters from the command_line

/V:ON Enable delayed environment variable expansion
this allows a FOR loop to specify !variable! instead of %variable%
expanding the variable at execution time instead of at input time.

/V:OFF Disable delayed environment expansion.

Environment expansion preference can be set permanently in the registry
HKLM | HKCU \Software\Microsoft\Command Processor\DelayedExpansion
Set to either 0x1 or 0x0

/knetdiag /debug
/knetdiag /fix

The knetdiag switches are undocumented and work in XP only
they list and (may) fix these networking issues.

If /C or /K is specified, then the remainder of the command line is
processed as an immediate command in the new shell. Multiple commands
separated by the command separator '&&' are accepted if surrounded by quotes.

The following logic is used to process quote (") characters:

1. If all of the following conditions are met, then quote characters
on the command line are preserved:

- no /S switch
- exactly two quote characters
- no special characters between the two quote characters,
where special is one of: &<>()@^|
- there are one or more whitespace characters between the
the two quote characters
- the string between the two quote characters is the name
of an executable file.

2. Otherwise, old behavior is to see if the first character is
a quote character and if so, strip the leading character and
remove the last quote character on the command line, preserving
any text after the last quote character.

Command.com vs cmd.exe

All the commands on these pages assume you are running the 32 bit command line (cmd.exe)

CMD.exe is the NT/XP equivalent of Command.com in previous operating systems. The older 16 bit command processor command.com is supplied to provide backward compatibility for 16 bit DOS applications. e.g. command.com will fail to set %errorlevel% after certain commands.

To ensure that a batch file will not run if accidentally copied to a Windows 95/98 machine you should use the extension .CMD rather than .BAT

The COMSPEC environment variable will show if you are running CMD.EXE or command.com

Subject to licensing issues, it is possible to run the Windows 2000 or Win XP version of CMD.EXE under NT. This is not true of all commands, e.g. any command that involves NTFS disk access (such as cacls) should not be moved between OS versions.

Opening CMD from Windows Explorer

You can open a new CMD prompt by choosing START, RUN, cmd, OK

Related Registry Keys:

;Allow UNC paths at command prompt
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor]
"DisableUNCCheck"=dword:00000001

Previous Commands

Pressing the UP arrow will list previous commands entered at the command prompt.
Other DOSKEY function keys are loaded by default (F7, F8, F9)

Copy and Paste

QuickEdit mode allows the use of cut and paste functions at the Command Prompt.

Open Control Panel, Console and check the QuickEdit Mode box.

COPY:
With your left-mouse button, select a line of text, now right-click anywhere in the window to COPY. (in NT 4 there is no popup menu)
This saves the selected text to the clipboard.

PASTE:
Now right-click again anywhere in the CMD window to PASTE the text to the command line.
Note: moving the cursor and toggling Insert/Overwrite is also possible.
Press ESC to cancel the selection and return to editing mode.

Using CMD in a batch script

In a batch script CMD will start a new instance of CMD.exe which will appear in the same window. The EXIT command will close the second CMD instance and return to the previous shell.

A method of calling one Batch script from another is to run a command like

CMD /c C:\docs\myscript.cmd

The output of CMD can be redirected into a text file. Notice that where CMD /c is used, the EXIT command is not required.

The environment Variable %CMDCMDLINE% will expand into the original command line passed to CMD.EXE

Pausing a batch script
Execution of any batch script can be paused by pressing CTRL-S
This also works for pausing a single command such as a DIR listing
Pressing any key will resume the operation.

Stopping a batch script from running
Execution of any batch script can be stopped by pressing CTRL-C

If one batch file CALLs another batch file CTRL-C will exit both batch scripts.
If CMD /c is used to call one batch file from another then CTRL-C will cause only one of the batch scripts to terminate. (see also EXIT)

Long Commands
Under Windows NT, the command line is limited to 256 characters.
Under Windows 2000, the command line is limited to 2046 characters.
Under Windows XP, the command line is limited to 8190 characters.

For all OS's NTFS and FAT allows pathnames of up to 260 characters.

A workaround for the limited pathname length is to prefix \\?\
for example:
\\?\C:\TEMP\Long_Directory\Long_Filename.txt

The above limits are often encountered when using long share names or drag and dropping files onto a batch script.

Full Screen
The key combination ALT and ENTER will switch a CMD window to full screen mode.
press ALT and ENTER again to return to a normal Window.

Command Extensions

Much of the functionality of CMD.exe can be disabled - this will affect all the internal commands, Command Extensions are enabled by default. This is controlled by setting a value in the registry: HKCU\Software\Microsoft\Command Processor\EnableExtensions Alternatively under Win XP you can run CMD /e:on or CMD /e:off

"Those who can command themselves, command others" - Hazlitt

Related:

EXIT - Use this to close a CMD shell and return.
CALL - Call one batch program from another
START - Start a separate window to run a specified program or command
DOSKEY Edit command line, recall commands
Q156276 - Cmd does not support UNC names as the current directory
Powershell: You may run the CMD shell under Powershell, Exit will return you to the PS prompt.
Equivalent bash command (Linux): bash - run the bash shell (also csh, ksh, sh)