<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>LiaoJL&apos;s Web Site</title>
    <link rel="alternate" type="text/html" href="http://www.liaojl.com/" />
    <link rel="self" type="application/atom+xml" href="http://www.liaojl.com/atom.xml" />
    <id>tag:www.liaojl.com,2008-10-17://1</id>
    <updated>2010-03-02T10:01:10Z</updated>
    <subtitle>Technology, Work and Life!</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Open Source 4.21-zh-cn</generator>

<entry>
    <title>AIX 5.3L 补丁管理</title>
    <link rel="alternate" type="text/html" href="http://www.liaojl.com/archives/2010/03/aix-53l-patch.html" />
    <id>tag:www.liaojl.com,2010://1.121</id>

    <published>2010-03-02T07:57:00Z</published>
    <updated>2010-03-02T10:01:10Z</updated>

    <summary>今天有同事问怎么看系统是否已经安装了AIX 5.3 TL-07 SP09补丁，执...</summary>
    <author>
        <name>LiaoJL</name>
        <uri>http://www.liaojl.com</uri>
    </author>
    
        <category term="AIX" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="zh-cn" xml:base="http://www.liaojl.com/">
        <![CDATA[<p>今天有同事问怎么看系统是否已经安装了AIX 5.3 TL-07 <span class="caps">SP09</span>补丁，执行oslevel看目前最新补丁补丁版本。</p>




<pre>
# oslevel -s
5300-11-02-1007
</pre>





<p>发现oslevel输出的表示方式和发行补丁版本名称格式不一致，为了确认它们之间的关系，在IBM网站上找到了5.3L补丁发布的路线图：</p>]]>
        <![CDATA[<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="53_current.jpg" src="http://www.liaojl.com/2010/3/2/53_current.jpg" width="604" height="402" class="mt-image-none" style="" /></span></p>

<p>因此AIX 5.3 TL-07 <span class="caps">SP09</span>应该包含在5300-07中，对应5300-07-09-0920这个补丁。</p>




<pre>
.bc
# oslevel -sq | grep 5300-07
Known Service Packs
-------------------
5300-07-10-0943
5300-07-09-0920
5300-07-08-0918
5300-07-07-0846
5300-07-06-0844
5300-07-05-0831
5300-07-04-0818
5300-07-03-0811
5300-07-02-0806
5300-07-01-0748
</pre>
]]>
    </content>
</entry>

<entry>
    <title>Solaris 10安装HP网络打印机</title>
    <link rel="alternate" type="text/html" href="http://www.liaojl.com/archives/2010/01/solaris-hp-printer.html" />
    <id>tag:www.liaojl.com,2010://1.120</id>

    <published>2010-01-06T06:35:52Z</published>
    <updated>2010-01-06T06:47:28Z</updated>

    <summary>Solaris 10系统支持标准的网络打印机，配置起来非常简单。 lpadmin...</summary>
    <author>
        <name>LiaoJL</name>
        <uri>http://www.liaojl.com</uri>
    </author>
    
        <category term="Solaris" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="zh-cn" xml:base="http://www.liaojl.com/">
        <![CDATA[<p>Solaris 10系统支持标准的网络打印机，配置起来非常简单。</p>

<pre><code>lpadmin -p queue_name -v /dev/null
lpadmin -p queue_name -i /usr/lib/lp/model/netstandard 
lpadmin -p queue_name -o dest=192.168.105.9:9100 -o 
protocol=bsd -o timeout=time_in_seconds </code></pre>]]>
        <![CDATA[<p>启用打印队列，并让队列开始接受打印任务。注意enable命令不能再bash中使用。</p>

<pre><code>enable queue_name 
accept queue_name </code></pre>

<p>查看打印机状态。</p>

<pre><code># lpstat -a
queue_name accepting requests since Wed Jan 06 11:24:35 2010</code></pre>

<p>打印测试页：</p>

<pre><code>lp -d queue_name /etc/hosts</code></pre>

<p>以上配置在Solaris中安装HP 3055网络打印机测试成功。</p>]]>
    </content>
</entry>

<entry>
    <title>MySQL 时间日期函数</title>
    <link rel="alternate" type="text/html" href="http://www.liaojl.com/archives/2009/12/mysql.html" />
    <id>tag:www.liaojl.com,2009://1.119</id>

    <published>2009-12-07T07:03:05Z</published>
    <updated>2010-01-07T03:00:49Z</updated>

    <summary>1. 数据表中包含时间戳信息时，查询与当前时间相隔30分钟（1800秒）内的记录...</summary>
    <author>
        <name>LiaoJL</name>
        <uri>http://www.liaojl.com</uri>
    </author>
    
        <category term="MySQL" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="zh-cn" xml:base="http://www.liaojl.com/">
        <![CDATA[<p>1. 数据表中包含时间戳信息时，查询与当前时间相隔30分钟（1800秒）内的记录：</p>

<pre><code>SELECT * FROM trunk_records 
where UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(record_time)&lt;=1800</code></pre>

<p>2. 查询当天的记录</p>

<pre><code>SELECT * FROM trunk_records where DATE(NOW()) = DATE(record_time)</code></pre>]]>
        
    </content>
</entry>

<entry>
    <title>mpstat 查看CPU状态</title>
    <link rel="alternate" type="text/html" href="http://www.liaojl.com/archives/2009/10/mpstat-cpu.html" />
    <id>tag:www.liaojl.com,2009://1.118</id>

    <published>2009-10-21T06:01:44Z</published>
    <updated>2009-10-21T07:51:43Z</updated>

    <summary>mpstat工具可以查看CPU目前运行状态，输出格式如下： # mpstat 5...</summary>
    <author>
        <name>LiaoJL</name>
        <uri>http://www.liaojl.com</uri>
    </author>
    
        <category term="Solaris" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="zh-cn" xml:base="http://www.liaojl.com/">
        <![CDATA[<p>mpstat工具可以查看CPU目前运行状态，输出格式如下：</p>


<pre><code># mpstat 5 10
CPU minf mjf xcal  intr ithr  csw icsw migr smtx  srw syscl  usr sys  wt idl
  0   80   7    0   225  123  114    2    0    0    0   202    1   1   3  96</code></pre>

<p>手册说明：</p>

<pre><code>CPU or SET Without the -a option, mpstat reports CPU, the proces-
                sor  ID.  With  the -a option, mpstat reports SET, the
                processor set ID.
minf  minor faults
mjf   major faults
xcal  inter-processor cross-calls
intr  interrupts
ithr  interrupts as threads (not counting clock interrupt)
csw   context switches
icsw  involuntary context switches
migr  thread migrations (to another processor)
smtx  spins on mutexes (lock not acquired on first try)
srw   spins on readers/writer locks (lock  not  acquired  on first try)
syscl system calls
usr   percent user time
sys   percent system time</code></pre>]]>
        <![CDATA[<p>参数解释如下：</p>

<pre><code>CPU   proces-sor  ID || processor set ID
minf   轻微故障
mjf    重要故障
xcal   CPU的交叉调用
intr   中断数
Ithr   线程中断数（不包括时钟中断）
csw    上下文切换数
icsw   强制的上下文切换次数
migr   线程的迁移数。
smtx   spins on mutexes (lock not acquired on first try)
srw    spins on readers/writer locks (lock  not  acquired  on first try)
syscl  系统调用。
usr    用户的占用时间比率
sys    系统的占用时间比率
wt     系统的等待时间比率
idl    系统的空闲时间比率</code></pre>

<p>smtx和srw可以通过lockstat来查看：</p>




<pre>
<code># lockstat sleep 5

Adaptive mutex spin: 20 events in 5.062 seconds (4 events/sec)

Count indv cuml rcnt     nsec Lock                   Caller
-------------------------------------------------------------------------------
    4  20%  20% 0.00     1490 0x6001144b000          timeout_common+0xc
    3  15%  35% 0.00    11694 0x6001144b000          callout_execute+0xc8
    3  15%  50% 0.00     1564 0x6001144b000          callout_execute+0x4
    2  10%  60% 0.00     8800 0x60011433000          untimeout+0x20
    2  10%  70% 0.00     7888 0x30001844000          untimeout+0x20
    1   5%  75% 0.00    29092 0x60014b2dde8          glvc_intr+0x4
    1   5%  80% 0.00      960 0x6001143c000          timeout_common+0xc
    1   5%  85% 0.00    12620 0x60011433000          timeout_common+0xc
    1   5%  90% 0.00    12416 pidlock                thread_exit+0x98
    1   5%  95% 0.00    61988 anonpages_hash_lock+0x68 anon_map_privatepages+0x1
0c
    1   5% 100% 0.00    17796 0x30001844000          timeout_common+0xc
-------------------------------------------------------------------------------

Adaptive mutex block: 1 events in 5.062 seconds (0 events/sec)

Count indv cuml rcnt     nsec Lock                   Caller
-------------------------------------------------------------------------------
    1 100% 100% 0.00    28752 0x60014b2dde8          glvc_intr+0x4
-------------------------------------------------------------------------------

Spin lock spin: 2 events in 5.062 seconds (0 events/sec)

Count indv cuml rcnt     nsec Lock                   Caller
-------------------------------------------------------------------------------
    1  50%  50% 0.00      796 0x6001170de08          disp+0x7c
    1  50% 100% 0.00     5940 0x60011676030          disp+0x7c
-------------------------------------------------------------------------------</code>
</pre>
]]>
    </content>
</entry>

<entry>
    <title>FailSafe模式下修复系统</title>
    <link rel="alternate" type="text/html" href="http://www.liaojl.com/archives/2009/10/failsafe.html" />
    <id>tag:www.liaojl.com,2009://1.117</id>

    <published>2009-10-14T07:13:26Z</published>
    <updated>2009-10-14T07:33:14Z</updated>

    <summary>今天有用户不小心误删除了SUNWcsu包，导致系统无法正常启动。虽然系统还能进入...</summary>
    <author>
        <name>LiaoJL</name>
        <uri>http://www.liaojl.com</uri>
    </author>
    
        <category term="Solaris" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="zh-cn" xml:base="http://www.liaojl.com/">
        <![CDATA[<p>今天有用户不小心误删除了SUNWcsu包，导致系统无法正常启动。虽然系统还能进入单用户模式，但是因为SUNWcsu包被删除，导致pkgadd命令也无法工作，单用户模式下修复失败。</p>

<p>重新启动，在Grub界面中选择FailSafe模式。然后会自动检测已安装的Solaris系统，并提示用户是否要挂载。输入yes之后，系统会检查挂载磁盘，并将系统根目录挂载到/a。</p>

<p>查看/a/etc/vfstab，如果/var, /usr, /opt等目录挂载在其它分区，先将其挂载到/a的相应子目录中。</p>

<blockquote><p>mount /dev/dsk/c1d0s3 /a/var</p></blockquote>]]>
        <![CDATA[<p>然后，挂载Solaris安装光盘。</p>

<blockquote><p>mount  -F hsfs /dev/dsk/c0t0d0s2 /cdrom</p></blockquote>

<p>进入光盘的软件包目录（/cdrom/Solaris10/Product），重新安装损坏的软件包：</p>

<blockquote><p>pkgadd -d . -R /a <span class="caps">SUNW</span>csu</p></blockquote>

<p>重新启动，系统恢复正常</p>]]>
    </content>
</entry>

<entry>
    <title>AIX系统中挂载Linux NFS共享目录</title>
    <link rel="alternate" type="text/html" href="http://www.liaojl.com/archives/2009/09/aix-linux-nfs.html" />
    <id>tag:www.liaojl.com,2009://1.116</id>

    <published>2009-09-08T06:33:19Z</published>
    <updated>2009-09-08T08:36:27Z</updated>

    <summary>今天在AIX系统中尝试挂载Linux Server NFS共享目录时失败，错误信...</summary>
    <author>
        <name>LiaoJL</name>
        <uri>http://www.liaojl.com</uri>
    </author>
    
        <category term="AIX" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="zh-cn" xml:base="http://www.liaojl.com/">
        <![CDATA[<p>今天在AIX系统中尝试挂载Linux Server <span class="caps">NFS</span>共享目录时失败，错误信息如下：</p>

<blockquote><p><br />
# mount nfsserver:/share /mnt/nfs<br />
mount: giving up on:<br />
        nfsserver:/share<br />
vmount: Not owner</p></blockquote>


<p>查找资料后发现，Linux操作系统在响应AIX操作系统的mount请求时，需要用到此NFS保留端口，该端口在默认情况下是不会开放的。</p>

<blockquote><p><br />
# nfso -o nfs_use_reserved_ports=1<br />
Setting nfs_use_reserved_ports to 1</p></blockquote>


<p>再次挂载NFS共享目录成功。</p>



<blockquote><p><br />
# mount nfsserver:/share /mnt/nfs</p></blockquote>]]>
        
    </content>
</entry>

<entry>
    <title>HP-UX 中安装GNU开源软件 </title>
    <link rel="alternate" type="text/html" href="http://www.liaojl.com/archives/2009/07/hp-ux-gnu.html" />
    <id>tag:www.liaojl.com,2009://1.115</id>

    <published>2009-07-15T08:50:51Z</published>
    <updated>2009-07-15T10:29:08Z</updated>

    <summary>HP-UX官方并没有提供第三方的GNU免费软件，不过在网上找到一个网站： htt...</summary>
    <author>
        <name>LiaoJL</name>
        <uri>http://www.liaojl.com</uri>
    </author>
    
        <category term="HP-UX" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="zh-cn" xml:base="http://www.liaojl.com/">
        <![CDATA[<p>HP-UX官方并没有提供第三方的GNU免费软件，不过在网上找到一个网站： <a href="http://hpux.connect.org.uk/">http://hpux.connect.org.uk/</a>  ，在这里可以下载到很多GNU开源软件。</p>

<p>下面以Bash为例，在HP-UX安装开源软件。</p>]]>
        <![CDATA[<p>在左边搜索bash会出现bash-4.0.024，点击链接后可以看到软件包详细信息。先查看你操作系统版本和平台命令如下：</p>

<blockquote><p><br />
# uname -a<br />
HP-UX sh-fphp1 <span class="caps">B.11.23</span> U ia64 1331043112 unlimited-user license</p></blockquote>

<p>选择与你操作系统版本的服务器平台对应的版本下载。在软件描述里面，有一行Run-time dependencies: gettext libiconv termcap，说明安装bash前还要安装上述三个软件包。</p>

<p>下载上述4个软件包，并上传到HP-UX系统中，放在/disk2目录下，解压缩并根据依赖关系按照先后顺序安装。</p>


<p>bq.<br />
gunzip *.gz<br />
swinstall -s /home/gettext-0.17-ia64-11.23.depot<br />
swinstall -s /home/libiconv-1.13.1-ia64-11.23.depot<br />
swinstall -s /home/termcap-1.3.1-ia64-11.23.depot<br />
swinstall -s /home/bash-4.0.024-ia64-11.23.depot</p>


<p>软件包路径必须是完整路径，打开swinstall界面后，先按空格键Mark，然后按Actions -&gt; Install开始安装。</p>

<p>Bash安装在/usr/local/bin目录下，可以再$HOME/.profile文件里执行/usr/local/bin/bash命令，这样下次登录的时候就直接启动到bash环境下了。或者，通过usermod命令，更改用户默认的shell。</p>]]>
    </content>
</entry>

<entry>
    <title>VB Scripts文件目录操作</title>
    <link rel="alternate" type="text/html" href="http://www.liaojl.com/archives/2009/07/vb-scripts-file.html" />
    <id>tag:www.liaojl.com,2009://1.114</id>

    <published>2009-07-01T07:17:45Z</published>
    <updated>2009-07-02T03:30:24Z</updated>

    <summary>VB Scrtips中对文件和目录的操作通过CreateObject...</summary>
    <author>
        <name>LiaoJL</name>
        <uri>http://www.liaojl.com</uri>
    </author>
    
        <category term="VBS" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="zh-cn" xml:base="http://www.liaojl.com/">
        <![CDATA[<p>VB Scrtips中对文件和目录的操作通过CreateObject</p>]]>
        <![CDATA[<p>查看文件创建、访问和修改日期</p>

<pre><code>Function ShowFileAccessInfo(filespec)
  Dim fso, f, s
  Set fso = CreateObject(&quot;Scripting.FileSystemObject&quot;)
  Set f = fso.GetFile(filespec)
  s = UCase(filespec) &amp; &quot;&lt;BR&gt;&quot;
  s = s &amp; &quot;创建：&quot; &amp; f.DateCreated &amp; &quot;&lt;BR&gt;&quot;
  s = s &amp; &quot;最后一次访问：&quot; &amp; f.DateLastAccessed &amp; &quot;&lt;BR&gt;&quot;
  s = s &amp; &quot;最后一次修改：&quot; &amp; f.DateLastModified  
  ShowFileAccessInfo = s
End Function</code></pre>]]>
    </content>
</entry>

<entry>
    <title>如何查询创建DLL语句</title>
    <link rel="alternate" type="text/html" href="http://www.liaojl.com/archives/2009/06/dll.html" />
    <id>tag:www.liaojl.com,2009://1.113</id>

    <published>2009-06-03T08:55:37Z</published>
    <updated>2009-10-21T06:18:47Z</updated>

    <summary>从Oracle 9i开始Oracle提供了一个新的系统包DBMS_METADAT...</summary>
    <author>
        <name>LiaoJL</name>
        <uri>http://www.liaojl.com</uri>
    </author>
    
        <category term="Oracle" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="zh-cn" xml:base="http://www.liaojl.com/">
        <![CDATA[<p>从Oracle 9i开始Oracle提供了一个新的系统包DBMS_METADATA，可以用于提取对象创建的DDL语句。</p>

<blockquote><p>dbms_metadata.get_ddl(table,tab1,user1)</p></blockquote>

<p>三个参数中，第一个指定导出ddl定义的对象类型(此例中为表类型)，第二个是对象名(此例中即表名)，第三个是对象所在的用户名。</p>]]>
        <![CDATA[
<ul>
<li> 获取单个的建表和建索引的语法</li>
</ul>



<blockquote><p><br />
set heading off;<br />
set echo off;<br />
set pages 999;<br />
set long 90000;<br />
spool dept.sql<br />
select dbms_metadata.get_ddl(table,dept,scott) from dual;<br />
select dbms_metadata.get_ddl(index,dept_idx,scott) from dual;<br />
select dbms_metadata.get_ddl('SEQUENCE', 'DI_SEQ', 'SCOTT') from dual<br />
spool off;</p></blockquote>



<ul>
<li>获取一个schema下的任何建表和建索引的语法，以scott为例：</li>
</ul>



<blockquote><p><br />
set pagesize 0<br />
set long 90000<br />
set feedback off<br />
set echo off<br />
spool scott_schema.sql<br />
connect scott/tiger;<br />
select dbms_metadata.get_ddl(table,u.table_name)<br />
from user_tables u;<br />
select dbms_metadata.get_ddl(index,u.index_name)<br />
from user_indexes u;<br />
spool off;</p></blockquote>


<ul>
<li>获取某个schema的建全部存储过程的语法</li>
</ul>



<blockquote><p><br />
connect brucelau /brucelau;<br />
spool procedures.sql<br />
select<br />
dbms_metadata.get_ddl(procedure,u.object_name)<br />
from<br />
user_objects u<br />
where<br />
object_type = procedure;<br />
spool off;</p></blockquote>]]>
    </content>
</entry>

<entry>
    <title>VMware ESX 单个硬盘2TB大小限制</title>
    <link rel="alternate" type="text/html" href="http://www.liaojl.com/archives/2009/05/vmware-esx-2tb.html" />
    <id>tag:www.liaojl.com,2009://1.112</id>

    <published>2009-05-07T02:15:03Z</published>
    <updated>2009-05-07T03:12:40Z</updated>

    <summary>今天在Dell PowerEdge 2950上安装VMware ESX，有6块1...</summary>
    <author>
        <name>LiaoJL</name>
        <uri>http://www.liaojl.com</uri>
    </author>
    
        <category term="Virtualization" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="zh-cn" xml:base="http://www.liaojl.com/">
        <![CDATA[<p>今天在Dell PowerEdge 2950上安装VMware <span class="caps">ESX</span>，有6块1TB硬盘做成RAID-5，可用的硬盘空间大约为4.5TB左右。开始VMware <span class="caps">ESX</span>安装后，在磁盘分区时，发现只能认出来2TB的磁盘大小。</p>

<p>重新启动服务器，按CTRL+R进入管理工具，查看RAID-5可用磁盘空间大小为4.6TB左右，没有问题，怀疑问题是不是出VMware <span class="caps">ESX</span>？</p>

<p>在Google上搜索到解决方法如下：</p>]]>
        <![CDATA[<p>If you are using simple raid types (0,1,5,6) then you can create multiple virtual disks on each raid group.</p>

<p>1) Press <ctrl> R during the boot process to enter the <span class="caps">PERC </span>configuration utility.</p>

<p>2) Create a new virtual disk. After you have selected your <span class="caps">RAID </span>level (must be 0, 1, 5, or 6), and your physical disks; enter 2097152 or smaller for the VD Size in <span class="caps">MB.</span> When you proceed to the VD name, the utility will automatically subtract 1 from the VD size.</p>

<p>3) Finish creating the new virtual disk.</p>

<p>4) From the main screen, expand "space allocation" and select "Free Space".</p>

<p>5) Press <enter> to create a new virtual disk, and enter a disk size less than or equal to 2097152 for the 2nd virtual disk.</p>

<p>6) You may repeat steps 4 and 5 to create up to 16 virtual disks for each Disk Group.</p>

<p>The other option, which someone else posted, is to create multiple raid groups. This also works. </p>]]>
    </content>
</entry>

<entry>
    <title>怎样在Solaris里mount ISO 文件</title>
    <link rel="alternate" type="text/html" href="http://www.liaojl.com/archives/2009/02/solarismount-iso.html" />
    <id>tag:www.liaojl.com,2009://1.111</id>

    <published>2009-02-26T03:32:51Z</published>
    <updated>2009-02-26T03:38:06Z</updated>

    <summary>先使用lofiadm命令建立一个lofi设备，然后执行mount命令。 /usr...</summary>
    <author>
        <name>LiaoJL</name>
        <uri>http://www.liaojl.com</uri>
    </author>
    
        <category term="Solaris" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="zh-cn" xml:base="http://www.liaojl.com/">
        <![CDATA[<p>先使用lofiadm命令建立一个lofi设备，然后执行mount命令。</p>

<pre><code>/usr/sbin/lofiadm -a /absolute_path/file.iso
mount -F hsfs /dev/lofi/1 /mount_point</code></pre>

<p>如何使用usb设备</p>

<pre><code>cd /dev/dsk
ls -l</code></pre>

<p>查看usb设备</p>

<pre><code>mount -F pcfs /dev/dsk/设备名字  /mountpoint</code></pre>]]>
        
    </content>
</entry>

<entry>
    <title>VNC Server</title>
    <link rel="alternate" type="text/html" href="http://www.liaojl.com/archives/2009/02/vnc-server.html" />
    <id>tag:www.liaojl.com,2009://1.110</id>

    <published>2009-02-11T03:40:02Z</published>
    <updated>2009-02-11T06:27:21Z</updated>

    <summary>修改VNC Server访问密码： # vncpasswd Password: ...</summary>
    <author>
        <name>LiaoJL</name>
        <uri>http://www.liaojl.com</uri>
    </author>
    
        <category term="Linux" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="zh-cn" xml:base="http://www.liaojl.com/">
        <![CDATA[<p>修改VNC Server访问密码：</p>

<pre><code># vncpasswd
Password:
Verify:</code></pre>

<p>启动VNC Server</p>

<pre><code># vncserver</code></pre>

<p>在Display :1 上启动VNC Server</p>

<pre><code># vncserver :1</code></pre>]]>
        <![CDATA[<p>关闭VNC Server</p>

<pre><code># vncserver -kill :1</code></pre>


<p>xTerm中文字体无法正常显示</p>

<p>安装中文字体</p>


<ul>
<li>fonts-chinese-3.02-12</li>
<li>fonts-ISO8859-2-75dpi-1.0-17.1</li>
</ul>




<p>XTerm里面部分中文，还是会出现小方框。这并不是XTerm不支持中文，而是XTerm的字号设置太小。在xterm中同时按住 Ctrl 和鼠标右键就会弹出一个菜单，在其中选择 Large 即可。但是，当再次启动的时候仍然是小字号。</p>

<p>在VNC中使用Gnome，编辑~/.vnc/xstartup</p>

<pre><code>#twm &amp;
gnome-session &amp;</code></pre>]]>
    </content>
</entry>

<entry>
    <title>Solaris NVIDIA Quadro FX 1700 显卡驱动安装</title>
    <link rel="alternate" type="text/html" href="http://www.liaojl.com/archives/2009/01/solaris-fx1700.html" />
    <id>tag:www.liaojl.com,2009://1.109</id>

    <published>2009-01-09T08:06:50Z</published>
    <updated>2009-01-09T08:21:59Z</updated>

    <summary>Solaris 10 &#215;86系统，安装后显卡无法驱动，从NVIDIA官...</summary>
    <author>
        <name>LiaoJL</name>
        <uri>http://www.liaojl.com</uri>
    </author>
    
        <category term="Solaris" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="zh-cn" xml:base="http://www.liaojl.com/">
        <![CDATA[<p>Solaris 10 &#215;86系统，安装后显卡无法驱动，从NVIDIA官方网站下载驱动程序。</p>

<p><a href="http://www.nvidia.com/object/solaris_display_100.14.19.html">http://www.nvidia.com/object/solaris_display_100.14.19.html</a></p>

<p>安装驱动程序：</p>

<pre><code>sh NVIDIA-Solaris-x86-100.14.19.run </code></pre>]]>
        <![CDATA[<p>进入/etc/X11目录，将xorg.conf.nvidia覆盖xorg.conf文件，然后根据显示器类型，设置分辨率。默认分辨率如下：</p>

<pre><code>Identifier     &quot;Screen 1&quot;
Device         &quot;** NVIDIA &quot;
Monitor        &quot;My Monitor&quot;
DefaultDepth    24
SubSection     &quot;Display&quot;
    Viewport    0 0
    Depth       8
    Modes      &quot;1280x1024&quot; &quot;1024x768&quot; &quot;800x600&quot; &quot;640x480&quot;</code></pre>

<p>根据显示器类型22寸Phlipes 220WS8，对Depth和Modes的值修改如下：</p>


<pre><code>Identifier     &quot;Screen 1&quot;
Device         &quot;** NVIDIA &quot;
Monitor        &quot;My Monitor&quot;
DefaultDepth    24
SubSection     &quot;Display&quot;
    Viewport    0 0
    Depth       24
    Modes      &quot;1680x1050&quot; &quot;1280x1024&quot; &quot;1024x768&quot; &quot;800x600&quot; &quot;640x480&quot;</code></pre>

<p>重启系统。如果还是有问题，可以通过kdm-config工具来协助配置。</p>]]>
    </content>
</entry>

<entry>
    <title>查看Solaris是否是64位系统</title>
    <link rel="alternate" type="text/html" href="http://www.liaojl.com/archives/2009/01/solaris-64bit.html" />
    <id>tag:www.liaojl.com,2009://1.108</id>

    <published>2009-01-07T07:48:09Z</published>
    <updated>2009-01-09T08:06:33Z</updated>

    <summary>在Solaris系统中执行uname -a时，发现系统信息是i386，而不是x6...</summary>
    <author>
        <name>LiaoJL</name>
        <uri>http://www.liaojl.com</uri>
    </author>
    
        <category term="Solaris" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="zh-cn" xml:base="http://www.liaojl.com/">
        <![CDATA[<p>在Solaris系统中执行uname -a时，发现系统信息是i386，而不是x64，无法确认是不是64位系统。</p>

<pre><code># uname -a
SunOS prodmgmt-sh 5.10 Generic_127128-11 i86pc i386 i86pc</code></pre>]]>
        <![CDATA[<p>在网上搜索后，发现下面命令：</p>

<pre><code># isainfo -kv
64-bit amd64 kernel modules</code></pre>]]>
    </content>
</entry>

<entry>
    <title>FOP 0.95新版本升级时碰到的问题</title>
    <link rel="alternate" type="text/html" href="http://www.liaojl.com/archives/2008/12/fop-095-bug.html" />
    <id>tag:www.liaojl.com,2008://1.107</id>

    <published>2008-12-29T09:26:53Z</published>
    <updated>2008-12-30T02:11:40Z</updated>

    <summary>这段时间正好重新在虚拟机上配置系统，看到FOP连续发布了0.94和0.95两个版...</summary>
    <author>
        <name>LiaoJL</name>
        <uri>http://www.liaojl.com</uri>
    </author>
    
        <category term="Linux" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="zh-cn" xml:base="http://www.liaojl.com/">
        <![CDATA[<p>这段时间正好重新在虚拟机上配置系统，看到FOP连续发布了0.94和0.95两个版本，决定尝试将目前Docbook编译PDF使用的FOP 0.25版本升级到最新的0.95版本。</p>

<p>编译PDF文件时报错，提示信息如下：</p>

<p>org.apache.fop.apps.FOPException: Error(Unknown location): No element mapping definition found for (Namespace <span class="caps">URI</span>: "http://xml.apache.org/fop/extensions", Local Name: "destination")</p>

<p>在网上搜索到相关解答如下：</p>

<p>The DocBook-independent answer is: The http://xml.apache.org/fop/extensions<br />
namespace has changed to http://xmlgraphics.apache.org/fop/extensions<br />
for <span class="caps">FOP </span>versions 0.90 and higher.</p>]]>
        <![CDATA[<p>进入/usr/share/sgml/docbook/xsl-stylesheets目录，查找所有包含http://xml.apache.org/链接的文件。</p>

<p>find . -exec grep -l http:\/\/xml.apache.org/ {} \;</p>

<p>发现文件数量众多，手工修改非常麻烦，编写脚本fixlinks.sh，内容如下：</p>

<code>#! /bin/sh

sed 's/http:\/\/xml.apache.org/http:\/\/xmlgraphics.apache.org/g' $1 \
&gt; /tmp/fixlink$$

mv /tmp/fixlink$$ $1
</code>

<p>结合find命令，替换掉所有文件中的错误链接：</p>

<pre><code>find . -type f -exec /opt/fop/fixlinks.sh {} \;</code></pre>

<p>再次执行find命令，确保上述替换工作成功完成。</p>

<pre><code>find . -exec grep -l http:\/\/xml.apache.org/ {} \;</code></pre>]]>
    </content>
</entry>

</feed>
