操作系统linux和Unix都适用。
修改/etc/ssh/sshd_config,将里面的Port改为新端口,比如10022,然后
kill -HUP `cat /var/run/sshd.pid`

就行了。现有连接自己不会断,因为
kill -HUP `cat /var/run/sshd.pid` 只是HUP监听的那个,已经建立的连接(不同的 pid)不会断。

然后你在现有账号下面exit,在用新的端口登陆就可以了!

REDHAT linux XDMCP配置

[不指定 2007/07/10 15:05 | by ipaddr ]

配置XDMCP,可以在WINDOWS下通过XMANAGER等工具访问linux桌面,配置方法如下:

1.修改/etc/X11/xdm/Xaccess文件如下:
* # any host can get a login window
(
说明:即把这句语句的前面一个#符去掉)
2.
修改/etc/X11/gdm/gdm.conf文件
[xdmcp]
Enable=false
 改为Enable=1Enable=true
3
.修改 /etc/inittab文件
id:3:initdefault
改为id:5:initdefault (有些linux版本已是id:5:initdefault就不需要改)
最后一行改为: x:5:respawn:/usr/bin/gdm
4.
修改/etc/X11/xdm/xdm-config文件
displayManager.requestPort : 0 前面加上!符号,用于注释这行
(说明:这语句在这文件的最后一行)
5
/etc/X11/xdm/Xservers中将:0 local /usr/X11R6/bin/X 注释掉 #:0 local /usr/X11R6/bin/X
(可以处理此步骤)
6.
修改防火墙,防火墙关闭的就不用修改:
  /etc/sysconfig/ipchains文件中加入以下语句:
-A input -p udp -s 0/0 -d 0/0 177 -j accept
7
、在/etc/hosts中加入相应主机的解析(如不加可能登陆不进界面)
6.
重启机器
7.
windows下使用xmanager登录
SubInACL is a command-line tool that enables administrators to obtain security information about files, registry keys, and services, and transfer this information from user to user, from local or global group to group, and from domain to domain. For example, if a user has moved from one domain (DomainA) to another (DomainB), the administrator can replace DomainA\User with DomainB\User in the security information for the user's files. This gives the user access to the same files from the new domain.

SubInACL enables administrators to do the following:
  • Display security information associated with files, registry keys, or services. This information includes owner, group, permission access control list (ACL), discretionary ACL (DACL), and system ACL (SACL).
  • Change the owner of an object.
  • Replace the security information for one identifier (account, group, well-known security identifier (SID)) with that of another identifier.
  • Migrate security information about objects. This is useful if you have reorganized a network's domains and need to migrate the security information for files from one domain to another.

Windows2003批量修改文件属主,可参考如下命令:

SubInAcl /subdirectories C:\Home /replace=olduser=newuser

XML指南-转义字符

[不指定 2007/06/25 17:27 | by ipaddr ]

解析数据
XML 解析器通常情况下会处理XML文档中的所有文本。

当XML元素被解析的时候,XML元素内部的文本也会被解析:

<message>This text is also parsed</message>


XML解析器这样做的原因是XML元素内部可能还包含了别的元素,象下面的例子,name元素内部包含了first和last两个元素:

<name><first>Bill</first><last>Gates</last></name>
 

解析器会认为上面的代码是这样的:

<name>
<first>Bill</first>
<last>Gates</last>
</name>

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

转义字符
不合法的XML字符必须被替换为相应的实体。

如果在XML文档中使用类似"<" 的字符, 那么解析器将会出现错误,因为解析器会认为这是一个新元素的开始。所以不应该象下面那样书写代码:

<message>if salary < 1000 then</message>

为了避免出现这种情况,必须将字符"<" 转换成实体,象下面这样:

<message>if salary &lt; 1000 then</message>


下面是五个在XML文档中预定义好的实体:

&lt; < 小于号
&gt; > 大于号
&amp; & 和
&apos; ' 单引号
&quot; " 双引号

实体必须以符号"&"开头,以符号";"结尾。

注意: 只有"<" 字符和"&"字符对于XML来说是严格禁止使用的。剩下的都是合法的,为了减少出错,使用实体是一个好习惯。


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

CDATA部件
在CDATA内部的所有内容都会被解析器忽略。

如果文本包含了很多的"<"字符和"&"字符——就象程序代码一样,那么最好把他们都放到CDATA部件中。

一个 CDATA 部件以"<![CDATA[" 标记开始,以"]]>"标记结束:

<script>
<![CDATA[
function matchwo(a,b)
{
if (a < b && a < 0)
then
 { return 1 }
else { return 0 } }
]]>
</script>

 


在前面的例子中,所有在CDATA部件之间的文本都会被解析器忽略。

CDATA注意事项:
CDATA部件之间不能再包含CDATA部件(不能嵌套)。如果CDATA部件包含了字符"]]>" 或者"<![CDATA[" ,将很有可能出错哦。

同样要注意在字符串"]]>"之间没有空格或者换行符。

# tar -jxvf httpd-2.2.3.tar.bz2
# cd httpd-2.2.3
# ./configure LDFLAGS="-L/usr/lib64 -L/lib64" --enable-so --enable-rewrite --enable-cgi
# vi ./srclib/apr-util/Makefile


APRUTIL_LIBS = -lsqlite3 /usr/lib/libexpat.la /root/tar/httpd-2.2.3/srclib/apr/libapr-1.la -luuid -lrt -lcrypt -lpthread -ldl
改为
APRUTIL_LIBS = -lsqlite3 /usr/lib64/libexpat.la /root/tar/httpd-2.2.3/srclib/apr/libapr-1.la -luuid -lrt -lcrypt -lpthread -ldl

# make
# make install
# cd /usr/local/apache2/
# ./bin/apachectl -k start

在浏览器中输入
http://127.0.0.1/
如果能够看到
It works!
则表示安装成功
如果是在64位Linux系统上,很多RPM包会有x86_64和i386两个,使用rpm -qa|grep ipaddrxxx类似的命令会查询出两个包:
rpm -qa|grep ipaddr

如果要删除,不可以直接使用:
rpm -e ipaddr

而必须使用:
rpm -e ipaddr.version.arch

果然有J2ME的Windows Remote Desktop!只不过是商业版。

RDM+™ Remote Desktop for Mobiles allows you to access remotely your desktop or laptop computer from Java powered phone. You can send and receive emails, surf web, edit documents in word processor, copy, cut, paste files or folders and do hundreds other things that you typically do sitting in front of your home or office computer. Interface is user-friendly and navigation is simple.

You can try RDM+ for 7 days absolutely free.

MidpSSH Mobile SSH client

[不指定 2007/05/27 19:33 | by ipaddr ]

以前接触过Java写的SSH客户端,今天突然有想法,想写一个基于J2ME的SSH客户端,在网上搜了一下,发现已经有类似的产品了,真牛B。

MidpSSH is an SSH and Telnet client for MIDP 1.0 / 2.0 (J2ME) devices such as Java(tm)-capable cellphones and other mobile devices. MidpSSH is developed by Karl von Randow www.xk72.com and released under the GPL.

MidpSSH is based upon Floyd SSH and Telnet Floyd by Radek Polak http://phoenix.inf.upol.cz/~polakr/, who ported the Java (tm) Telnet/SSH Applet to the MIDP platform. MidpSSH adds a GUI and a number of other features to Floyd SSH, see the Features section below.

Java(tm) Telnet/SSH Applet is by Matthias L. Jugel, Marcus Meissner javassh.org. It implements SSH1, Telnet and VT320 terminal emulation in Java.

Floyd SSH and Telnet Floyd (and hence MidpSSH) also includes sources from the GNU Classpath project.

MidpSSH 1.2+ includes cryptographic algorithms from The Legion of the Bouncy Castle, modified by Karl von Randow for MIDP. And implementation detail of SSH2 key exchange adapted from Java Secure Channel.

Contribute
There are various ways in which you can contribute to the MidpSSH project. You can help other users, find bugs and suggest enhancements by joining in discussions in the forums. You can join in the Developers forum, download the source code and implement new features or make enhancement

有机会真要试试。

还不知有没有基于J2ME的Windows Remote Desktop?
作为对于闪回操作(flashback)的一个增强,Oracle10g提供了函数对于SCN和时间戳进行相互转换。

首先通过dbms_flashback.get_system_change_number 可以获得系统当前的SCN值:


SQL> col scn for 9999999999999
SQL> select dbms_flashback.get_system_change_number scn from dual;

SCN
--------------
8908390522972


通过scn_to_timestamp函数可以将SCN转换为时间戳:


SQL> select scn_to_timestamp(8908390522972) scn from dual;

SCN
---------------------------------------------------------------------------
05-JAN-07 10.56.30.000000000 AM


再通过timestamp_to_scn可以将时间戳转换为SCN:

SQL> select timestamp_to_scn(scn_to_timestamp(8908390522972)) scn from dual;
SCN
--------------
8908390522972


通过这两个函数,最终Oracle将SCN和时间的关系建立起来,在Oracle10g之前,是没有办法通过函数转换得到SCN和时间的对应关系的,一般可以通过logmnr分析日志获得。

但是这种转换要依赖于数据库内部的数据记录,对于久远的SCN则不能转换,请看以下举例:


SQL> select min(FIRST_CHANGE#) scn,max(FIRST_CHANGE#) scn from v$archived_log;

SCN SCN
------------------ ------------------
8907349093953 8908393582271

SQL> select scn_to_timestamp(8907349093953) scn from dual;
select scn_to_timestamp(8907349093953) scn from dual
*
ERROR at line 1:
ORA-08181: specified number is not a valid system change number
ORA-06512: at "SYS.SCN_TO_TIMESTAMP", line 1
ORA-06512: at line 1


SQL> select scn_to_timestamp(8908393582271) scn from dual;

SCN
---------------------------------------------------------------------------
05-JAN-07 11.45.50.000000000 AM

RH linux下修改Perl的更新站点

[不指定 2007/05/06 13:37 | by ipaddr ]
修改
/usr/lib/perl5/5.8.5/CPAN.pm

将里面的defaultsite设置为:
http://cpan.linuxforum.net

更多的国内镜像,请查看:
http://www.cpan.org/SITES.html
分页: 10/20 第一页 上页 5 6 7 8 9 10 11 12 13 14 下页 最后页 [ 显示模式: 摘要 | 列表 ]