<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Linux on EvBackup</title>
    <link>https://forzw.com/tags/linux/</link>
    <description>Recent content in Linux on EvBackup</description>
    <image>
      <title>EvBackup</title>
      <url>https://forzw.com/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</url>
      <link>https://forzw.com/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</link>
    </image>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sat, 26 Sep 2015 14:57:01 +0000</lastBuildDate>
    <atom:link href="https://forzw.com/tags/linux/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Bad id for repo on RedHat</title>
      <link>https://forzw.com/archives/756/</link>
      <pubDate>Sat, 26 Sep 2015 14:57:01 +0000</pubDate>
      <guid>https://forzw.com/archives/756/</guid>
      <description>&lt;p&gt;OS版本：redhat 6.7 x64 在配置完成本地YUM后，检查YUM配置报错如下：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[root@redhat yum.repos.d]# yum clean all
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. 
You can use subscription-manager to register.
Bad id for repo: rhel-ResilientStorage , byte =   21
Bad id for repo: rhel-ScalableFileSystem , byte =   23
Cleaning repos: rhel-HighAvailability rhel-LoadBalancer rhel-Server
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;可看到有两个repo提示id错误，通过检查配置发现：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[rhel-ResilientStorage ]
name=Red Hat Enterprise Linux $releasever - $basearch - ResilientStorage 
baseurl=http://xxxx.forzw.com/os/redhat_6.7_x64/ResilientStorage 
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;[rhel-ResilientStorage ]中有空格造成，去掉即可解决。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Suse 11 U盘安装错误</title>
      <link>https://forzw.com/archives/716/</link>
      <pubDate>Thu, 31 Jul 2014 12:17:42 +0000</pubDate>
      <guid>https://forzw.com/archives/716/</guid>
      <description>&lt;p&gt;&lt;strong&gt;操作系统版本&lt;/strong&gt;：suse 11 x64&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;服务器&lt;/strong&gt;：hp dl560 g8&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;错误描述&lt;/strong&gt;：在grub安装阶段提示无法找到“/boot/grub/stage1”，导致grub安装无法进行。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;错误影响&lt;/strong&gt;：系统安装完成后无法引导。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;原因分析&lt;/strong&gt;：通过光盘安装不会出现这个问题，通过U盘安装时不存在/boot/grub目录，导致无法读取。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;解决办法&lt;/strong&gt;：在安装时候创建“/boot”分区，可解决。&lt;/p&gt;</description>
    </item>
    <item>
      <title>module-init-tools与kmod冲突问题</title>
      <link>https://forzw.com/archives/696/</link>
      <pubDate>Wed, 03 Apr 2013 13:10:37 +0000</pubDate>
      <guid>https://forzw.com/archives/696/</guid>
      <description>&lt;p&gt;环境：redhat 5.6 x64&lt;/p&gt;
&lt;p&gt;在安装一个软件包时出现如下提示：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[root@tape setup]# rpm -Uvh kmod-mhvtl-1.3-1.el5.elrepo.x86_64.rpm 
warning: kmod-mhvtl-1.3-1.el5.elrepo.x86_64.rpm: Header V4 DSA signature: NOKEY
error: Failed dependencies:
        module-init-tools = 3.3-0.pre3.1.60.el5 conflicts with kmod-mhvtl-1.3-1.el5
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;经过搜索，原因是新的module管理方式kmod替代了原来软件module-init-tools的功能，在安装的时候造成冲突。&lt;/p&gt;
&lt;p&gt;有方法说卸载module-init-tools可以解决问题，但是卸载时会提示将依赖其的很多系统软件包一并卸载，估计不行。&lt;/p&gt;
&lt;p&gt;之后通过如下方式解决：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;下载相同版本的module-init-tools包，并安装  
 [root@tape setup]# rpm -Uvh kmod-mhvtl---.x86_64.rpm 

warning: kmod-mhvtl-1.3-1.el5.elrepo.x86_64.rpm: Header V4 DSA signature: NOKEY,  Preparing...             ########################################### 
[100%]    1:module-init-tools     ########################################### [ 50%]    2:kmod-mhvtl             ########################################### [100%] Working. This may take some
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;安装时间稍微变长。&lt;/p&gt;</description>
    </item>
    <item>
      <title>SSH响应缓慢问题</title>
      <link>https://forzw.com/archives/695/</link>
      <pubDate>Thu, 21 Mar 2013 08:48:18 +0000</pubDate>
      <guid>https://forzw.com/archives/695/</guid>
      <description>&lt;p&gt;在linux系统（Redhat 5.6）上，配置DNS后，通过ssh工具登录时，密码框往往反映很慢。&lt;/p&gt;
&lt;p&gt;感觉一定是在登录时，系统上的sshd进程进行解析等待导致，Google后证实了这一点。&lt;/p&gt;
&lt;p&gt;通过修改 /etc/ssh/sshd_config 可解决，添加如下：&lt;/p&gt;
&lt;p&gt;UseLogin no&lt;/p&gt;
&lt;p&gt;之后通过 service sshd restart 重启sshd进程即可。&lt;/p&gt;</description>
    </item>
    <item>
      <title>VitrualBox支持PXE启动</title>
      <link>https://forzw.com/archives/677/</link>
      <pubDate>Tue, 18 Sep 2012 08:12:17 +0000</pubDate>
      <guid>https://forzw.com/archives/677/</guid>
      <description>&lt;p&gt;默认情况下VirtualBox下载安装后是不支持PXE启动的，启动的时候是会报下面错误：&lt;/p&gt;
&lt;p&gt;“FATAL:No bootable medium found!System halted.”&lt;/p&gt;
&lt;p&gt;这是因为缺少pxe扩展包所导致，通过下面这个地址下载扩展包，windows环境中可以通过双机形式安装。&lt;/p&gt;
&lt;p&gt;下载地址：http://download.virtualbox.org/virtualbox/4.1.22/Oracle_VM_VirtualBox_Extension_Pack-4.1.22-80657.vbox-extpack&lt;/p&gt;</description>
    </item>
    <item>
      <title>FTP自动登录脚本</title>
      <link>https://forzw.com/archives/672/</link>
      <pubDate>Mon, 23 Jul 2012 14:27:07 +0000</pubDate>
      <guid>https://forzw.com/archives/672/</guid>
      <description>&lt;p&gt;这个是简洁脚本：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#!/usr/bin/expect -f 
spawn ftp ftp.forzw.com 
expect &amp;#34;Password: &amp;#34; 
send -- &amp;#34;passwd\r&amp;#34; 
expect &amp;#34;ftp.forzw.com\r\r&amp;#34; 
Last login: Sun Apr 1 21:32:36 2012 from localhost.localdomain\r\r ]0; &amp;#34; 
send -- &amp;#34;cd /pub/test\r&amp;#34; 
expect &amp;#34;\r /pub/test\r&amp;#34; 
send -- &amp;#34;get program.test\r&amp;#34; 
expect &amp;#34;File transfered&amp;#34; 
send -- &amp;#34;exit\r&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;复杂的脚本：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#!/usr/bin/expect -f

set verbose_flag 1

set username &amp;#34;al&amp;#34;
set password &amp;#34;password&amp;#34;
set host &amp;#34;localhost&amp;#34;

set files {abc.pdf foo1.jpg foo2.jpg xyz.pdf}

#log_user 0
set timeout -1

send_user &amp;#34;starting ncftp ...&amp;#34;
spawn ncftp -u $username -p $password $host
expect &amp;#34;ncftp*&amp;gt;&amp;#34;

send_user &amp;#34;doing confirm/close ...&amp;#34;
send &amp;#34;set confirm-close no\r&amp;#34;
expect &amp;#34;ncftp*&amp;gt;&amp;#34;

foreach f $files {
  send_user &amp;#34;putting $f ...&amp;#34;
  send &amp;#34;put $f\r&amp;#34;
  expect &amp;#34;ncftp*&amp;gt;&amp;#34;

  send_user &amp;#34;deleting $f ...&amp;#34;
  send &amp;#34;del $f\r&amp;#34;
  expect &amp;#34;ncftp*&amp;gt;&amp;#34;
}

send_user &amp;#34;saying goodbye ...&amp;#34;
send &amp;#34;bye\r&amp;#34;
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Linux批量管理工具parallel-ssh</title>
      <link>https://forzw.com/archives/671/</link>
      <pubDate>Mon, 23 Jul 2012 14:26:07 +0000</pubDate>
      <guid>https://forzw.com/archives/671/</guid>
      <description>&lt;p&gt;Linux系统映像规模当超过30时，小小的变更也会浪费很多时间，Linux系统下有很多可用的集中管理方案，例如著名的puppet，这个是用ruby开发，号称可以管理以万计的服务器。不过对于大多数SA来说，这个不怎么轻量，设置有点复杂。 这里推荐PSSH，比DSH更强大的批量管理工具，先来看下它的命令列表。&lt;/p&gt;
&lt;p&gt;pssh 包安装 5 个实用程序：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;parallel-ssh （pssh） 在多个主机上并行地运行命令。
parallel-scp （pscp）把文件并行地复制到多个主机上。
parallel-rsync （psync）通过 rsync 协议把文件高效地并行复制到多个主机上。
parallel-slurp （pslurp）把文件并行地从多个远程主机复制到中心主机上。
parallel-nuke （pnuke）并行地在多个远程主机上杀死进程。
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;安装步骤（前提系统中已经安装有python2.4+）：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;wget http://parallel-ssh.googlecode.com/files/pssh-2.3.1.tar.gz
tar xvf pssh-2.3.1.tar.gz
cd pssh-2.3.1
python setup.py install
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;执行完后可以看到执行文件，相关库文件，man文件已经安装。&lt;/p&gt;
&lt;p&gt;创建主机列表：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;vi webapp.txt
192.168.56.11
192.168.56.12
192.168.56.13
192.168.56.14
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;配置SSH信任关系&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;mkdir ~/.ssh
ssh-keygen -t rsa
scp ~/.ssh/id_rsa.pub 192.168.56.11:/root/.ssh/authorized_keys
scp ~/.ssh/id_rsa.pub 192.168.56.12:/root/.ssh/authorized_keys
scp ~/.ssh/id_rsa.pub 192.168.56.13:/root/.ssh/authorized_keys
scp ~/.ssh/id_rsa.pub 192.168.56.14:/root/.ssh/authorized_keys
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;或者通过脚本批量拷贝&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ip=192.168.56.
for i in $(seq 11 14)
do
ssh $ip$i -C mkdir /root/.ssh
scp ~/.ssh/id_rsa.pub $ip$i:/root/.ssh/authorized_keys
done
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;或者通过读取文件的脚步拷贝&lt;/p&gt;</description>
    </item>
    <item>
      <title>Sendmail和sm-client启动慢解决办法</title>
      <link>https://forzw.com/archives/668/</link>
      <pubDate>Mon, 16 Jul 2012 07:15:40 +0000</pubDate>
      <guid>https://forzw.com/archives/668/</guid>
      <description>&lt;p&gt;通常情况下在安装好redhat或者centos后，重启就会发现Sendmail和sm-client的启动速度异常缓慢，原因一般是在DNS中查询当前主机名称，由于查询不到，做递归查询，解决方法如下。 在/etc/hosts中添加主机名称解析，示例：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;127.0.0.1 localhost.localdomain localhost db1
#db1为当前主机名称
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>在RedHat上安装Oracle 11gR2 RAC</title>
      <link>https://forzw.com/archives/664/</link>
      <pubDate>Sun, 15 Jul 2012 17:29:42 +0000</pubDate>
      <guid>https://forzw.com/archives/664/</guid>
      <description>&lt;p&gt;oracle版本：11.2.0.1.0 grid版本：11.2.0.1.0 redhat版本：RedHat EL5 x86_64 存储方式：iscsi + asm&lt;/p&gt;
&lt;p&gt;安装过程分以下四个步骤&lt;/p&gt;
&lt;p&gt;一，安装准备 二，配置安装 三，相关设置 四，常见错误&lt;/p&gt;
&lt;p&gt;一，安装准备 1，创建oracle用户  以root用户登录，并创建oracle用户以及所属的dba组&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;/usr/sbin/groupadd -g 501 oinstall
/usr/sbin/groupadd -g 502 dba
/usr/sbin/groupadd -g 503 oper
/usr/sbin/groupadd -g 504 asmadmin
/usr/sbin/groupadd -g 505 asmoper
/usr/sbin/groupadd -g 506 asmdba
/usr/sbin/useradd -g oinstall -G dba,asmdba,oper oracle
/usr/sbin/useradd -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2，配置系统参数&lt;/p&gt;
&lt;p&gt;编辑 /etc/sysctl.conf 文件并添加下列参数：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#ORACLE SETTING
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;编辑 /etc/pam.d/login 文件，并添加下行参数：&lt;/p&gt;</description>
    </item>
    <item>
      <title>/proc/sysrq-trigger文件的强大功能</title>
      <link>https://forzw.com/archives/662/</link>
      <pubDate>Thu, 31 May 2012 16:20:53 +0000</pubDate>
      <guid>https://forzw.com/archives/662/</guid>
      <description>&lt;p&gt;/proc/sysrq-trigger该文件能做些什么事情呢？&lt;/p&gt;
&lt;p&gt;# 立即重新启动计算机 （Reboots the kernel without first unmounting file systems or syncing disks attached to the system） echo “b” &amp;gt; /proc/sysrq-trigger&lt;/p&gt;
&lt;p&gt;# 立即关闭计算机（shuts off the system） echo “o” &amp;gt; /proc/sysrq-trigger&lt;/p&gt;
&lt;p&gt;# 导出内存分配的信息 （可以用/var/log/message 查看）（Outputs memory statistics to the console） echo “m” &amp;gt; /proc/sysrq-trigger&lt;/p&gt;
&lt;p&gt;# 导出当前CPU寄存器信息和标志位的信息（Outputs all flags and registers to the console） echo “p” &amp;gt; /proc/sysrq-trigger  # 导出线程状态信息 （Outputs a list of processes to the console） echo “t” &amp;gt; /proc/sysrq-trigger&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ubuntu 12.04 安装Aircrack-ng</title>
      <link>https://forzw.com/archives/661/</link>
      <pubDate>Thu, 31 May 2012 07:17:12 +0000</pubDate>
      <guid>https://forzw.com/archives/661/</guid>
      <description>&lt;p&gt;Ubuntu 12.04以前版本，可以通过apt-get直接安装aircrack-ng，但12.04并不行，以下是在12.04上的安装方法。&lt;/p&gt;
&lt;p&gt;//安装依赖软件包 sudo apt-get install build-essential libssl-dev iw&lt;/p&gt;
&lt;p&gt;//下载软件包并解压缩 wget &lt;a href=&#34;http://download.aircrack-ng.org/aircrack-ng-1.1.tar.gz&#34;&gt;http://download.aircrack-ng.org/aircrack-ng-1.1.tar.gz&lt;/a&gt; tar -zxvf aircrack-ng-1.1.tar.gz cd aircrack-ng-1.1&lt;/p&gt;
&lt;p&gt;//进入目录后，用VI编辑器打开 common.mak,修改下面的行: CFLAGS ?= -g -W -Wall -Werror -O3&lt;/p&gt;
&lt;p&gt;//修改后的结果： CFLAGS ?= -g -W -Wall -O3&lt;/p&gt;
&lt;p&gt;//执行安装 make sudo make install&lt;/p&gt;</description>
    </item>
    <item>
      <title>NTPQ命令查询解释</title>
      <link>https://forzw.com/archives/658/</link>
      <pubDate>Wed, 30 May 2012 07:44:19 +0000</pubDate>
      <guid>https://forzw.com/archives/658/</guid>
      <description>&lt;p&gt;在UNIX和Liunx上配置好NTP后，可以通过“ntpq -p”命令查询时间同步状态，示例：&lt;/p&gt;
&lt;p&gt;#ntpq -p remote refid st t when poll reach delay offset disp ========================================== +112.25.131.11 132.42.33.11 4 u 45 64 377 0.49 0.310 0.08 *112.25.131.12 132.42.33.11 4 u 62 64 377 0.72 0.164 0.06&lt;/p&gt;
&lt;p&gt;示例中对应的参数解释如下： remote：响应这个请求的NTP服务器的名称。 refid： NTP服务器使用的上一级ntp服务器,时间服务器从高到低级别可以设定为1-16，为减少拥塞，避免直连解决1级别的服务器。 st ：时间源的级别。 t ：时间源的类型。 when： 上一次成功请求之后到现在的秒数。 poll： 本地机和远程服务器多少时间进行一次同步(单位为秒)。 reach： 这是一个八进制值,用来测试能否和服务器连接.每成功连接一次它的值就会增加，一个0值表示服务器不能访问，377表示所有最近的查询都是成功。 delay： 从本地机发送同步要求到ntp服务器的round trip time。 offset： 主机通过NTP时钟同步与所同步时间源的时间偏移量，单位为毫秒（ms）。 disp： 每次轮询时的网络延时是多少（s）。&lt;/p&gt;</description>
    </item>
    <item>
      <title>挂载Windows非匿名共享到Linux系统</title>
      <link>https://forzw.com/archives/636/</link>
      <pubDate>Tue, 22 Nov 2011 16:00:40 +0000</pubDate>
      <guid>https://forzw.com/archives/636/</guid>
      <description>&lt;p&gt;Windows 7 共享默认是开放的，但是需要认证才能访问。在linux下面命令挂载：&lt;/p&gt;
&lt;p&gt;mount -t cifs -o username=admin,password=123456 //192.168.56.1/share /mnt/share&lt;/p&gt;
&lt;p&gt;其中：&lt;br&gt;
username,password为windows系统用户密码；&lt;br&gt;
//192.168.56.1/share为windows地址和共享路径；&lt;br&gt;
/mnt/share为linux本地挂载点；&lt;/p&gt;
&lt;p&gt;经测试，在IO效率上，100MB带宽情况下，可达到99%。&lt;/p&gt;</description>
    </item>
    <item>
      <title>SecureCRT使用技巧三则</title>
      <link>https://forzw.com/archives/635/</link>
      <pubDate>Sun, 16 Oct 2011 16:50:14 +0000</pubDate>
      <guid>https://forzw.com/archives/635/</guid>
      <description>&lt;p&gt;一、日志&lt;/p&gt;
&lt;p&gt;SecureCRT可以记录日志，也可以自动去记录日志，至于好处，不言而喻，方便查询，可以记录，可以免责。&lt;/p&gt;
&lt;p&gt;通常可以手动点击“文件”-“会话日志”，然后选择存储的目录和名称去记录日志，这样未免有些麻烦。这里示例一下自动记录的日志的方法，点击“选项”-“全局选项”-“默认会话”-“编辑默认设置”，之后选择“日志文件”，勾选“追加到文件”，“在连接开始时记录日志”，“半夜时启用新日志”，之后在日志文件中输入”E:\Documents\SecureCRT\Logs%H%Y-%M-%D_%h%m%s.log“ ，%H代表主机名称，YMDhms分别是年月日时分秒，这样在连接后可以看到，同一个主机记录的日志会集中到同一个目录，名称类似2011-10-17_002534.log这样。另外为了方便查询，可以在“连接时”选项中填入“[ConnectTime:%Y-%M-%D_%h:%m:%s]”，在断开时选项中填入“[DisonnectTime:%Y-%M-%D_%h:%m:%s]”，这样在日志结尾可以看到详细的记录时间。&lt;/p&gt;
&lt;p&gt;二、响铃&lt;/p&gt;
&lt;p&gt;默认情况下，SecureCRT中过多“Backspace”键入，或者无目标的“Tab”键入，会有响铃发出，这个可以在全局选项中设置，同样，点击“选项”-“全局选项”-“默认会话”-“编辑默认设置”，然后选择“终端”，去掉“视觉响铃”选项，确定即可。&lt;/p&gt;
&lt;p&gt;三、SFTP传输&lt;/p&gt;
&lt;p&gt;SecureCRT自带有SFTP文件传输工具，命令和FTP类似，使用前需要预置默认位置，设置方法，同样，点击“选项”-“全局选项”-“默认会话”-“编辑默认设置”，然后选择“SFTP标签页“，填入本地目录和远程目录，确定即可。而后在使用时直接点击”文件“-”连接SFTP标签页“即可弹出命令界面，常用命令如下：&lt;br&gt;
pwd: 查询linux主机所在目录(也就是远程主机目录)&lt;br&gt;
lpwd: 查询本地目录（一般指windows上传文件的目录)&lt;br&gt;
ls: 查询连接到当前linux主机所在目录有哪些文件&lt;br&gt;
lls: 查询当前本地上传目录有哪些文件&lt;br&gt;
lcd: 改变本地上传目录的路径&lt;br&gt;
cd: 改变远程上传目录&lt;br&gt;
get: 将远程目录中文件下载到本地目录&lt;br&gt;
put: 将本地目录中文件上传到远程主机(linux)&lt;br&gt;
quit: 断开FTP连接&lt;/p&gt;</description>
    </item>
    <item>
      <title>怎样使用kickstart创建逻辑卷管理（LVM）分区</title>
      <link>https://forzw.com/archives/633/</link>
      <pubDate>Wed, 31 Aug 2011 08:20:53 +0000</pubDate>
      <guid>https://forzw.com/archives/633/</guid>
      <description>&lt;p&gt;解决方法: 在ks.cfg文件的&amp;rsquo;Disk Partition Information&amp;rsquo;下添加以下选项，使用kickstart创建逻辑卷管理（LVM）分区：&lt;/p&gt;
&lt;p&gt;#Disk partitioning information part pv. volgroup logvol --vgname= &amp;ndash;size= &amp;ndash;name= 注意： 上面提到的选项是有先后顺序的。物理卷将先被创建，然后是卷组和逻辑卷。&lt;/p&gt;
&lt;p&gt;一个例子： 创建两个物理分区分别给Boot和Swap分区，剩余的空间作LVM。  Partition Size Name /boot 150MB /boot swap 1GB swap / 8GB lv_root /var 4GB lv_var /tmp 2GB lv_tmp /spare remaining space lv_spare 解决办法： 按照上面的需求，将以下己行加入到ks.cfg文件：&lt;/p&gt;
&lt;p&gt;#Disk partitioning information part /boot &amp;ndash;fstype ext3 &amp;ndash;size=150 part swap &amp;ndash;size=1024 part pv.01 &amp;ndash;size=1 &amp;ndash;grow volgroup vg_root pv.01 logvol / &amp;ndash;vgname=vg_root &amp;ndash;size=8192 &amp;ndash;name=lv_root logvol /var &amp;ndash;vgname=vg_root &amp;ndash;size=4096 &amp;ndash;name=lv_var logvol /tmp &amp;ndash;vgname=vg_root &amp;ndash;size=2048 &amp;ndash;name=lv_tmp logvol /spare &amp;ndash;vgname=vg_root &amp;ndash;size=1 &amp;ndash;grow &amp;ndash;name=lv_spare&lt;/p&gt;</description>
    </item>
    <item>
      <title>CentOS6,RHEL6虚拟机克隆引起的网卡问题</title>
      <link>https://forzw.com/archives/622/</link>
      <pubDate>Tue, 19 Jul 2011 16:52:42 +0000</pubDate>
      <guid>https://forzw.com/archives/622/</guid>
      <description>&lt;p&gt;系统环境：ubuntu&lt;br&gt;
软件：virtualbox-ose&lt;br&gt;
虚拟操作系统：centos6&lt;br&gt;
问题描述：对虚拟系统进行克隆后，开机执行“ifconfig”看不到eth0,执行”service network restart“提示错误“Bringing up interface eth0: Device eth0 does not seem to be present, delaying initialization.”&lt;br&gt;
解决方法：&lt;br&gt;
方法一：（删除70-persistent-net.rules文件，并重启系统）&lt;br&gt;
rm -fr /etc/udev/rules.d/70-persistent-net.rules&lt;br&gt;
方法二：修改/etc/udev/rules.d/70-persistent-net.rules文件中刚生成的配置，就是对应正确MAC地址的eth1为eth0,并删除旧的配置项，之后重启网络服务。&lt;/p&gt;</description>
    </item>
    <item>
      <title>创建基于CentOS的LiveCD</title>
      <link>https://forzw.com/archives/621/</link>
      <pubDate>Sat, 16 Jul 2011 19:06:29 +0000</pubDate>
      <guid>https://forzw.com/archives/621/</guid>
      <description>&lt;p&gt;1，安装livecd相关工具&lt;/p&gt;
&lt;p&gt;创建文件/etc/yum.repos.d/centos-livecd.repo&lt;/p&gt;
&lt;p&gt;内容如下：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# Name: CentOS LiveCD repository
[livecd]
name = CentOS $releasever - LiveCD
baseurl = http://www.nanotechnologies.qc.ca/propos/linux/centos-live/$basearch/live
enabled=1
protect=0
gpgkey = http://www.nanotechnologies.qc.ca/propos/linux/RPM-GPG-KEY-PGuay2010
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#更新repo
yum clean all
yum update

#安装工具
yum install livecd-tools syslinux anaconda-runtime
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;#创建配置文件mini.ks（这里使用最简单配置）&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;lang en_US.UTF-8
keyboard us
timezone US/Eastern
auth --useshadow --enablemd5
selinux --enforcing
firewall --disabled

repo --name=a-base    --baseurl=http://mirror.centos.org/centos/5/os/$basearch
repo --name=a-updates --baseurl=http://mirror.centos.org/centos/5/updates/$basearch
#repo --name=a-extras  --baseurl=http://mirror.centos.org/centos/5/extras/$basearch
repo --name=a-live    --baseurl=http://www.nanotechnologies.qc.ca/propos/linux/centos-live/$basearch/live

%packages
bash
kernel
syslinux
passwd
policycoreutils
chkconfig
authconfig
rootfiles
comps-extras
xkeyboard-config
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2，生成LiveCD（前提有可用的YUM源）&lt;/p&gt;</description>
    </item>
    <item>
      <title>linux进程间通信</title>
      <link>https://forzw.com/archives/611/</link>
      <pubDate>Wed, 06 Jul 2011 06:48:20 +0000</pubDate>
      <guid>https://forzw.com/archives/611/</guid>
      <description>&lt;p&gt;linux进程间通信主要分为以下4个领域 （1）消息传递（管道，FIFO，消息队列） （2）同步（互斥锁，条件变量，读写锁，信号量） （3）共享内存区（匿名共享内存区，有名共享内存区） （4）过程调用（Solaris门，Sun RPC）&lt;/p&gt;
&lt;p&gt;linux进程间的信息共享可以分为 （1） 基于文件系统的共享 （2） 基于内核的共享 （3） 基于共享内存区的共享&lt;/p&gt;
&lt;p&gt;IPC对象的持续性 （1）随进程间持续的IPC对象一直存在到打开着该对象的最后一个进程关闭该对象的最后一个进程关闭该对象为止。 （2）随内核持续的IPC对象一直存在到内核重新自举或显式删除该对象为止。 （3）随文件系统持续的IPC对象一直存在到显示删除该对象为止。即使系统自举了，该对象还是存在的。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Oracle 10gR2在RedHat 5上EM中文乱码的解决方法</title>
      <link>https://forzw.com/archives/610/</link>
      <pubDate>Sun, 19 Jun 2011 12:43:22 +0000</pubDate>
      <guid>https://forzw.com/archives/610/</guid>
      <description>&lt;p&gt;1、配置字体并清除缓存&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#切换到Oracle用户
su - oracle
#停止EM
emctl stop dbconsole
#拷贝font配置文件
cd $ORACLE_HOME/jdk/jre/lib/
cp font.properties.zh_CN.Redhat font.properties 
#删除已经生成的gif图标
rm $ORACLE_HOME/oc4j/j2ee/oc4j_applications/\
applications/em/em/cabo/images/cache/zhs/*.gif
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2，下载字体&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#切换到root
su - root
#下载字体
wget http://blogimg.chinaunix.net/blog/upfile2/090331105520.rar
#解压文件，也可解压后上传到系统中
unrar 090331105520.rar
#创建目录
mkdir -p /usr/share/fonts/zh_CN/TrueType/
#拷贝字体到目录
cp zysong.ttf /usr/share/fonts/zh_CN/TrueType/
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;3，启动EM&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#切换到oracle
su - oracle
#启动EM
emctl start dbconsole
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>SELinux 入门</title>
      <link>https://forzw.com/archives/607/</link>
      <pubDate>Sat, 11 Jun 2011 12:52:59 +0000</pubDate>
      <guid>https://forzw.com/archives/607/</guid>
      <description>&lt;p&gt;几乎可以肯定每个人都听说过 SELinux (更准确的说，尝试关闭过)，甚至某些过往的经验让您对 SELinux 产生了偏见。不过随着日益增长的 0-day 安全漏洞，或许现在是时候去了解下这个在 Linux 内核中已经有8年历史的强制性访问控制系统(MAC)了。&lt;/p&gt;
&lt;p&gt;SELinux 与强制访问控制系统&lt;/p&gt;
&lt;p&gt;SELinux 全称 Security Enhanced Linux (安全强化 Linux)，是 MAC (Mandatory Access Control，强制访问控制系统)的一个实现，目的在于明确的指明某个进程可以访问哪些资源(文件、网络端口等)。  强制访问控制系统的用途在于增强系统抵御 0-Day 攻击(利用尚未公开的漏洞实现的攻击行为)的能力。所以它不是网络防火墙或 ACL 的替代品，在用途上也不重复。&lt;/p&gt;
&lt;p&gt;举例来说，系统上的 Apache 被发现存在一个漏洞，使得某远程用户可以访问系统上的敏感文件(比如 /etc/passwd 来获得系统已存在用户)，而修复该安全漏洞的 Apache 更新补丁尚未释出。此时 SELinux 可以起到弥补该漏洞的缓和方案。因为 /etc/passwd 不具有 Apache 的访问标签，所以 Apache 对于 /etc/passwd 的访问会被 SELinux 阻止。&lt;/p&gt;
&lt;p&gt;相比其他强制性访问控制系统，SELinux 有如下优势：&lt;/p&gt;
&lt;p&gt;控制策略是可查询而非程序不可见的。 可以热更改策略而无需重启或者停止服务。 可以从进程初始化、继承和程序执行三个方面通过策略进行控制。 控制范围覆盖文件系统、目录、文件、文件启动描述符、端口、消息接口和网络接口。 那么 SELinux 对于系统性能有什么样的影响呢？根据 Phoronix 在 2009 年使用 Fedora 11 所做的横向比较来看，开启 SELinux 仅在少数情况下导致系统性能约 5% 的降低。&lt;/p&gt;
&lt;p&gt;SELinux 是不是会十分影响一般桌面应用及程序开发呢？原先是，因为 SELinux 的策略主要针对服务器环境。但随着 SELinux 8年来的广泛应用，目前 SELinux 策略在一般桌面及程序开发环境下依然可以同时满足安全性及便利性的要求。以刚刚发布的 Fedora 15 为例，笔者在搭建完整的娱乐(包含多款第三方原生 Linux 游戏及 Wine 游戏)及开发环境(Android SDK + Eclipse)过程中，只有 Wine 程序的首次运行时受到 SELinux 默认策略的阻拦，在图形化的“SELinux 故障排除程序”帮助下，点击一下按钮就解决了。&lt;/p&gt;</description>
    </item>
    <item>
      <title>RedHat 6双网卡绑定</title>
      <link>https://forzw.com/archives/605/</link>
      <pubDate>Tue, 31 May 2011 06:42:33 +0000</pubDate>
      <guid>https://forzw.com/archives/605/</guid>
      <description>&lt;p&gt;(更新！！！：以下方法经测试会出现交换机mac地址失效问题，解决方法是延续redhat 5的通常配置，并关闭NetworkManager服务。） 服务器型号为HP DL380 G7 有四个网络接口，其中第一口和第三口连接到不同的交换机，需要绑定一个IP，做成主备模式。 对于redhat 5及以前版本，网上有很多教程，很简单，但对于redhat 6并不可用。在尝试多次之后，总结配置如下：&lt;/p&gt;
&lt;p&gt;以服务器10.199.74.68为例，子网掩码为255.255.255.224，网关为10.199.74.73&lt;/p&gt;
&lt;p&gt;/etc/modprobe.conf&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;alias bond0 bonding
options bond0 mode=1 arp_ip_target=10.199.74.73 arp_interval=60
alias eth0 tg3
alias eth2 tg3
alias eth1 e1000
alias eth3 e1000
add above bonding e1000 tg3
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;/etc/rc.local&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;/sbin/route add default gw 10.199.74.73 dev bond0
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;ifcfg-bond0&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;DEVICE=bond0
IPADDR=10.199.74.68
NETMASK=255.255.255.224
NETWORK=10.199.74.64
BROADCAST=10.199.74.95
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
BONDING_opts=&amp;#34;mode=active-backup arp_interval=60 arp_ip_target=10.199.74.73&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;ifcfg-eth0&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;DEVICE=eth0
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;ifcfg-eth2&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;DEVICE=eth2
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>简单PING测试脚本</title>
      <link>https://forzw.com/archives/604/</link>
      <pubDate>Wed, 25 May 2011 13:52:07 +0000</pubDate>
      <guid>https://forzw.com/archives/604/</guid>
      <description>&lt;p&gt;这里介绍两个在linux下用脚本进行连通性（ping）测试的脚本。 1，基于连续IP的ping脚本&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#!/bin/sh
#
ip=&amp;#34;192.168.3.&amp;#34;
for i in `seq 1 13`
do
ping -c 2 $ip$i | grep -q &amp;#39;ttl=&amp;#39; &amp;amp;&amp;amp; echo &amp;#34;$ip$i OK&amp;#34; || echo &amp;#34;$ip$i NOT OK&amp;#34;
done
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;保存为ping.sh，然后添加权限并执行。 #chmod +x ping.sh #./ping.sh 脚本ping判断成功与否以是否出现ttl值为准。  2、基于文件中IP列表的测试&lt;/p&gt;
&lt;p&gt;首先创建一文本文件，这里命名为iplist，每行有一个IP地址。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;192.168.3.1
192.168.3.11
192.168.3.111
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;脚本内容&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#!/bin/sh
#
for i in `cat iplist`
do
ping -c 1 $i | grep -q &amp;#39;ttl=&amp;#39; &amp;amp;&amp;amp; echo &amp;#34;$i OK&amp;#34; || echo &amp;#34;$i NOT OK&amp;#34;
done
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;保存为ping.sh，然后添加权限并执行，注意要和iplist在同一目录中。 #chmod +x ping.sh #./ping.sh&lt;/p&gt;</description>
    </item>
    <item>
      <title>基于光盘的本地yum服务器搭建</title>
      <link>https://forzw.com/archives/603/</link>
      <pubDate>Thu, 21 Apr 2011 17:16:15 +0000</pubDate>
      <guid>https://forzw.com/archives/603/</guid>
      <description>&lt;p&gt;一、YUM服务端&lt;/p&gt;
&lt;p&gt;1.创建一个存放放RPM所有安装包的目录 ,位置自定义，有兴趣的同学可以放在/home下&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;mkdir -p /opt/yum
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2.获取RedHat的ISO镜像文件，并挂载&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;mkdir -p /mnt/cdrom
mount -t iso9660 /dev/cdrom /mnt/cdrom
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;3.获取RPM包源,将ISO中的Server目录复制到本机需要安装YUM仓库的目录下：例如/opt/yum&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;cp -r /mnt/cdrom/Server   /opt/yum
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;4.进入你自己创建的YUM仓库，并安装createrepo工具&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;cd /opt/yum/Server
ls | grep create
rpm -ivh createrepo-0.4.11-3.el5.noarch.rpm
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;5.重建仓库信息配置文件(/opt/yum目录下)&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;createrepo  /opt/yum
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;二，YUM客户端&lt;/p&gt;
&lt;p&gt;1.基于之前已经建立的YUM仓库，这里配置YUM客户端&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;cd /etc/yum.repos.d
mkdir backup
mv *.repo backup
//备份原有配置
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2.然后在/etc/yum.repos.d下创建yum.repo文件，并输入如下配置信息:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[Server]
name=Server
baseurl=file:///opt/yum/Server
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-RedHat-release
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;3.测试YUM仓库配置是否成功&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;yum clear all
yum list
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>批量ISCSI生成与加载示例</title>
      <link>https://forzw.com/archives/600/</link>
      <pubDate>Thu, 21 Apr 2011 17:16:15 +0000</pubDate>
      <guid>https://forzw.com/archives/600/</guid>
      <description>&lt;p&gt;这是我在做oracle集群和mfs存储实验时创建的iscsi磁盘，操作系统为centos 5.4。&lt;/p&gt;
&lt;p&gt;服务端：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;yum install -y scsi-target-utils
chkconfig --level 2345 tgtd on
service tdtd start
//安装并启动相关服务
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;tgtadm --lld iscsi --op new --mode target --tid 1 -T iqn.2010-05.com.forzw.disk1
tgtadm --lld iscsi --op new --mode target --tid 2 -T iqn.2010-05.com.forzw.disk2
tgtadm --lld iscsi --op new --mode target --tid 3 -T iqn.2010-05.com.forzw.disk3
tgtadm --lld iscsi --op new --mode target --tid 4 -T iqn.2010-05.com.forzw.disk4
tgtadm --lld iscsi --op new --mode target --tid 5 -T iqn.2010-05.com.forzw.disk5
tgtadm --lld iscsi --op new --mode target --tid 6 -T iqn.2010-05.com.forzw.disk6
tgtadm --lld iscsi --op new --mode target --tid 7 -T iqn.2010-05.com.forzw.disk7
tgtadm --lld iscsi --op new --mode target --tid 8 -T iqn.2010-05.com.forzw.disk8
//生成iqn
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b /dev/sdb1
tgtadm --lld iscsi --op new --mode logicalunit --tid 2 --lun 1 -b /dev/sdb2
tgtadm --lld iscsi --op new --mode logicalunit --tid 3 --lun 1 -b /dev/sdb5
tgtadm --lld iscsi --op new --mode logicalunit --tid 4 --lun 1 -b /dev/sdb6
tgtadm --lld iscsi --op new --mode logicalunit --tid 5 --lun 1 -b /dev/sdb7
tgtadm --lld iscsi --op new --mode logicalunit --tid 6 --lun 1 -b /dev/sdb8
tgtadm --lld iscsi --op new --mode logicalunit --tid 7 --lun 1 -b /dev/sdb9
tgtadm --lld iscsi --op new --mode logicalunit --tid 8 --lun 1 -b /dev/sdb10
//指定本地存储
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL
tgtadm --lld iscsi --op bind --mode target --tid 2 -I ALL
tgtadm --lld iscsi --op bind --mode target --tid 3 -I ALL
tgtadm --lld iscsi --op bind --mode target --tid 4 -I ALL
tgtadm --lld iscsi --op bind --mode target --tid 5 -I ALL
tgtadm --lld iscsi --op bind --mode target --tid 6 -I ALL
tgtadm --lld iscsi --op bind --mode target --tid 7 -I ALL
tgtadm --lld iscsi --op bind --mode target --tid 8 -I ALL
//发起服务，允许所有主机连接
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;客户端：&lt;/p&gt;</description>
    </item>
    <item>
      <title>直接使用ISO文件安装Ubuntu 11.04到真实分区</title>
      <link>https://forzw.com/archives/598/</link>
      <pubDate>Wed, 06 Apr 2011 03:29:03 +0000</pubDate>
      <guid>https://forzw.com/archives/598/</guid>
      <description>&lt;p&gt;ubuntu 11.04已经发布beta版本，由于不喜欢刻盘那种声音，也不喜欢wubi那种方式，所以使用iso文件直接安装ubuntu 11.04。&lt;/p&gt;
&lt;p&gt;一、下载文件 下载ubuntu 11.04镜像： &lt;a href=&#34;http://cdimage.ubuntu.com/daily-live/current/&#34;&gt;http://cdimage.ubuntu.com/daily-live/current/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;我选择的是64位版本： &lt;a href=&#34;http://cdimage.ubuntu.com/daily-live/current/natty-desktop-amd64.iso&#34;&gt;http://cdimage.ubuntu.com/daily-live/current/natty-desktop-amd64.iso&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;下载grub2dos &lt;a href=&#34;http://sourceforge.net/projects/grub4dos/&#34;&gt;http://sourceforge.net/projects/grub4dos/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;二、准备环境  1、操作系统为windows 7 留有16G的空闲分区，计划14G留给根分区，2G留给交换分区;&lt;/p&gt;
&lt;p&gt;2、在C盘新建文件夹ubuntu，把镜像natty-desktop-amd64.iso拷贝到ubuntu文件夹;&lt;/p&gt;
&lt;p&gt;3、提取镜像natty-desktop-amd64.iso中的Casper文件夹中的initrd.lz和vmlinuz到ubuntu文件夹中;&lt;/p&gt;
&lt;p&gt;4、提取grub2dos中的grldr和grub.exe到C盘根目录;&lt;/p&gt;
&lt;p&gt;5、新建menu.lst文件添加下面内容&lt;/p&gt;
&lt;p&gt;title Install Ubuntu find &amp;ndash;set-root /natty-desktop-amd64.iso kernel (hd0,0)/vmlinuz boot=casper find_iso=/natty-desktop-amd64.iso noapic initrd (hd0,0)/initrd.lz&lt;/p&gt;
&lt;p&gt;6、在C盘根目录中新建文件boot.ini，添加下面内容&lt;/p&gt;
&lt;p&gt;c:grldr=&amp;ldquo;Install Ubuntu&amp;rdquo;&lt;/p&gt;
&lt;p&gt;三、 安装ubuntu 11.04&lt;/p&gt;
&lt;p&gt;1、重启电脑，可以看大grub引导界面，通过“Install Ubuntu”进入ubuntu 11.04系统;&lt;/p&gt;
&lt;p&gt;2、找到Applications下的Terminal，打开窗口：输入 sudo umount -l /isodevice 并回车执行该命令；&lt;/p&gt;
&lt;p&gt;3、双击桌面上的“Install Ubuntu”进入ubuntu的安装&lt;/p&gt;
&lt;p&gt;四、注意&lt;/p&gt;
&lt;p&gt;1,ubuntu 11.04中的initrd文件后缀是lz，不是以前的gz;&lt;/p&gt;
&lt;p&gt;2,在安装完成后，grub并不能找到windows 7系统，在重启ubuntu进入系统后执行下面命令&lt;/p&gt;
&lt;p&gt;sudo update-grub2&lt;/p&gt;
&lt;p&gt;这样grub就能添加windows 7引导项目;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Archlinux 安装在LVM分区上</title>
      <link>https://forzw.com/archives/597/</link>
      <pubDate>Sun, 03 Apr 2011 15:22:11 +0000</pubDate>
      <guid>https://forzw.com/archives/597/</guid>
      <description>&lt;p&gt;1、环境： Windows 7 + VirtualBox 4.04 Archlinux-2010.5-core-i686&lt;/p&gt;
&lt;p&gt;2、分区规划 物理分区： 虚拟机挂载两块块动态扩展硬盘 具体分区如下 /dev/sda1 100M /dev/sda2 1024M /dev/sdb1 1024M&lt;/p&gt;
&lt;p&gt;其中/dev/sda1 用做boot挂载点，因为grub 版本不支持boot挂载到lvm  LVM规划 分区 大小 挂载点 /dev/vg00/rootvol 1200M / /dev/vg00/swapvol 256M swap /dev/vg00/homevol 512M /home&lt;/p&gt;
&lt;p&gt;3、操作步骤（用arch光盘启动并操作）&lt;/p&gt;
&lt;p&gt;#modprobe dm-mod //加载dm-mod模块&lt;/p&gt;
&lt;p&gt;#vgchange -ay //设置自动激活所有已知卷组&lt;/p&gt;
&lt;p&gt;#pvcreate /dev/sda2 （可连续添加多个） #pvcreate /dev/sdb1 #pvdisplay //创建并查看物理卷&lt;/p&gt;
&lt;p&gt;#vgcreate vg00 /dev/sda2 （可连续添加多个） #vgextend vg00 /dev/sdb1 （添加物理卷到已知卷组） #vgchange -a y vg00 (可省略） #vgdisplay //创建并查看卷组&lt;/p&gt;
&lt;p&gt;#lvcreate -L 1200M -n rootvol vg00 #lvcreate -L 512M -n homevol vg00 #lvcreate -C y -L 256M -n swapvol vg00 （连续pe） #lvdisplay //创建并查看逻辑卷组&lt;/p&gt;</description>
    </item>
    <item>
      <title>ssh-copy-id</title>
      <link>https://forzw.com/archives/588/</link>
      <pubDate>Fri, 18 Feb 2011 08:33:31 +0000</pubDate>
      <guid>https://forzw.com/archives/588/</guid>
      <description>&lt;p&gt;参数：/usr/bin/ssh-copy-id [-i [identity_file]] [user@]machine 作用：拷贝公钥到远程主机，实现登录远程主机无须密码&lt;/p&gt;
&lt;p&gt;过程：&lt;/p&gt;
&lt;p&gt;//生成公钥&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;kevin@nb:~$ ssh-keygen 
Generating public/private rsa key pair.
Enter file in which to save the key (/home/kevin/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/kevin/.ssh/id_rsa.
Your public key has been saved in /home/kevin/.ssh/id_rsa.pub.
The key fingerprint is:
49:af:93:98:df:8a:e5:62:51:5c:86:12:66:6d:f4:33 kevin@nb
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;//查看公钥&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;kevin@nb:~$ ssh-add -L
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAvbji+85BMUVkdWw7+TW86Hzk67F0DngYzRgn6/v8
kKZBhwFXh1H6oEjdmGoniliEEeIII7drjMHWbG8Ng6g398ypawy8AoT2DexaCQQC7L9BzcpFlCEjyW6
I7v15ZMwBaIsoJwEmDS7lxvG+wN/2Mo2M6SEFcA+WzjO8MiXZHpvU5kit7UP2yvlFbKW4SZNcLj89
saQHQAyNWn9lTiR2HA5xgM5+B43Wb7pEngsdjh+hPDENznuKjrcAclRHIApx36Cn5foZ71V9lp0oY1/+
XEymwSba94id/4bCfdFf3TVBcr71vZMLHobPvxz8gjh38xomTq2kYA66hVVAvUoxKw== kevin@nb
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;//拷贝公钥&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;kevin@nb:~$ ssh-copy-id root@10.0.50.85
The authenticity of host &amp;#39;10.0.50.85 (10.0.50.85)&amp;#39; can&amp;#39;t be established.
RSA key fingerprint is d3:9f:63:a5:e8:24:05:4a:57:54:1b:54:cc:0f:31:65.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added &amp;#39;10.0.50.85&amp;#39; (RSA) to the list of known hosts.
root@10.0.50.85&amp;#39;s password: 
Now try logging into the machine, with &amp;#34;ssh &amp;#39;root@10.0.50.85&amp;#39;&amp;#34;, and check in:

  .ssh/authorized_keys

to make sure we haven&amp;#39;t added extra keys that you weren&amp;#39;t expecting.
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>hosts.allow and hosts.deny</title>
      <link>https://forzw.com/archives/584/</link>
      <pubDate>Thu, 30 Dec 2010 07:59:53 +0000</pubDate>
      <guid>https://forzw.com/archives/584/</guid>
      <description>&lt;p&gt;这两个文件是tcpd服务器的配置文件，tcpd服务器可以控制外部IP对本机服务的访问。这两个配置文件的格式如下：&lt;/p&gt;
&lt;p&gt;#服务进程名:主机列表:当规则匹配时可选的命令操作 server_name:hosts-list[:command] /etc/hosts.allow控制可以访问本机的IP地址，/etc/hosts.deny控制禁止访问本机的IP。如果两个文件的配置有冲突，以/etc/hosts.deny为准。&lt;/p&gt;
&lt;p&gt;下面为示例： 1.限制所有的ssh， 除非从61.158.252.0——127上来。 &amp;raquo;hosts.deny: sshd:ALL &amp;raquo;hosts.allow: sshd:61.158.252.0/255.255.255.128  2.封掉61.158.252.0——127的telnet &amp;raquo;hosts.deny in.sshd:61.158.252.0/255.255.255.128&lt;/p&gt;
&lt;p&gt;3.限制所有人的TCP连接，除非从61.158.252.0——127访问 &amp;raquo;hosts.deny ALL:ALL &amp;raquo;hosts.allow ALL:61.158.252.0/255.255.255.128&lt;/p&gt;
&lt;p&gt;4.限制61.158.252.0——127对所有服务的访问 &amp;raquo;hosts.deny ALL:61.158.252.0/255.255.255.128&lt;/p&gt;
&lt;p&gt;5.限制125.46开头的ip对所有服务的访问 &amp;raquo;hosts.deny ALL:125.46.&lt;/p&gt;</description>
    </item>
    <item>
      <title>在SuSE上安装Oracle 9i</title>
      <link>https://forzw.com/archives/583/</link>
      <pubDate>Thu, 30 Dec 2010 03:47:46 +0000</pubDate>
      <guid>https://forzw.com/archives/583/</guid>
      <description>&lt;p&gt;系统环境：SuSE 9.1，9.2，9.3，10.1 oracle版本：9i（R2）&lt;/p&gt;
&lt;p&gt;安装过程分以下四个步骤&lt;/p&gt;
&lt;p&gt;一，安装准备 二，下载安装 三，相关设置 四，常见错误&lt;/p&gt;
&lt;p&gt;一，安装准备 1，创建oracle用户  以root用户登录，并创建oracle用户以及所属的dba组&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;su -
# groupadd dba
# useradd -g dba oracle
# mkdir /home/oracle
# chown oracle:dba /home/oracle  
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2，配置系统参数&lt;/p&gt;
&lt;p&gt;编辑 /etc/sysctl.conf 文件并添加下列参数：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
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 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;编辑后可以运行“sysctl -p&amp;quot; 生效，或者重启系统&lt;/p&gt;
&lt;p&gt;编辑 /etc/security/limits.conf 并添加下行参数：&lt;/p&gt;</description>
    </item>
    <item>
      <title>在Fedora上安装Oracle 9i</title>
      <link>https://forzw.com/archives/582/</link>
      <pubDate>Thu, 30 Dec 2010 03:47:07 +0000</pubDate>
      <guid>https://forzw.com/archives/582/</guid>
      <description>&lt;p&gt;系统环境：Fedora Core 2,3,4,5,6 oracle版本：9i（R2）&lt;/p&gt;
&lt;p&gt;安装过程分以下四个步骤&lt;/p&gt;
&lt;p&gt;一，安装准备 二，下载安装 三，相关设置 四，常见错误&lt;/p&gt;
&lt;p&gt;一，安装准备 1，创建oracle用户  以root用户登录，并创建oracle用户以及所属的dba组&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;su -
# groupadd dba
# useradd -g dba oracle
# mkdir /home/oracle
# chown oracle:dba /home/oracle  
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2，配置系统参数&lt;/p&gt;
&lt;p&gt;编辑 /etc/sysctl.conf 文件并添加下列参数：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;kernel.sem = 250 32000 100 128
kernel.shmmax = 2147483648
kernel.shmmni = 128
kernel.shmall = 2097152
kernel.msgmnb = 65536
kernel.msgmni = 2878
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000  
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;编辑后可以运行“sysctl -p&amp;quot; 生效，或者重启系统&lt;/p&gt;
&lt;p&gt;编辑 /etc/security/limits.conf 并添加下行参数：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;* - nproc 16384
* - nofile 16384   
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;3，创建oracle目录&lt;/p&gt;</description>
    </item>
    <item>
      <title>在SUSE上安装oracle 11gR1</title>
      <link>https://forzw.com/archives/577/</link>
      <pubDate>Wed, 29 Dec 2010 14:45:17 +0000</pubDate>
      <guid>https://forzw.com/archives/577/</guid>
      <description>&lt;p&gt;系统环境：SUSE 10.3 X86_64 OpenSUSE 10.3 X86_64 oracle版本：11.1.0.6.0&lt;/p&gt;
&lt;p&gt;安装过程分以下四个步骤&lt;/p&gt;
&lt;p&gt;一，安装准备 二，下载安装 三，相关设置 四，常见错误&lt;/p&gt;
&lt;p&gt;一，安装准备 1，创建oracle用户  以root用户登录，并创建oracle用户以及所属的dba组&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;su -
# groupadd dba
# useradd -g dba oracle
# mkdir /home/oracle
# chown oracle:dba /home/oracle 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2，配置系统参数&lt;/p&gt;
&lt;p&gt;编辑 /etc/sysctl.conf 文件并添加下列参数：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6553600
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;编辑后可以运行“sysctl -p&amp;quot; 生效，或者重启系统&lt;/p&gt;</description>
    </item>
    <item>
      <title>在RedHat及其衍生系统上安装Oracle 11gR1</title>
      <link>https://forzw.com/archives/576/</link>
      <pubDate>Wed, 29 Dec 2010 14:39:29 +0000</pubDate>
      <guid>https://forzw.com/archives/576/</guid>
      <description>&lt;p&gt;oracle版本：11.1.0.6.0 redhat版本：RedHat EL4,5 Oracle EL 4,5 CentOS 4,5&lt;/p&gt;
&lt;p&gt;安装过程分以下四个步骤&lt;/p&gt;
&lt;p&gt;一，安装准备 二，下载安装 三，相关设置 四，常见错误&lt;/p&gt;
&lt;p&gt;一，安装准备 1，创建oracle用户  以root用户登录，并创建oracle用户以及所属的dba组&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;su -
# groupadd dba
# useradd -g dba oracle
# mkdir /home/oracle
# chown oracle:dba /home/oracle  
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2，配置系统参数&lt;/p&gt;
&lt;p&gt;编辑 /etc/sysctl.conf 文件并添加下列参数：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6553600
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;编辑后可以运行“sysctl -p&amp;quot; 生效，或者重启系统&lt;/p&gt;</description>
    </item>
    <item>
      <title>在SUSE上安装Oracle 10g</title>
      <link>https://forzw.com/archives/575/</link>
      <pubDate>Wed, 29 Dec 2010 14:34:55 +0000</pubDate>
      <guid>https://forzw.com/archives/575/</guid>
      <description>&lt;p&gt;系统环境：SUSE ES9，SUSE Profesional 9.1 9.2 9.3 oracle版本：10.2.0.1.0&lt;/p&gt;
&lt;p&gt;安装过程分以下四个步骤&lt;/p&gt;
&lt;p&gt;一，安装准备 二，下载安装 三，相关设置 四，常见错误&lt;/p&gt;
&lt;p&gt;一，安装准备 1，创建oracle用户  以root用户登录，并创建oracle用户以及所属的dba组&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;su -
# groupadd dba
# useradd -g dba oracle
# mkdir /home/oracle
# chown oracle:dba /home/oracle  
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2，配置系统参数&lt;/p&gt;
&lt;p&gt;编辑 /etc/sysctl.conf 文件并添加下列参数：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
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 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;编辑后可以运行“sysctl -p&amp;quot; 生效，或者重启系统&lt;/p&gt;</description>
    </item>
    <item>
      <title>在Fedora上安装Oracle 10g</title>
      <link>https://forzw.com/archives/574/</link>
      <pubDate>Wed, 29 Dec 2010 14:30:20 +0000</pubDate>
      <guid>https://forzw.com/archives/574/</guid>
      <description>&lt;p&gt;系统环境：Fedora 2、3、4、5、6、7 Oracle版本：10.2.0.1.0&lt;/p&gt;
&lt;p&gt;安装过程分以下四个步骤&lt;/p&gt;
&lt;p&gt;一，安装准备 二，下载安装 三，相关设置 四，常见错误&lt;/p&gt;
&lt;p&gt;一，安装准备 1，创建oracle用户  以root用户登录，创建oracle用户以及其所属的dba组&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;su -
# groupadd dba
# useradd -g dba oracle 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2，设置系统参数&lt;/p&gt;
&lt;p&gt;编辑 /etc/sysctl.conf 文件并添加下列参数：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
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 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;编辑后可以运行“sysctl -p&amp;quot; 生效，或者重启系统&lt;/p&gt;
&lt;p&gt;编辑 /etc/pam.d/login 文件，并添加下行参数：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;session required /lib/security/pam_limits.so 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;编辑 /etc/security/limits.conf 并添加下行参数：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;oracle    soft  nproc  2047
oracle    hard  nproc  16384
oracle    soft  nofile  1024
oracle    hard  nofile  65536  
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;禁用selinux，这个只是在Fedora 4版本中进行 编辑 /etc/selinux/config 改变SELINUX值为”disabled“&lt;/p&gt;</description>
    </item>
    <item>
      <title>在RedHat系统以及衍生系统生安装Oracle 10g</title>
      <link>https://forzw.com/archives/564/</link>
      <pubDate>Tue, 21 Dec 2010 10:19:36 +0000</pubDate>
      <guid>https://forzw.com/archives/564/</guid>
      <description>&lt;p&gt;版本：v1.0 创建时间：2010-12-21 修改时间：2010-12-22 文档描述： 在RedHat EL 3,4,5或者CentOS 3,4,5或者Oracle Enterprise Linux 4,5上安装Oracle 10g Release 2&lt;/p&gt;
&lt;p&gt;这篇文章描述Oracle 10g R2在红帽企业版 3,4,5和Oracle企业版 4,5系统上的安装步骤，由于centos和redhat的关系，这篇文章同样适用于centos 3,4,5版本。 文中并不涉及数据库建立具体过程以及ASM存储的设置步骤。 安装过程分下面几个步骤： 一、安装环境的准备 二、下载软件并安装 三、安装后的配置 四、常见安装错误&lt;/p&gt;
&lt;p&gt;一、安装环境的准备 1，创建oracle用户 以root用户登录系统创建oracle用户以及其所属的dba组&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;su -
# groupadd dba
# useradd -g dba oracle
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2，系统参数设置 编辑/etc/sysctl.conf并添加下面内容&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
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
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;注意：编辑完成后你需要重启系统，或者执行 ”sysctl -p“ 命令使配置生效。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Oracle,MySQL数据库自动备份实例</title>
      <link>https://forzw.com/archives/560/</link>
      <pubDate>Fri, 10 Dec 2010 08:48:04 +0000</pubDate>
      <guid>https://forzw.com/archives/560/</guid>
      <description>&lt;p&gt;1，关于Oracle，由于我需要备份的Oracle数据库较小，所以采用exp方式，脚本如下&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#环境变量
export ORACLE_BASE=/home/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db
export ORA_CRS_HOME=$ORACLE_BASE/product/10.2.0/crs
export PATH=$PATH:$ORACLE_HOME/bin:$ORA_CRS_HOME/bin
export ORACLE_SID=test1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib32
export LD_LIBRARY_PATH_64=$ORACLE_HOME/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib 
#进行备份
exp test/test@test1 file=/data/bakup/test_15day.dmp direct=y
#由于exp未主动覆盖备份文件，这里就采用mv重命名
mv -f test_15day.dmp test.dmp
#将备份进行压缩存档
gzip -c /data/bakup/test.dmp &amp;gt; /data/bakup/test_`date +%y%m%d%H%M`.gz
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;若是oracle备份，在远端主机，可以用scp拖回本地，这里采用expect工具自动登录&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#!/usr/bin/expect -f
#定义密码
set password oracle
#下载过程
spawn scp oracle@10.0.0.1:/data/backup/test.dmp /data/oracle_backup_test/
set timeout 200
expect &amp;#34;oracle@10.0.0.1&amp;#39;s password:&amp;#34;
set timeout 200
send &amp;#34;$password\r&amp;#34;
set timeout 200
send &amp;#34;exit\r&amp;#34;
expect eof
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2，关于MySQL，这里采用mysqldump工具进行导出，命令较为简单&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#命令中包含地址，用户名密码，数据库名称，其中数据库名称可以为多个
mysqldump -h 10.0.0.9 -ubackup -p123456 test &amp;gt; /data/mysql_backup/test.sql
#这里通过拷贝进行归档
cp /data/mysql_backup/test.sql /data/mysql_backup/backup-`date +%y%m%d%H%M`.sql
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;3，备份的压缩归档，通过压缩可以减少存储空间的占用&lt;/p&gt;</description>
    </item>
    <item>
      <title>Crontab详解与实例</title>
      <link>https://forzw.com/archives/559/</link>
      <pubDate>Fri, 10 Dec 2010 08:43:01 +0000</pubDate>
      <guid>https://forzw.com/archives/559/</guid>
      <description>&lt;p&gt;cron是一个linux下的定时执行工具，通下列命令进行工具的启动和停止&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;/sbin/service crond start //启动服务 
/sbin/service crond stop //关闭服务 
/sbin/service crond restart //重启服务 
/sbin/service crond reload //重新载入配置 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;编辑方法：&lt;/p&gt;
&lt;p&gt;1、直接用crontab命令编辑&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;crontab -u //设定某个用户的cron服务，一般root用户在执行这个命令的时候需要此参数 
crontab -l //列出某个用户cron服务的详细内容 
crontab -r //删除某个用户的cron服务 
crontab -e //编辑某个用户的cron服务 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2、编辑/etc/crontab 文件配置cron&lt;/p&gt;
&lt;p&gt;基本格式 : *　　*　　*　　*　　*　　command 分　时　日　月　周　命令&lt;/p&gt;
&lt;p&gt;crontab文件的一些例子：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;30 21 * * * /usr/local/etc/rc.d/lighttpd restart
#表示每晚的21:30重启。
45 4 1,10,22 * * /usr/local/etc/rc.d/lighttpd restart
#表示每月1、10、22日的4 : 45重启。
10 1 * * 6,0 /usr/local/etc/rc.d/lighttpd restart
#表示每周六、周日的1 : 10重启。
0,30 18-23 * * * /usr/local/etc/rc.d/lighttpd restart
#表示在每天18 : 00至23 : 00之间每隔30分钟重启。
0 23 * * 6 /usr/local/etc/rc.d/lighttpd restart
#表示每星期六的11 : 00 pm重启。
* */1 * * * /usr/local/etc/rc.d/lighttpd restart
#每一小时重启
* 23-7/1 * * * /usr/local/etc/rc.d/lighttpd restart
#晚上11点到早上7点之间，每隔一小时重启
0 11 4 * mon-wed /usr/local/etc/rc.d/lighttpd restart
#每月的4号与每周一到周三的11点重启
0 4 1 jan * /usr/local/etc/rc.d/lighttpd restart
#一月一号的4点重启
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>200&#43;行内核补丁的ubuntu应用方案</title>
      <link>https://forzw.com/archives/552/</link>
      <pubDate>Fri, 19 Nov 2010 10:44:35 +0000</pubDate>
      <guid>https://forzw.com/archives/552/</guid>
      <description>&lt;p&gt;前几天有报道称，200+行的Kernel补丁能显著改善桌面性能，降低延迟。Red Hat的开发 者Lennart Poettering在邮件列表上回复Linus Torvalds时称，他有一个替代方案，只 需运行两次命令，在~/.bashrc文件中粘贴4行代码就可实现相同的效果。 Ubuntu发行版 的使用指南：&lt;/p&gt;
&lt;p&gt;1.用&amp;quot;/dev&amp;quot;替换&amp;quot;/sys/fs&amp;quot;；在 /etc/rc.local文件中的exit 0上面中加入以下命令：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;mkdir -p /dev/cgroup/cpu
mount -t cgroup cgroup /dev/cgroup/cpu -o cpu
mkdir -m 0777 /dev/cgroup/cpu/user
echo &amp;#34;1&amp;#34; &amp;gt; /dev/cgroup/cpu/user/notify_on_release
echo &amp;#34;/usr/local/sbin/cgroup_clean&amp;#34; &amp;gt; /dev/cgroup/cpu/release_agent
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2.执行：sudo chmod +x /etc/rc.local  3.在~/.bashrc文件中加入以下代码：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;if [ &amp;#34;$PS1&amp;#34; ] ; then
mkdir -m 0700 /dev/cgroup/cpu/user/$$
echo $$ &amp;gt; /dev/cgroup/cpu/user/$$/tasks
fi
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;4.运行命令：sudo gedit /usr/local/sbin/cgroup_clean&lt;/p&gt;
&lt;p&gt;5.粘贴代码：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#!/bin/sh
rmdir /dev/cgroup/cpu/$1
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;6.保存文件，执行命令：sudo chmod +x /usr/local/sbin/cgroup_clean&lt;/p&gt;
&lt;p&gt;7.重启电脑。&lt;/p&gt;</description>
    </item>
    <item>
      <title>2010 Linux Journal 读者选择奖</title>
      <link>https://forzw.com/archives/549/</link>
      <pubDate>Wed, 03 Nov 2010 00:56:39 +0000</pubDate>
      <guid>https://forzw.com/archives/549/</guid>
      <description>&lt;p&gt;这是由 Linux Journal 网站颁布的一份读者选择奖列表，里面包含各种流行的开源类、闭源类、在线服务等相关软件和产品，让我们一起来看一下哪些产品榜上有名。 奖项：&lt;/p&gt;
&lt;p&gt;最佳 Linux 发行版： Ubuntu / 提名： PcLinuxOS , Debian , Fedora , Pardus&lt;/p&gt;
&lt;p&gt;最佳上网本/限制设备发行版： Ubuntu Netbook Remix / 提名：Google Android , Meego ,Puppy ,PclinuxOS LXDE&lt;/p&gt;
&lt;p&gt;最佳手机系统： Google Android / 提名： Meego , Symbian , Maemo ,Mobin&lt;/p&gt;
&lt;p&gt;最佳桌面环境： Gnome 和 KDE / 提名：XFCE, LXDE ,Fluxbox&lt;/p&gt;
&lt;p&gt;最佳Web 浏览器： FireFox / 提名： Chrome , Opera ,Konqueror , Mozilla Seamonkey&lt;/p&gt;
&lt;p&gt;最佳 Email 客户端： Thunderbird / 提名：Gmail ,Kmail ,Evolution, mutt&lt;/p&gt;</description>
    </item>
    <item>
      <title>10 个最酷的 Linux 单行命令</title>
      <link>https://forzw.com/archives/542/</link>
      <pubDate>Tue, 26 Oct 2010 11:59:12 +0000</pubDate>
      <guid>https://forzw.com/archives/542/</guid>
      <description>&lt;p&gt;下面是来自 Commandlinefu 网站由用户投票决出的 10 个最酷的 Linux 单行命令。&lt;/p&gt;
&lt;p&gt;1，sudo !!&lt;/p&gt;
&lt;p&gt;以 root 帐户执行上一条命令。&lt;/p&gt;
&lt;p&gt;2，python -m SimpleHTTPServer&lt;/p&gt;
&lt;p&gt;利用 Python 搭建一个简单的 Web 服务器，可通过 http://$HOSTNAME:8000 访问。&lt;/p&gt;
&lt;p&gt;3，:w !sudo tee %&lt;/p&gt;
&lt;p&gt;在 Vim 中无需权限保存编辑的文件。&lt;/p&gt;
&lt;p&gt;4，cd -&lt;/p&gt;
&lt;p&gt;更改到上一次访问的目录。  5，^foo^bar&lt;/p&gt;
&lt;p&gt;将上一条命令中的 foo 替换为 bar，并执行。&lt;/p&gt;
&lt;p&gt;6，cp filename{,.bak}&lt;/p&gt;
&lt;p&gt;快速备份或复制文件。&lt;/p&gt;
&lt;p&gt;7，mtr google.com&lt;/p&gt;
&lt;p&gt;traceroute + ping。&lt;/p&gt;
&lt;p&gt;8，!whatever:p&lt;/p&gt;
&lt;p&gt;搜索命令历史，但不执行。&lt;/p&gt;
&lt;p&gt;9，$ssh-copy-id user@host&lt;/p&gt;
&lt;p&gt;将 ssh keys 复制到 user@host 以启用无密码 SSH 登录。&lt;/p&gt;
&lt;p&gt;10，ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -sameq /tmp/out.mpg&lt;/p&gt;
&lt;p&gt;把 Linux 桌面录制为视频。&lt;/p&gt;</description>
    </item>
    <item>
      <title>RDESKTOP:linux下远程桌面命令</title>
      <link>https://forzw.com/archives/504/</link>
      <pubDate>Thu, 12 Aug 2010 00:50:13 +0000</pubDate>
      <guid>https://forzw.com/archives/504/</guid>
      <description>&lt;p&gt;1，安装&lt;/p&gt;
&lt;p&gt;apt-get install rdesktop 或者， yum install rdesktop&lt;/p&gt;
&lt;p&gt;2，命令参数&lt;/p&gt;
&lt;p&gt;./rdesktop -u root -p 123 -f -r clipboard:PRIMARYCLIPBOARD -r disk:sunray=/home/users oss-ww&lt;/p&gt;
&lt;p&gt;-u 和 -p: 指定用户名和密码 -f : 默认全屏， 需要用Ctrl-Alt-Enter组合键进行全屏模式切换。 -r clipboard:PRIMARYCLIPBOARD : 这个一定要加上，要不然不能在主机Solaris和服务器Windows直接复制粘贴文字了。贴中文也没有问题。 -r disk:sunray=/home/users : 指定主机Solaris上的一个目录映射到远程Windows上的硬盘，传送文件就不用再靠Samba或者FTP了。  3，示例&lt;/p&gt;
&lt;p&gt;$rdesktop -fr sound:local 221.97.223.202 $ info rdesktop //帮助信息 $rdesktop 192.168.1.1 //打开了一个8位色彩的，网速慢的话建议用； $rdesktop -a 16 192.168.1.1 //这个是16位色彩的了； $rdesktop -u administrator -p ****** -a 16 192.168.1.1 //都直接登陆； 还有就是 －f 全屏操作，－g 指定使用屏幕大小 －g 800*600+0+0 这个‘＋0’就是，就是你这个窗口的在你linux上出现的位置， 其它没什么了吧!加上-r sound:local可以把声音也弄到本地； $rdesktop -u administrator -p ****** -a 16 -r sound:local 192.168.1.1&lt;/p&gt;</description>
    </item>
    <item>
      <title>为Apache添加MP4扩展</title>
      <link>https://forzw.com/archives/502/</link>
      <pubDate>Tue, 20 Jul 2010 04:13:27 +0000</pubDate>
      <guid>https://forzw.com/archives/502/</guid>
      <description>&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#安装库
$sudo apt-get install apache2-threaded-dev 

#下载软件包
$cd ~  
$wget http://h264.code-shop.com/download/apache_mod_h264_streaming-2.2.7.tar.gz  
$tar -zxvf apache_mod_h264_streaming-2.2.7.tar.gz  

#编译安装软件包
$cd ~/mod_h264_streaming-2.2.7  
$./configure --with-apxs=`which apxs2` 
$make  
$sudo make install  

#编辑apache设置
$sudo vim /etc/apache2/httpd.conf  

#添加下面内容
LoadModule h264_streaming_module /usr/lib/apache2/modules/mod_h264_streaming.so 
AddHandler h264-streaming.extensions .mp4 

#重启
$sudo /etc/init.d/apache2 restart 
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>oracle 10g rac 安装图解</title>
      <link>https://forzw.com/archives/472/</link>
      <pubDate>Thu, 27 May 2010 07:36:08 +0000</pubDate>
      <guid>https://forzw.com/archives/472/</guid>
      <description>&lt;p&gt;规划：所用linux系统以虚拟化方式安装在esx上，配置有内网的yum源，各分配有16G存储，下面为简单拓扑图&lt;/p&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://media.forzw.com/blog/2016/rac.jpg&#34;&gt;&lt;/p&gt;
&lt;p&gt;一，下载软件 1,地址：http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201linx8664soft.html 10201_database_linux_x86_64.cpio.gz 10201_clusterware_linux_x86_64.cpio.gz&lt;/p&gt;
&lt;p&gt;2,地址：http://www.oracle.com/technology/software/tech/linux/asmlib/rhel5.html oracleasm-2.6.18-164.el5-2.0.5-1.el5.x86_64.rpm oracleasmlib-2.0.4-1.el5.x86_64.rpm oracleasm-support-2.1.3-1.el5.x86_64.rpm&lt;/p&gt;
&lt;p&gt;二，安装环境 1，系统：centos 5.4 x86_64 2，外部存储：linux下的iscsi 3, iscsi服务器配置&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#下载iSCSI Enterprise Target
wget http://nchc.dl.sourceforge.net/sourceforge/iscsitarget/iscsitarget-0.4.17.tar.gz

#解压缩
tar -zxvf iscsitarget-0.4.17.tar.gz
cd iscsitarget-0.4.17

#编译、安装
make
make install

#配置服务
chkconfig --level 2345 iscsi-target on
service iscsi-target start

#配置第一个iSCSI设备
#在/opt/下生成64G大的空洞设备文件
#请将opt修改为实际的目录，并根据实际情况设置设备文件大小
#生成空洞文件速度很快的，且在真正使用之前不占用磁盘实际空间
dd if=/dev/zero of=/opt/iscsi.[配置文件中Target的名称].img bs=1G count=64 seek=64

#cout是从什么开始，一般设置为0
#生成256G的例子
dd if=/dev/zero of=/opt/iscsi/iqn.2009-04.com.haoyuan-inc:storage.disk.oracle.01.img bs=1G count=0 seek=256

vim /etc/ietd.conf
#编辑Target名称，例如：iqn.2009-04.com.haoyuan-inc:storage.disk.share.01
#编辑LUN段内容，例如：Lun 0 Path=/opt/iscsi.iqn.2009-04.com.haoyuan-inc:storage.disk.share.01.image,Type=fileio
#不要设置XXXUser，允许任何人访问

#重启iscsi-target
service iscsi-target restart
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;三，安装准备&lt;/p&gt;</description>
    </item>
    <item>
      <title>SSH建立信任关系</title>
      <link>https://forzw.com/archives/465/</link>
      <pubDate>Thu, 06 May 2010 08:41:27 +0000</pubDate>
      <guid>https://forzw.com/archives/465/</guid>
      <description>&lt;p&gt;Client：发起连接命令（ssh、scp）的机器 Server：被连接的机器&lt;/p&gt;
&lt;p&gt;ssh主目录：~/.ssh&lt;/p&gt;
&lt;p&gt;ssh信任连接，即相同用户登陆不需要输入密码，也即使用了公钥证书认证。 证书在客户端产生，公钥id_rsa.pub，私钥id_rsa 执行命令：ssh-keygen -t rsa&lt;/p&gt;
&lt;p&gt;然后将公钥copy到服务端改名authorized_keys 执行命令：scp ~/.ssh/id_rsa.pub root@服务端ip :/root/.ssh/authorized_keys 即可运行“ssh 信任用户@服务端ip”不要输密码可直接登到服务端。&lt;/p&gt;</description>
    </item>
    <item>
      <title>linux下挂载ISCSI</title>
      <link>https://forzw.com/archives/462/</link>
      <pubDate>Sat, 17 Apr 2010 08:27:15 +0000</pubDate>
      <guid>https://forzw.com/archives/462/</guid>
      <description>&lt;p&gt;#安装iSCSI发起器&lt;/p&gt;
&lt;p&gt;yum install -y &amp;ndash;nogpgcheck iscsi-initiator-utils&lt;/p&gt;
&lt;p&gt;chkconfig &amp;ndash;level 2345 iscsi on&lt;/p&gt;
&lt;p&gt;chkconfig &amp;ndash;level 2345 iscsid on&lt;/p&gt;
&lt;p&gt;service iscsi start&lt;/p&gt;
&lt;p&gt;service iscsid start&lt;/p&gt;
&lt;p&gt;#挂载iSCSI设备  iscsiadm -m node -T iqn.2009-04.com.haoyuan-inc:storage.disk.oracle.01 -p 10.0.11.21 -l&lt;/p&gt;
&lt;p&gt;cat &amp;raquo; /etc/rc.local &amp;laquo; EOF&lt;/p&gt;
&lt;p&gt;iscsiadm -m node -T iqn.2009-04.com.haoyuan-inc:storage.disk.oracle.01 -p 10.0.11.21 -l&lt;/p&gt;
&lt;p&gt;EOF&lt;/p&gt;
&lt;p&gt;#为挂载的iSCSI设备做分区&lt;/p&gt;
&lt;p&gt;#这里用的是/dev/sdb，请检查实际挂载的位置,可以用fdisk -l查看&lt;/p&gt;
&lt;p&gt;fdisk /dev/sdb&lt;/p&gt;
&lt;p&gt;之后格式化，挂载即可，挂载后添加到/etc/fstab文件中&lt;/p&gt;
&lt;p&gt;iscsiadm -m node -T iqn.2009-04.com.haoyuan-inc:storage.disk.oracle.01 -p 10.0.11.21 -l&lt;/p&gt;</description>
    </item>
    <item>
      <title>Linux基本网络配置</title>
      <link>https://forzw.com/archives/461/</link>
      <pubDate>Sat, 17 Apr 2010 08:20:18 +0000</pubDate>
      <guid>https://forzw.com/archives/461/</guid>
      <description>&lt;p&gt;一、 IP 立即更改:#ifconfig eth0 netmask &amp;lt;子网掩码&amp;gt;&lt;/p&gt;
&lt;p&gt;永久更改： 编辑/etc/sysconfig/network-scripts/ifcfg-eth0 配置网卡的地址 IPADDR=XXX.XXX.XXX.XXX&lt;/p&gt;
&lt;p&gt;[root@redhat network-scripts]# cat ifcfg-eth0 DEVICE=eth0 BOOTPROTO=static &amp;ndash;自动获取改为dhcp HWADDR=00:03:FF:2C:EE:0B ONBOOT=yes TYPE=Ethernet IPADDR=192.168.0.10&lt;/p&gt;
&lt;p&gt;二 、HOSTNAME&lt;/p&gt;
&lt;p&gt;立即更改：hostname &amp;lt;主机名&amp;gt;&lt;/p&gt;
&lt;p&gt;永久更改： 编辑文件/etc/sysconfig/network，输入新的主机名&lt;/p&gt;
&lt;p&gt;[root@redhat sysconfig]# cat network NETWORKING=yes HOSTNAME=redhat&lt;/p&gt;
&lt;p&gt;三 、GATEWAY&lt;/p&gt;
&lt;p&gt;立即更改：route add default gateway&lt;/p&gt;
&lt;p&gt;永久更改：编辑文件/etc/sysconfig/network，添加&lt;/p&gt;
&lt;p&gt;GATEWAY=XXX.XXX.XXX.XXX&lt;/p&gt;
&lt;p&gt;四、DNS&lt;/p&gt;
&lt;p&gt;在/etc/resolv.conf中添加“nameserver ”&lt;/p&gt;
&lt;p&gt;root@test # cat /etc/resolv.conf&lt;/p&gt;
&lt;p&gt;domain cmydomain.com &amp;ndash;默认域名，若要查询的主机名称不含点号（.），那么解析器就会把默认域名加在主机名称之后。接着，解析器会在传送给名称服务器的查询中，使用这个扩展后的主机名称。该项不能和search兼用!如果设置了环境变量LOCALDOMAIN,则会覆盖掉domain项目的配置值，导致解析器以LOCALDOMAIN的配置值来扩展主机名称。 nameserver 192.168.0.11 nameserver 202.101.103.55&lt;/p&gt;
&lt;p&gt;五 、 单网卡绑定多IP&lt;/p&gt;
&lt;p&gt;立即更改：ifconfig eth0:0 192.168.0.3 broadcast 192.168.0.255 netmask 255.255.255.0&lt;/p&gt;
&lt;p&gt;永久更改： 1）假设需要绑定多IP的网卡是eth0，请在/etc/sysconfig/network-scripts目录里面创建一个名为ifcfg-eth0:0的文件 2）[root@redhat network-scripts]# cat ifcfg-eth0:0 DEVICE=eth0:0 BOOTPROTO=static &amp;ndash;自动获取改为dhcp HWADDR=00:03:FF:2C:EE:0B ONBOOT=yes TYPE=Ethernet IPADDR=192.168.0.11 3)#service network restart&lt;/p&gt;</description>
    </item>
    <item>
      <title>搭建yum服务器</title>
      <link>https://forzw.com/archives/435/</link>
      <pubDate>Thu, 18 Mar 2010 07:00:34 +0000</pubDate>
      <guid>https://forzw.com/archives/435/</guid>
      <description>&lt;p&gt;建立yum服务器，方便软件安装，下面操作的环境是centos 5.4 x86_64，采用http方式安装。 1、安装必要软件：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;yum install httpd createrepo
#apache服务和rpeo下的xml生成工具
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2、拷贝相关文件：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;mkdir -p /app/yum.repo/centos/5/os/x86_64/RPMS
mkdir -p /app/yum.repo/centos/5/updates
mkdir -p /app/yum.repo/tools/
mkdir /mnt/cdrom
mount -t iso9660 /dev/cdrom /mnt/cdrom
cp -R /mnt/cdrom/Centos/* /app/yum.repo/centos/5/os/x86_64/RPMS/
cp -R /mnt/cdrom/repodata /app/yum.repo/centos/5/os/x86_64/
cp -R /mnt/cdrom/RPM-GPG-KEY-CentOS-5 /app/yum.repo/
#拷贝其他包到/app/yum.repo/tools下，这个可以自定义添加你想要的rpm包，比如jdk
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;3、启动http服务:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;rm -rf /var/www/html
ln -s /app/yum.repo /var/www/html
service httpd start
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;4、修改repo文件：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;cd /etc/yum.repo/

vi CentOS-Base.repo

[base]
name=CentOS-$releasever - Base
baseurl=http://pxe.forzw.com/yum.repo/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://pxe.forzw.com/yum.repo/RPM-GPG-KEY-CentOS-5
　　
#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=http://pxe.forzw.com/yum.repo/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://pxe.forzw.com/yum.repo/RPM-GPG-KEY-CentOS-5
　　
vi CentOS-Tools.repo

[tools]
name=CentOS-$releasever - Base
baseurl=http://pxe.forzw.com/yum.repo/tools/
gpgcheck=0  
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;5、附加内容 在上述步骤结束后，更新需要使用yum机器/etc/yum.repo目录中的文件为第四步中更改的内容，即可使用yum，yum 命令在这里就不说了，补充几个yum服务器常用的命令：&lt;/p&gt;</description>
    </item>
    <item>
      <title>部署LVS&#43;Keepalived节点</title>
      <link>https://forzw.com/archives/431/</link>
      <pubDate>Fri, 12 Mar 2010 10:58:15 +0000</pubDate>
      <guid>https://forzw.com/archives/431/</guid>
      <description>&lt;p&gt;安装步骤如下：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ln -s /usr/src/kernels/(现有内核)/  /usr/src/linux
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;下载&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;wget http://www.linuxvirtualserver.org/software/kernel-2.6/ipvsadm-1.24.tar.gz
wget http://www.keepalived.org/software/keepalived-1.1.15.tar.gz
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;安装与启动&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;tar zxvf ipvsadm-1.24.tar.gz
cd ipvsadm-1.24
make
make install
cd ..
tar zxvf keepalived-1.1.15.tar.gz
cd keepalived-1.1.15
./configure
make 
make install

cp /usr/local/etc/rc.d/init.d/keepalived /etc/rc.d/init.d/
cp /usr/local/etc/sysconfig/keepalived /etc/sysconfig/
mkdir /etc/keepalived
cp /usr/local/etc/keepalived/keepalived.conf /etc/keepalived/
cp /usr/local/sbin/keepalived /usr/sbin/

service keepalived start
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>部署Func/Certmaster平台</title>
      <link>https://forzw.com/archives/430/</link>
      <pubDate>Fri, 12 Mar 2010 10:54:03 +0000</pubDate>
      <guid>https://forzw.com/archives/430/</guid>
      <description>&lt;p&gt;Func简介 Func是由红帽子公司以Fedora平台统一网络控制器 Func（Fedora Unified Network Controller &lt;a href=&#34;https://fedorahosted.org/func&#34;&gt;https://fedorahosted.org/func&lt;/a&gt;），目的是为了解决这一系列统一管理监控问题而设计开发的系统管理基础框架。 它是一个能有效的简化我们多服务器系统管理工作的工具，它很容易学习、很容易使用、也很容易被扩展，它功能强大而我们只需要非常非常少的配置和维护。 Func分为master及slave两部分，master为主控端，slave为被控端。以下为两部分的安装配置说明&lt;/p&gt;
&lt;p&gt;一、Func 2.5版本安装文档[Master]&lt;/p&gt;
&lt;p&gt;下载软件包&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;wget http://people.fedoraproject.org/~alikins/files/certmaster/certmaster-0.25.tar.gz
wget http://people.fedoraproject.org/~alikins/files/func/func-0.25.tar.gz
wget http://ovh.dl.sourceforge.net/sourceforge/pyopenssl/pyOpenSSL-0.9.tar.gz
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;安装&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;tar -zxvf pyOpenSSL-0.9.tar.gz
cd pyOpenSSL-0.9
/usr/local/bin/python setup.py install

tar -zxvf certmaster-0.25.tar.gz
cd certmaster-0.25
/usr/local/bin/python setup.py install

tar -zxvf func-0.25.tar.gz
cd func-0.25
/usr/local/bin/python setup.py install
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;配置&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;vi /etc/certmaster/certmaster.conf

[main]
autosign = no
listen_addr =

#证书交换通讯端口
listen_port = 1998

cadir = /etc/pki/certmaster/ca
cert_dir = /etc/pki/certmaster
certroot = /var/lib/certmaster/certmaster/certs
csrroot = /var/lib/certmaster/certmaster/csrs
cert_extension = cert
sync_certs = False
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;vi /etc/func/minion.conf
[main]
log_level = DEBUG
acl_dir = /etc/func/minion-acl.d

listen_addr =

#(Func通讯端口
listen_port = 1999
minion_name =
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;启动服务&lt;/p&gt;</description>
    </item>
    <item>
      <title>Bonnie&#43;&#43;</title>
      <link>https://forzw.com/archives/427/</link>
      <pubDate>Tue, 02 Mar 2010 08:17:04 +0000</pubDate>
      <guid>https://forzw.com/archives/427/</guid>
      <description>&lt;p&gt;Bonnie++是一个配置简单，使用方便的磁盘IO测试工具。 1、安装&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#wget http://www.coker.com.au/bonnie++/bonnie++-1.03e.tgz
#tar zxvf bonnie++-1.03e.tgz
#cd bonnie++-1.03e
#./configure
#make
#make install
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2、bonnie++（Version: 1.03）的使用方法以及结果的含义。 usage: bonnie++ [-d scratch-dir] [-s size(Mb)[:chunk-size(b)]] [-n number-to-stat[:max-size[:min-size][:num-directories]]] [-m machine-name] [-r ram-size-in-Mb] [-x number-of-tests] [-u uid-to-use:gid-to-use] [-g gid-to-use] [-q] [-f] [-b] [-p processes -y] 首先说明一下命令中常用的参数。 -d 生成测试文件的路径 -s 生成测试文件的大小，以M为单位（如果不使用-r参数，则要求文件大小至少是系统物理内存的2倍） -m 机器名，实际上我们可以认为是本次测试的方案名，可以随便定义。默认是本机的hostname。 -r 内存大小，指定内存大小，这样可以通过-s参数创建r*2大小的文件，通常用于缩短测试时间，但是需要注意这样由于内存的cache可能导致测试结果的不准确 -x 测试的次数 -u 测试文件的属主和组，默认是执行bonnie++的当前用户和当前组 -g 测试文件的组，默认是执行bonnie++的当前用组 -b 在每次写文件时调用fsync()函数，对于测试邮件服务器或者数据库服务器这种通常需要同步操作的情况比较适合，而不使用该参数则比较适合测试copy文件或者编译等操作的效率。&lt;/p&gt;
&lt;p&gt;3、简单测试例子 通常我们可以简单地运行如下命令进行磁盘性能测试： bonnie++ -d /mnt/mfs –m test01 这样将会在指定的目录下（通常我们会指定一个盘阵上卷的挂载点），生成相当于主机物理内存两倍的文件，如果总量大于1G，则生成多个大小为1G的文件。假设主机内存为4G，那么在测试中就会生成8个1G的文件，到测试结束，这些文件会被自动删除。 如果我们的主机内存是4G，但是我们想缩短测试的时间，比如说只写2G的文件，就应该执行下面的命令： bonnie++ -d /mnt/mfs –m test01 –s 2048 –r 1024 -u root&lt;/p&gt;</description>
    </item>
    <item>
      <title>linux 中oracle 10g rac 关闭crs开机自启动</title>
      <link>https://forzw.com/archives/426/</link>
      <pubDate>Wed, 24 Feb 2010 06:06:14 +0000</pubDate>
      <guid>https://forzw.com/archives/426/</guid>
      <description>&lt;p&gt;linux 中在没有对init.crs作修改的时候,在开机时总是会自动把的cluster 软件和一起和系统起来.数据库raclinux&lt;/p&gt;
&lt;p&gt;另外，也可以通过crs-stat -t查看，把没有启动的服务手工启动&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[oracle@rac1 ~]$ crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.....CRM.cs application    OFFLINE   OFFLINE              
ora....db1.srv application    OFFLINE   OFFLINE              
ora.devdb.db   application    ONLINE    ONLINE    rac1       
ora....b1.inst application    ONLINE    ONLINE    rac1       
ora....b2.inst application    ONLINE    OFFLINE              
ora....SM1.asm application    ONLINE    ONLINE    rac1       
ora....C1.lsnr application    ONLINE    ONLINE    rac1       
ora.rac1.gsd   application    ONLINE    ONLINE    rac1       
ora.rac1.ons   application    ONLINE    ONLINE    rac1       
ora.rac1.vip   application    ONLINE    ONLINE    rac1       
ora....SM2.asm application    ONLINE    OFFLINE              
ora....C2.lsnr application    ONLINE    OFFLINE              
ora.rac2.gsd   application    ONLINE    OFFLINE              
ora.rac2.ons   application    ONLINE    OFFLINE              
ora.rac2.vip   application    ONLINE    ONLINE    rac1 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;禁止Clusterware在系统重启后自动启动：&lt;/p&gt;</description>
    </item>
    <item>
      <title>linux系统实用命令</title>
      <link>https://forzw.com/archives/419/</link>
      <pubDate>Tue, 26 Jan 2010 12:17:52 +0000</pubDate>
      <guid>https://forzw.com/archives/419/</guid>
      <description>&lt;p&gt;1、统计apache占用的系统内存&lt;/p&gt;
&lt;p&gt;ps aux | grep apache | awk ‘{sum+=$4};END {print sum}’&lt;/p&gt;
&lt;p&gt;注：$4表示第四域&lt;/p&gt;
&lt;p&gt;2、在VIM中的一些技巧&lt;/p&gt;
&lt;p&gt;（针对当前屏幕） H——跳到第一行 M——跳到中间一行 L——跳到最后一行&lt;/p&gt;
&lt;p&gt;（针对整个文档） gg——到首行 G——到尾行&lt;/p&gt;
&lt;p&gt;7yy复制7行 5dd 删除5行&lt;/p&gt;
&lt;p&gt;dG 删除所有行&lt;/p&gt;
&lt;p&gt;d$ 从当前位置删除到行尾&lt;/p&gt;
&lt;p&gt;y$ 从当前位置复制到行尾&lt;/p&gt;
&lt;p&gt;3、让命令提示符前显示完整路径&lt;/p&gt;
&lt;p&gt;vi /etc/bashrc&lt;/p&gt;
&lt;p&gt;找到 “$PS1″ = “\\s-\\v\\\$ ” ] &amp;amp;&amp;amp; PS1=”[\u@\h \W]\\$ “这一行，把这里的W改成小w，然后再重新启动一下机器就能实现&lt;/p&gt;
&lt;p&gt;4、在字符界面下安装开发工具与开发库&lt;/p&gt;
&lt;p&gt;# yum groupinstall “Development Tools”&lt;/p&gt;
&lt;p&gt;# yum groupinstall “Development Libraries”&lt;/p&gt;
&lt;p&gt;转载自：http://www.freeopens.com/2010_01_109.html&lt;/p&gt;</description>
    </item>
    <item>
      <title>DD命令详解</title>
      <link>https://forzw.com/archives/418/</link>
      <pubDate>Tue, 26 Jan 2010 12:11:33 +0000</pubDate>
      <guid>https://forzw.com/archives/418/</guid>
      <description>&lt;p&gt;1.命令简介 dd 的主要选项：&lt;/p&gt;
&lt;p&gt;指定数字的地方若以下列字符结尾乘以相应的数字:&lt;/p&gt;
&lt;p&gt;b=512, c=1, k=1024, w=2, xm=number m&lt;/p&gt;
&lt;p&gt;if=file #输入文件名，缺省为标准输入。 of=file #输出文件名，缺省为标准输出。 ibs=bytes #一次读入 bytes 个字节(即一个块大小为 bytes 个字节)。 obs=bytes #一次写 bytes 个字节(即一个块大小为 bytes 个字节)。 bs=bytes #同时设置读写块的大小为 bytes ，可代替 ibs 和 obs 。 cbs=bytes #一次转换 bytes 个字节，即转换缓冲区大小。 skip=blocks #从输入文件开头跳过 blocks 个块后再开始复制。 seek=blocks #从输出文件开头跳过 blocks 个块后再开始复制。(通常只有当输出文件是磁盘或磁带时才有效)。 count=blocks #仅拷贝 blocks 个块，块大小等于 ibs 指定的字节数。 conv=conversion[,conversion&amp;hellip;] #用指定的参数转换文件。&lt;/p&gt;
&lt;p&gt;转换参数: ascii 转换 EBCDIC 为 ASCII。 ebcdic 转换 ASCII 为 EBCDIC。 ibm 转换 ASCII 为 alternate EBCDIC. block 把每一行转换为长度为 cbs 的记录，不足部分用空格填充。 unblock 使每一行的长度都为 cbs ，不足部分用空格填充。 lcase 把大写字符转换为小写字符。 ucase 把小写字符转换为大写字符。 swab 交换输入的每对字节。 noerror 出错时不停止。 notrunc 不截短输出文件。 sync 把每个输入块填充到ibs个字节，不足部分用空(NUL)字符补齐。&lt;/p&gt;</description>
    </item>
    <item>
      <title>linux启动过程</title>
      <link>https://forzw.com/archives/417/</link>
      <pubDate>Tue, 26 Jan 2010 12:06:59 +0000</pubDate>
      <guid>https://forzw.com/archives/417/</guid>
      <description>&lt;p&gt;硬件读取引导扇区&lt;/p&gt;
&lt;p&gt;加载LILO或者grub&lt;/p&gt;
&lt;p&gt;加载内核&lt;/p&gt;
&lt;p&gt;挂装根文件系统&lt;/p&gt;
&lt;p&gt;启动/sbin/init ，一切进程的“祖父”&lt;/p&gt;
&lt;p&gt;读取/etc/inittab文件&lt;/p&gt;
&lt;p&gt;读取rc.sysinit文件&lt;/p&gt;
&lt;p&gt;读取/etc/fstab文件&lt;/p&gt;
&lt;p&gt;运行rcX.d下的文件（文件都是init.d下的符号链接）&lt;/p&gt;
&lt;p&gt;其中有一个xinetd 的超级进程，调用/etc/xinetd.conf 配置文件，从配置文件中知道读/etc/xinetd.d 文件，结束后调用Miggetty&lt;/p&gt;
&lt;p&gt;读取/etc/rc.d/rc.local文件&lt;/p&gt;</description>
    </item>
    <item>
      <title>Linux NFS Root and PXE-Boot</title>
      <link>https://forzw.com/archives/415/</link>
      <pubDate>Mon, 25 Jan 2010 02:59:46 +0000</pubDate>
      <guid>https://forzw.com/archives/415/</guid>
      <description>&lt;p&gt;Linux kernel hacking and test running on the same machine becomes a major pain. This tutorial explains how to separate the two easily for a quick code-and-test loop. This tutorial explains how to setup a Linux thin client that boots using PXE by pulling a remote Linux kernel image and mounting a remote root file system over NFS. This is only possible if your client machine has a network card that supports this (do you remember seeing some type of option like press N to boot from network just after posting?). I am using Fedora Core 5 as my server, so some of the details may be specific to FC.&lt;/p&gt;</description>
    </item>
    <item>
      <title>PXELINUX</title>
      <link>https://forzw.com/archives/414/</link>
      <pubDate>Mon, 25 Jan 2010 02:56:59 +0000</pubDate>
      <guid>https://forzw.com/archives/414/</guid>
      <description>&lt;h2 id=&#34;what-is-pxelinux&#34;&gt;What is PXELINUX?&lt;/h2&gt;
&lt;p&gt;PXELINUX is a SYSLINUX derivative, for booting Linux off a network server, using a network ROM conforming to the Intel PXE (Pre-Execution Environment) specification. PXELINUX is not a program that is intended to be flashed or burned into a PROM on the network card; if you want that, check out Etherboot ( &lt;a href=&#34;http://www.etherboot.org/&#34; title=&#34;http://www.etherboot.org/&#34;&gt;http://www.etherboot.org/&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;If you want to create PXE-compliant boot PROM for your network card (to use with PXELINUX, for example), check out NetBoot (&lt;a href=&#34;http://netboot.sourceforge.net/&#34; title=&#34;http://netboot.sourceforge.net/&#34;&gt;http://netboot.sourceforge.net/&lt;/a&gt;).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Setting up a PXE-Boot Server</title>
      <link>https://forzw.com/archives/413/</link>
      <pubDate>Mon, 25 Jan 2010 02:53:16 +0000</pubDate>
      <guid>https://forzw.com/archives/413/</guid>
      <description>&lt;p&gt;This documents how to setup a PXE boot server for Linux. This assumes that you&amp;rsquo;re using Redhat/FC as the PXE boot server. The vast majority of the information has been obtained from the following webpages:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://dev.brantleyonline.com/wiki/index.php/General&#34;&gt;http://dev.brantleyonline.com/wiki/index.php/General&lt;/a&gt;_Network_%28PXE%29_Booting &lt;a href=&#34;http://dev.brantleyonline.com/wiki/index.php/PXE&#34;&gt;http://dev.brantleyonline.com/wiki/index.php/PXE&lt;/a&gt;_Booting_-_Fedora_Core&lt;/p&gt;
&lt;ol start=&#34;0&#34;&gt;
&lt;li&gt;
&lt;p&gt;The first thing to note is that you need to setup your own mini-network that is completely disconnected from the network, since part of this process requires setting up a DHCP server which could conflict with the corporate DHCP server if they were both running on the same network simultaneously. So get yourself a switch from IT up front. You do *NOT* need the switch immediately, so just put it aside until I mention it again later on.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The next step is to choose a box to be the PXE boot server. This can really be any box at all, as long as you have a NIC in it that works reliably under Linux. For the purposes of this documentation, I&amp;rsquo;m going to assume that you&amp;rsquo;ve loaded Fedora Core 4 on this box (do that now, if you&amp;rsquo;ve not already). Get this box onto the network with DHCP (just like a normal installation).  2) Next you&amp;rsquo;ll need to install the following packages (which ship with FC4 already, so if you did an &amp;rsquo;everything&amp;rsquo; OS install, you should have them already. If not, you can install them easily with yum): tftp-server dhcp httpd syslinux&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;</description>
    </item>
    <item>
      <title>定制自己的LiveCD，依托(centos)</title>
      <link>https://forzw.com/archives/405/</link>
      <pubDate>Wed, 20 Jan 2010 04:46:58 +0000</pubDate>
      <guid>https://forzw.com/archives/405/</guid>
      <description>&lt;p&gt;1、建立自己的yum-repository或者使用官方的（考虑到你需要的软件小，所以这一步不是很必要）。&lt;/p&gt;
&lt;p&gt;2、安装一个centos系统，修改etc/yum.repos.d/centos-livecd.repo文件内容&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# Name: CentOS LiveCD repository
[livecd]
name = CentOS $releasever - LiveCD
baseurl = http://www.nanotechnologies.qc.ca/propos/linux/centos-live/$basearch/live
enabled=1
protect=0
gpgkey = http://www.nanotechnologies.qc.ca/propos/linux/RPM-GPG-KEY-PGuay
保存之后，执行以下命令：
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# yum install livecd-tools syslinux
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;这样就安装好了工具，接下来就是写自己想要的ks脚本；&lt;/p&gt;
&lt;p&gt;3、ks脚本&lt;/p&gt;
&lt;p&gt;名称：centos-livecd-minimal.ks（包含必须包的脚本）&lt;/p&gt;
&lt;p&gt;内容：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;lang en_US.UTF-8
keyboard us
timezone US/Eastern
auth --useshadow --enablemd5
selinux --disabled
firewall --disabled
 
 
repo --name=base --baseurl=http://ftp.telus.net/pub/centos/5/os/$basearch
repo --name=updates --baseurl=http://ftp.telus.net/pub/centos/5/updates/$basearch
repo --name=extras --baseurl=http://ftp.telus.net/pub/centos/5/extras/$basearch
#repo --name=base --baseurl=http://isoredirect.centos.org/centos/5/os/$basearch
#repo --name=updates --baseurl=http://isoredirect.centos.org/centos/5/updates/$basearch
#repo --name=extras --baseurl=http://isoredirect.centos.org/centos/5/extras/$basearch
repo --name=live --baseurl=http://www.nanotechnologies.qc.ca/propos/linux/centos-live/$basearch/live
 
%packages
bash
kernel
syslinux
passwd
policycoreutils
chkconfig
authconfig
rootfiles
comps-extras
xkeyboard-config
gnome-desktop
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;4、生成&lt;/p&gt;</description>
    </item>
    <item>
      <title>Nginx整合Resin</title>
      <link>https://forzw.com/archives/404/</link>
      <pubDate>Wed, 20 Jan 2010 04:37:31 +0000</pubDate>
      <guid>https://forzw.com/archives/404/</guid>
      <description>&lt;p&gt;操作系统：centos 5.4 64位&lt;/p&gt;
&lt;p&gt;1，安装jdk,已经配置有yumrepository，直接使用。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;yum install jdk
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2，安装pcre,nginx运行所需perl库。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;yum install pcre pcre-devel
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;3，安装mysql ，mysql相关配置省略。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;yum install mysql mysql-server
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;4，安装并配置resin。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;wget http://www.caucho.com/download/resin-4.0.3.tar.gz
 
tar zxvf resin-4.0.3.tar.gz
 
cd resin-4.0.3
 
./configure --prefix=/usr/local/resin
 
make &amp;amp;&amp;amp; make install
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;修改配置参数&lt;/p&gt;
&lt;p&gt;vi /usr/local/resin/conf/resin.xml 注释掉下面代码，不然会提示启动错误&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;
www-data
www-data
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;并添加相应配置&lt;/p&gt;
&lt;p&gt;启动resin&lt;/p&gt;
&lt;p&gt;/usr/local/resin/bin/resin.sh start 5，安装nginx。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;wget http://nginx.org/download/nginx-0.8.32.tar.gz
 
tar zxvf nginx-0.8.32.tar.gz
 
./configure --prefix=/usr/local/nginx
 
make &amp;amp;&amp;amp; make install
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;修改配置文件&lt;/p&gt;
&lt;p&gt;vi /usr/local/nginx/conf/proxy&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffers 32 4k;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;vi /usr/local/nginx/conf/nginx 修改server { &amp;hellip; &amp;hellip;} 为下面代码&lt;/p&gt;</description>
    </item>
    <item>
      <title>linux下的无盘工作站配置（centos）</title>
      <link>https://forzw.com/archives/399/</link>
      <pubDate>Tue, 29 Dec 2009 09:17:57 +0000</pubDate>
      <guid>https://forzw.com/archives/399/</guid>
      <description>&lt;p&gt;   需求：需要多个系统同运行同样的服务，如j2ee模块、memcached等，这些服务不与硬盘相关，只运行在内存中，并且多个系统同时运行，为了规避单点故障以及实现高效。&lt;/p&gt;
&lt;p&gt;   下面步骤是centos5.4系统的无盘服务端配置步骤，客户端只要选择从网络启动，即可在无干预情况下启动系统。&lt;/p&gt;
&lt;p&gt;   一，新建主要目录&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;&lt;code&gt;mkdir -p /diskless/x86_64/centos5.4/root mkdir /diskless/x86_64/centos5.4/snapshot&lt;/code&gt;&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;   二，拷贝预置模板到/diskless/x86_64/centos5.4/root目录&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;&lt;code&gt;rsync -auv -e ssh --delete --exclude=&#39;/proc/*&#39; --exclude=&#39;/sys/*&#39; --exclude=&#39;/tmp/*&#39;--exclude=&#39;/var/log/*&#39; root@10.0.70.72:/ /diskless/x86_64/centos5.4/root/&lt;/code&gt;&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;  三，配置所需tftp服务 &lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;&lt;code&gt;yum -y install tftp tftp-server yum -y install busybox vi /etc/xinetd/tftp diskable=no chkconfig --level 345 xinetd on chkconfig --level 345 tftp on service xinetd start&lt;/code&gt;&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;  四，配置dhcp服务&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;&lt;code&gt;yum -y install dhcp-server chkconfig --level 345 dhcpd on&lt;/code&gt;  vi /etc/dhcpd.conf allow booting; allow bootp; class &amp;ldquo;pxeclients&amp;rdquo; {    match if substring(option vendor-class-identifier, 0, 9) = &amp;ldquo;PXEClient&amp;rdquo;;    next-server &amp;lt;server-ip&amp;gt;;    filename &amp;ldquo;linux-install/pxelinux.0&amp;rdquo;; } service dhcpd start&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt; &lt;/p&gt;</description>
    </item>
    <item>
      <title>Ubuntu amd64 下安装 QQ for Linux</title>
      <link>https://forzw.com/archives/398/</link>
      <pubDate>Mon, 14 Dec 2009 19:07:44 +0000</pubDate>
      <guid>https://forzw.com/archives/398/</guid>
      <description>&lt;p&gt;从http://im.qq.com/qq/linux/下载 QQ for Linux deb 安装包：&lt;/p&gt;
&lt;p&gt;linuxqq_v1.0.2-beta1_i386.deb&lt;/p&gt;
&lt;p&gt;获取32位支持&lt;/p&gt;
&lt;p&gt;sudo apt-get install ia32-libs*&lt;/p&gt;
&lt;p&gt;安装&lt;/p&gt;
&lt;p&gt;sudo dpkg -i &amp;ndash;force-all linuxqq_v1.0.2-beta1_i386.deb&lt;/p&gt;</description>
    </item>
    <item>
      <title>Oracle 11g Software Installation on Linux—CentOS-5</title>
      <link>https://forzw.com/archives/395/</link>
      <pubDate>Mon, 07 Dec 2009 18:02:25 +0000</pubDate>
      <guid>https://forzw.com/archives/395/</guid>
      <description>&lt;p&gt;Introduction 　　This paper takes a look at installing oracle 11g (11.1) on Linux (CentOS-5).You can read about CentOS at &lt;a href=&#34;https://www.centos.org&#34;&gt;www.centos.org&lt;/a&gt; and be assured of its&amp;rsquo; Enterprise-class quality. This paper will use oracle&amp;rsquo;s Quick Installation Guide for Linux x86 as its&amp;rsquo; guide—noting where additional information may be obtained but getting oracle installed on Linux as fast as possible. We at thecheapdba.com have years of experience installing oracle—starting back with oracle 7. We will point out best practices so that you end up with a reliable database that provides exceptional performance. We will occasionally re-visit, edit, and post additions to this paper as we find further configuration best practices. 　　This paper will not cover the installation of CentOS-5 as that can be acquired through the CentOS website and additional Linux guides. We will however point out those alterations to the Linux environment that pertains to getting oracle installed. 　　Our goal is to provide you with the steps to properly install the oracle 11g software without having to read oracle&amp;rsquo;s installation guide from front to back cover. We will provide you the commands to execute (just cut-n-paste) and the desired outcome of those commands. If you get something other than what is expected it would be time for you to re-visit earlier steps in this process. So hold on, here we go. 　　It is assumed that the installer of oracle software has access and is running on an X Window System workstation. Please consult X Server documentation if you need help. We at thecheapdba.com typically will use cygwin ( &lt;a href=&#34;https://www.cygwin.com&#34;&gt;www.cygwin.com&lt;/a&gt; ) for all interfacing with our Linux distribution. It has an X Window System that works quite well—and as we always like is free. 　　Checking Hardware Requirements 　　Log into the CentOS-5 system as the root user. 　　For setting up the system to be used by oracle there are a few prerequisites that must be checked and possibly changed by the root user. Log in as the root user and this document will tell you when it is time to switch from the root user to someone else. 　　How much memory 　　command: grep -i memtotal /proc/meminfo 　　results: should be at least 1GB 　　How much swap 　　command: grep -i swaptotal /proc/meminfo 　　results: should be 1.5 the size of memtotal if memtotal &amp;lt; 2GB 　　should be equal to memtotal if memtotal is between 2GB and 8GB 　　should be .75 the size of memtotal if memtotal &amp;gt; 8GB 　　What processor type 　　command: grep &amp;ldquo;model name&amp;rdquo; /proc/cpuinfo 　　results: informational 　　How much available RAM and swap 　　command: free 　　results: informational 　　How much shared memory available 　　command: df -k /dev/shm 　　results: informational 　　purpose: The shared memory should be sized to be at least the greater of MEMORY_MAX_TARGET and MEMORY_TARGET for each oracle instance on the computer. 　　How much disk space in /tmp 　　command: df -k /tmp 　　results: should have at least 400MB available 　　How much disk space for oracle binaries 　　command: df -k 　　results: Depending on installation type you should have between 1.5GB and 3.5GB 　　Checking Software Requirements 　　What distribution and version of Linux is installed 　　command: cat /proc/version 　　results: Linux version 2.6.18-8.1.15.el5 (&lt;a href=&#34;mailto:mockbuild@builder6.centos.org&#34;&gt;mockbuild@builder6.centos.org&lt;/a&gt;) 　　(gcc version 4.1.1 20070105 (Red Hat 4.1.1-52)) 　　#1 SMP Mon Oct 22 08:32:04 EDT 2007 　　What version of the kernel is installed 　　command: uname -r 　　results: 2.6.18-8.1.15.el5 　　Are the following packages installed (assumes CentOS-5 and above distribution) 　　command:rpm -q binutils \ 　　compat-libstdc++ \ 　　elfutils-libelf \ 　　elfutils-libelf-devel \ 　　glibc \ 　　glibc-common \ 　　glibc-devel \ 　　glibc-headers \ 　　gcc \ 　　gcc-c++ \ 　　libaio-devel \ 　　libaio \ 　　libgcc \ 　　libstdc++ \ 　　libstdc++ \ 　　make \ 　　sysstat \ 　　unixODBC \ 　　unixODBC-devel 　　results: you will probably get quite a few packages that are not installed with a typical installation. You can investigate missing packages with the following command making sure you add/subtract from this list if necessary. 　　yum list available &amp;ldquo;compat*&amp;rdquo; \ 　　&amp;ldquo;elfutils*&amp;rdquo; \ 　　&amp;ldquo;glibc*&amp;rdquo; \ 　　&amp;ldquo;gcc*&amp;rdquo; \ 　　&amp;ldquo;libaio*&amp;rdquo; \ 　　&amp;ldquo;sysstat*&amp;rdquo; \ 　　&amp;ldquo;unixODBC*&amp;rdquo; 　　action : Our base installation left us needing to issue the following command to install missing packages. 　　yum -y install compat-libstdc++-296.i386 \ 　　compat-libstdc++-33.i386 \ 　　elfutils-libelf-devel.i386 \ 　　glibc-devel.i386 \ 　　glibc-headers.i386 \ 　　gcc.i386 \ 　　gcc-c++.i386 \ 　　libaio-devel.i386 \ 　　sysstat.i386 \ 　　unixODBC.i386 \ 　　unixODBC-devel.i386 　　Create oracle user and group 　　Create groups oinstall &amp;amp; dba 　　command: /usr/sbin/groupadd oinstall 　　/usr/sbin/groupadd dba 　　Create the oracle and change password 　　command: /usr/sbin/useradd -g oinstall -G dba -s /bin/bash oracle 　　/usr/bin/passwd oracle 　　Validate the nobody user exists 　　command: /usr/bin/id nobody 　　results: this user is almost always created on a base CentOS installation 　　action : if this user is not created use the following command to create 　　/usr/sbin/useradd nobody 　　Configuring kernel parameters 　　The following kernel parameters must be validated and possibly changed. Use the commands given below to view a particular kernel setting and then change if the setting is lower than the recommendation given in the following table. 　　You can make the changes by editing the /etc/sysctl.conf file and then rebooting the server. The following results are what we observed on our server and should not be expected on yours. 　　shmmni 　　4096 　　shmall 　　2097152 　　shmmax 　　2147483648 　　semmsl 　　250 　　semmns 　　32000 　　semopm 　　100 　　semmni 　　128 　　file-max 　　65536 　　ip_local_port_range 　　1024 - 65000 　　rmem_default 　　1048576 　　rmem_max 　　1048576 　　wmem_default 　　262144 　　wmem_max 　　262144 　　command: /sbin/sysctl -a | grep kernel.sem 　　results: kernel.sem = 250 32000 100 128 　　command: /sbin/sysctl -a | grep kernel.shm 　　results: kernel.shmmni = 4096 　　kernel.shmall = 268435456 　　kernel.shmmax = 4294967295 　　command: /sbin/sysctl -a | grep file-max 　　results: fs.file-max = 102440 　　command: /sbin/sysctl -a | grep ip_local_port_range 　　results: net.ipv4.ip_local_port_range = 32768 61000 　　command: /sbin/sysctl -a | grep rmem_default 　　results: net.core.rmem_default = 109568 　　command: /sbin/sysctl -a | grep rmem_max 　　results: net.core.rmem_max = 131071 　　command: /sbin/sysctl -a | grep wmem_default 　　results: net.core.wmem_default = 109568 　　command: /sbin/sysctl -a | grep wmem_max 　　results: net.core.wmem_max = 131071 　　sample /etc/sysctl.conf file. This is given as an example only and does not reflect the results obtained above by the /sbin/sysctl commands. Only add lines that are needed and do not change any values to be lower than the base installation might have assigned. 　　kernel.shmall = 2097152 　　kernel.shmmax = 2147483648 　　kernel.shmmni = 4096 　　kernel.sem = 250 32000 100 128 　　fs.file-max = 65536 　　net.ipv4.ip_local_port_range = 1024 65000 　　net.core.rmem_default = 4194304 　　net.core.rmem_max = 4194304 　　net.core.wmem_default = 262144 　　net.core.wmem_max = 262144 　　Setting shell limits for the oracle user 　　Add the following lines to /etc/security/limits.conf 　　oracle soft nproc 2047 　　oracle hard nproc 16384 　　oracle soft nofile 1024 　　oracle hard nofile 65536 　　Add the following lines to /etc/pam.d/login 　　session required /lib/security/pam_limits.so 　　session required pam_limits.so 　　Add the following lines to /etc/profile 　　if [ $USER = &amp;ldquo;oracle&amp;rdquo; ]; then 　　if [ $SHELL = &amp;ldquo;/bin/ksh&amp;rdquo; ]; then 　　ulimit -p 16384 　　ulimit -n 65536 　　else 　　ulimit -u 16384 -n 65536 　　fi 　　fi 　　Creating Directories to Install the oracle Software 　　Validate you have enough space on disk and choose a directory to install 　　command: df -k 　　results: pick a mount point that has enough space—we have chosen /opt for the our. 　　Create subdirectories and give permissions to the oracle user 　　The following directory used is common for oracle installations. Note that we are creating all directories under /opt and that there are no other applications using /opt/app and below. This is very important as we are changing permissions with the following commands. 　　command: mkdir -p /opt/app/oracle/product/11.1.0 　　chown -R oracle:oinstall /opt/app 　　chmod -R 775 /opt/app 　　Switch to the oracle user 　　Up to know we have been doing everything as the root user. It is now time to switch to the oracle user to actually install the oracle software. 　　command: su – oracle 　　Add the following line to $HOME/.bash_profile 　　umask 022 　　Execute oracle&amp;rsquo;s bash_profile to use new setting 　　command: . ./.bash_profile 　　Make sure the oracle user is using an X Windows System 　　It is assumed you know how to set up an X Windows System as stated earlier in the document. Please verify it is working by issuing the xterm command and validating an X Terminal comes up. You may close the X Terminal if you wish. 　　Set oracle environment for the installation 　　Issue the following commands to set/unset particular oracle environments in preparation for the installation. 　　command: export orACLE_BASE=/opt/app/oracle 　　export orACLE_SID=orcl 　　unset orACLE_HOME 　　unset TNS_ADMIN 　　Start oracle Installer 　　This paper assumes you have downloaded the oracle software from the net and have unzipped the files. We have unzipped our software into /opt and the following commands will take you through starting the oracle installer form that mount point. 　　command: cd /opt/database 　　./runInstaller 　　From this point, oracle will do a few minor checks on the operating system and then put up the oracle Installation screen. Our particular configuration did not throw any errors at this point but it should be noted, as it can be helpful, that sometimes the oracle installer will complain at this very early stage about various Linux system configurations. If this is the case you might be able to bypass them by adding an additional argument to the runInstaller command. Please only use this as a last resort to the normal installation path. 　　command: ./runInstaller -ignoreSysPrereqs 　　From this point on we will walk through each of the prompts one at a time to give you a simple feel for a full installation of the oracle software. 　　Select installation method 　　This screen is very busy to say the least. We are not going to create any databases at this point as it is not required nor is it suggested to do at this point. We like to create databases separately through the Database Creation Assistant (DBCA) and not confuse the software installation process. 　　1. Choose basic installation 　　1. verify oracle Base of &amp;lsquo;/opt/app/oracle&amp;rsquo; 　　2. verify oracle Home of &amp;lsquo;/opt/app/oracle/product/11.1.0/db_1&amp;rsquo; 　　3. verify installation type of &amp;lsquo;Enterprise Edition&amp;rsquo; 　　4. verify dba group of &amp;lsquo;dba&amp;rsquo; 　　2. Un-check “Create Starter Database” 　　3. Un-check “Advanced Installation” 　　4. Click 　　Specify Inventory directory and credentials 　　1. verify path of inventory directory of &amp;lsquo;/opt/app/oraInventory&amp;rsquo; 　　2. verify group name for install of &amp;lsquo;oinstall&amp;rsquo; 　　3. Click 　　Product-Specific Prerequisite Checks 　　This screen, the installer will verify the system environment and report on any issues it may find. If all goes well you will get the status of &amp;lsquo;Succeeded&amp;rsquo; for every check. Scroll through and make sure nothing has failed or look at the status box at the bottom of the screen and verify you get the following: 　　&amp;lsquo;Check complete. The overall result of this check is: Passed&amp;rsquo; 　　1. verify all statuses 　　2. Click 　　Summary 　　This screen give a summary of the installation you are about to perform. It can be interesting to click and expand the products being installed to give you an idea of the what product and version is going to be installed. 　　1. validate &amp;lsquo;Global Settings&amp;rsquo; for directories 　　2. validate &amp;lsquo;Space Requirements&amp;rsquo; 　　3. Click 　　Install 　　This screen gives a status of what is being installed. If all system settings have been properly set and all packages been installed properly then this should proceed without error. The status bar gives some indication of what is being installed at a particular point and the amount of work to be performed. But as all status bars you never really know how long in the process it is. 　　1. Note the time it takes for specific products. If you notice one hanging or taking a long amount of time (greater than 10 minutes) you could have a condition that requires a pre-installation patch. Don&amp;rsquo;t stop the installer yet but instead start looking for a bug / patch for the oracle 11g installation process and the actual product being installed. 　　2. Execute Configuration scripts 　　1. open up a different terminal window 　　2. login as the root user 　　3. run /opt/app/oraInventory/orainstRoot.sh 　　4. run /opt/app/oracle/product/11.1.0/db_1/root.sh 　　1. accept default of /usr/local/bin 　　5. Click 　　3. Click 　　4. Click 　　Cleanup 　　1. If you downloaded the software from the net you can now remove .zip file and the complete directory structure you unzipped it to. That particular command is not given here as it can be quite disastrous if executed from the wrong directory. 　　2. Add the following lines to oracle&amp;rsquo;s $HOME/.bash_profile file. This will allow you to execute various oracle binaries to create databases, configure network settings, and generally manage the oracle database environment. 　　export orACLE_HOME=/opt/app/oracle/product/11.1.0/db_1 　　export PATH=$ORACLE_HOME/bin:$PATH 　　Installation is complete 　　Congratulations on a successful installation of the oracle software. This paper hopefully was also successful in its attempt to guide you down a more simplistic path—giving you the commands to execute and working past the minor hurdles encountered during installation. Obviously this paper can not predict all the issues that you may encounter but if you have a relatively current system with ample memory and disk space there is no reason not to believe your installation wouldn&amp;rsquo;t run smoothly.&lt;/p&gt;</description>
    </item>
    <item>
      <title>ubuntu 9.10 安装ibus</title>
      <link>https://forzw.com/archives/397/</link>
      <pubDate>Sat, 05 Dec 2009 18:56:08 +0000</pubDate>
      <guid>https://forzw.com/archives/397/</guid>
      <description>&lt;p&gt;首先清理所有scim相关包和安装中文字体：&lt;/p&gt;
&lt;p&gt;sudo aptitude purge ~nscim sudo aptitude install language-support-fonts-zh&lt;/p&gt;
&lt;p&gt;然后检查源的配置：&lt;/p&gt;
&lt;p&gt;sudo gedit /etc/apt/sources.list&lt;/p&gt;
&lt;p&gt;检查一下有没有这行：&lt;/p&gt;
&lt;p&gt;deb &lt;a href=&#34;http://archive.ubuntu.com.cn/ubuntu-cn/&#34;&gt;http://archive.ubuntu.com.cn/ubuntu-cn/&lt;/a&gt; intrepid main restricted universe multiverse&lt;/p&gt;
&lt;p&gt;如果没有就添加进去，然后保存退出。并更新软件源列表［sudo aptitude update］&lt;/p&gt;
&lt;p&gt;安装ibus拼音输入法：&lt;/p&gt;
&lt;p&gt;sudo aptitude install ibus ibus-pinyin&lt;/p&gt;
&lt;p&gt;编辑配置文件：&lt;/p&gt;
&lt;p&gt;gedit ~/.profile&lt;/p&gt;
&lt;p&gt;在文件末尾添加：&lt;/p&gt;
&lt;p&gt;# Start Input Bus export XMODIFIERS=&amp;quot;@im=ibus&amp;quot; export GTK_IM_MODULE=&amp;ldquo;ibus&amp;rdquo; export QT_IM_MODULE=&amp;ldquo;ibus&amp;rdquo; # qt3 is not supported currently ibus &amp;amp;&lt;/p&gt;
&lt;p&gt;保存退出后，重新启动或者退出重新登录一下&lt;/p&gt;</description>
    </item>
    <item>
      <title>ORA-27101 Shared memory realm does not exist 之解決</title>
      <link>https://forzw.com/archives/396/</link>
      <pubDate>Fri, 04 Dec 2009 18:49:23 +0000</pubDate>
      <guid>https://forzw.com/archives/396/</guid>
      <description>&lt;p&gt;在试图登录pl/sql时,输入用户名（system/pwd)后，Oracle报告下列错误： ERROR: orA-27101 Shared memory realm does not exist orA-01034 orACLE not available&lt;/p&gt;
&lt;p&gt;或者在em登录的时候报告下列错误： 错误: NMO 未 setuid-root (只适用于 Unix)&lt;/p&gt;
&lt;p&gt;查阅了相关 orA-27101 Shared memory realm does not exist orA-01034 orACLE not available 的说明，解释为ORACLE_HOME或者ORACLE_SID设置不正确。 但检查bash_profile以后没有发现错误; 錯誤點，沒有開啟oracle服務； 解決辦法，直接開啟oracle相關數據庫的服務； 或按照下面的步驟操作: lsnrctl start sqlplus &amp;lsquo;/as sysdba&amp;rsquo; sql&amp;gt; startup emctl start dbconsole isqlplusctl start&lt;/p&gt;</description>
    </item>
    <item>
      <title>oracle 10g 乱码解决</title>
      <link>https://forzw.com/archives/393/</link>
      <pubDate>Tue, 01 Dec 2009 17:57:57 +0000</pubDate>
      <guid>https://forzw.com/archives/393/</guid>
      <description>&lt;p&gt;操作系统：Red Hat Enterprise Linux AS release 4 语言安装的为英文，安装完数据库后，通过企业管理器登陆，点击的按钮显示乱码。&lt;/p&gt;
&lt;p&gt;1，重新安装中文支持 [root@tonykorn97 ~]# rpm -ivh ttfonts-zh_CN-2.14-6.noarch.rpm warning: ttfonts-zh_CN-2.14-6.noarch.rpm: V3 DSA signature: NOKEY, key ID db42a60e Preparing&amp;hellip; ########################################### [100%] 1:ttfonts-zh_CN ########################################### [100%] [root@tonykorn97 ~]# 2，安装如下步骤操作： 企业管理器已经关闭了 [root@tonykorn97 ~]# su - oracle [oracle@tonykorn97 ~]$ cd $ORACLE_HOME/jdk/jre/lib [oracle@tonykorn97 lib]$ ls -al font*zh_CN* -rwxr-xr-x 1 oracle oinstall 6854 Apr 20 2005 font.properties.zh_CN.Redhat -rwxr-xr-x 1 oracle oinstall 7410 Apr 20 2005 font.properties.zh_CN.Redhat2.1 -rwxr-xr-x 1 oracle oinstall 6845 Apr 20 2005 font.properties.zh_CN.Sun -rwxr-xr-x 1 oracle oinstall 7137 Apr 20 2005 font.properties.zh_CN_UTF8.Sun [oracle@tonykorn97 lib]$ cp font.properties.zh_CN.Redhat font.properties [oracle@tonykorn97 lib]$ cd $ORACLE_HOME/jre/1.4.2/lib/ [oracle@tonykorn97 lib]$ ls -al font*.zh_CN* -rwxr-xr-x 1 oracle oinstall 6854 Apr 6 2005 font.properties.zh_CN.Redhat -rwxr-xr-x 1 oracle oinstall 7410 Apr 6 2005 font.properties.zh_CN.Redhat2.1 -rwxr-xr-x 1 oracle oinstall 6845 Apr 6 2005 font.properties.zh_CN.Sun -rwxr-xr-x 1 oracle oinstall 7137 Apr 6 2005 font.properties.zh_CN_UTF8.Sun [oracle@tonykorn97 lib]$ cp font.properties.zh_CN.Redhat font.properties [oracle@tonykorn97 lib]$ cd $ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications/em/em/cabo/images/cache/zhs [oracle@tonykorn97 zhs]$ rm -rf *.gif [oracle@tonykorn97 zhs]$ emctl start dbconsole TZ set to PRC oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 Copyright (c) 1996, 2005 oracle Corporation. All rights reserved. http://tonykorn97:1158/em/console/aboutApplication Starting oracle Enterprise Manager 10g Database Control &amp;hellip;&amp;hellip;.. started. &amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash; Logs are generated in directory /oracle/app/oracle/product/10.2.0/Database/tonykorn97_szrrlcw/sysman/log [oracle@tonykorn97 zhs]$ 参考： &lt;a href=&#34;http://www.eygle.com/archives/2006/03/oracle10g&#34;&gt;http://www.eygle.com/archives/2006/03/oracle10g&lt;/a&gt;_em_font_change.html 我当时操作的时候如果是先覆盖font.properties文件，然后关闭em,再启动em。好像不行。不知道是不是当时操作的问题。 当时先安装了中文字体，然后发现了eygle的文章，最后发现应该是不需要安装中文字体的。 后来发现如果不安装中文字体的时候，显示还是不正常，重新安装中文字体后重新操作正常。应该是需要安装中文字体的。&lt;/p&gt;</description>
    </item>
    <item>
      <title>linux/centos cacti备份及恢复shell</title>
      <link>https://forzw.com/archives/391/</link>
      <pubDate>Mon, 23 Nov 2009 08:49:57 +0000</pubDate>
      <guid>https://forzw.com/archives/391/</guid>
      <description>&lt;p&gt;备份及恢复Cacti (1)cacti的文件目录的备份(rra目录除外) (2)mysql备份 mysqldump -p cacti &amp;gt;/tmp/cacti.sql (3)备份rra dumprrd.sh&lt;/p&gt;
&lt;p&gt;#!/bin/sh rrddump=&amp;quot;/usr/local/bin/rrdtool dump&amp;quot; xmldir=&amp;quot;/tmp/mysqlbackup/rraxml&amp;quot; xmlbackup=&amp;quot;/tmp/mysqlbackup/rrabak&amp;quot; mysqlbackupDIR=&amp;quot;/tmp/mysqlbackup&amp;quot; rrdpath=&amp;quot;/usr/local/share/cacti/rra/&amp;quot; DATE=`date +&amp;quot;%y-%m-%d&amp;quot;` if [ ! -e {xmldir} fi if [ ! -e {xmlbackup} fi #create rra =&amp;gt; xml for file in `find /usr/local/share/cacti/rra/ -mtime -2 | awk -F\/ ‘{print $NF}̵7;` do {rrdpath}{xmldir}/${file}.xml done if [ `ls /tmp/mysqlbackup/rraxml/|wc -l` -ge 2 ];then #tar backup cd ${mysqlbackupDIR} tar czvf {DATE}.tar.gz rraxml &amp;gt;/dev/null 2&amp;gt;&amp;amp;1 mv {DATE}.tar.gz ${xmlbackup} #delete file&amp;amp;dir if [ $? -eq 0 ];then rm -fdr {xmldir} /usr/bin/find ${mysqlbackupDIR}/rrabak -type f -ctime +2 | /usr/bin/xargs /bin/rm &amp;gt;/dev/null 2&amp;gt;&amp;amp;1 echo &amp;ldquo;Rra Backup is ok!&amp;rdquo; fi else echo &amp;ldquo;Rra Backup is fail!&amp;rdquo; fi&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
