为什么我们总是比别人钱少


>一条猎狗将兔子赶出了窝,一直追赶他,追了很久仍没有捉到。
>牧羊看到此种情景,讥笑猎狗说"你们两个之间小的反而跑得快得多。"
>猎狗回答说:"你不知道我们两个的跑是完全不同的!我仅仅为了一顿饭而跑,他却是
>为了性命而跑呀!"
>………………………目标…. ……………………….
>
>二
>这话被猎人听到了,猎人想:猎狗说的对啊,那我要想得到更多的猎物,得想个好法子.
>于是,猎人又买来几条猎狗,凡是能够在打猎中捉到兔子的,就可以得到几根骨头,捉不到
>的就没有饭吃.这一招果然有用,猎狗们纷纷去努力追兔子,因为谁都不愿意看着别人有
>骨头吃,自已没的吃.就这样过了一段时间,问题又出现了.大兔子非常难捉到,小兔子好
>捉.但捉到大兔子得到的奖赏和捉到小兔子得到的骨头差不多,猎狗们善于观察,发现了
>这个窍门,专门去捉小兔子.慢慢的,大家都发现了这个窍门.猎人对猎狗说:最近你们捉
>的兔子越来越小了,为什么?猎狗们说:反正没有什么大的区别,为什么费那么大的劲去捉
>那些大的呢?
>…………………………..动力…………………….
>
>三
>猎人经过思考后,决定不将分得骨头的数量与是否捉到兔子挂钩,而是采用每过一段时
>间,就统计一次猎狗捉到兔子的总重量.按照重量来评价猎狗,决定一段时间内的待遇.
>于是猎狗们捉到兔子的数量和重量都增加了.猎人很开心.
>但是过了一段时间,猎人发现,猎狗们捉兔子的数量又少了,而且越有经验的猎狗,捉兔子
>的数量下降的就越利害.于是猎人又去问猎狗.
>猎狗说"我们把最好的时间都奉献给了您,主人,但是我们随着时间的推移会老,当我们捉
>不到兔子的时候,您还会给我们骨头吃吗?"
>……………………….长期的骨头……………………
>
>四
>猎人做了论功行赏的决定.分析与汇总了所有猎狗捉到兔子的数量与重量,规定如果捉到
>的兔子超过了一定的数量后,即使捉不到兔子,每顿饭也可以得到一定数量的骨头. 猎狗
>们都很高兴,大家都努力去达到猎人规定的数量.一段时间过后,终于有一些猎狗达到了
>猎人规定的数量.这时,其中有一只猎狗说:我们这么努力,只得到几根骨头,而我们捉的
>猎物远远超过了这几根骨头.我们为什么不能给自己捉兔子呢?"于是,有些猎狗离开了猎
>人,自己捉兔子去了.
>………………………..骨头与肉兼而有之………..
>
>五
>猎人意识到猎狗正在流失,并且那些流失的猎狗像野狗一般和自己的猎狗抢兔子。
>情况变得越来越糟,猎人不得已引诱了一条野狗,问他到底野狗比猎狗强在那里。
>野狗说:“猎狗吃的是骨头,吐出来的是肉啊!”,接着又道:“也不是所有的野狗都
>顿顿有肉吃,大部分最后骨头都没的舔!不然也不至于被你诱惑。” 于是猎人进行了
>改革,使得每条猎狗除基本骨头外,可获得其所猎兔肉总量的n,而且随着服务时间加
>长,贡献变大,该比例还可递增,并有权分享猎人总兔肉的m。就这样,猎狗们与猎人
>一起努力,将野狗们逼得叫苦连天,纷纷强烈要求重归猎狗队伍。
>
>
>故事还在继续…………….
>
>——————–只有永远的利益,没有永远的朋友————–
>
>日子一天一天地过去,冬天到了,兔子越来越少,猎人们的收成也一天不如一天。而那
>些服务时间长的老猎狗们老得不能捉到兔子,但仍然在无忧无虑地享受着那些他们自以
>为是应得的大份食物。终于有一天猎人再也不能忍受,把他们扫地出门,因为猎人更需
>要身强力壮的猎狗。。。。。
>
>——————— Birth of MicroBone Co. ————–
>
>被扫地出门的老猎狗们得了一笔不菲的赔偿金,于是他们成立了MicroBone公司。他们
>采用连锁加盟的方式招募野狗,向野狗们传授猎兔的技巧,他们从猎得的兔子中抽取一
>部分作为管理费。当赔偿金几乎全部用于广告后,他们终于有了足够多的野狗加盟。公
>司开始赢利。一年后,他们收购了猎人的家当…
>
>——Development of MicroBone Co. ———————–
>
>MicroBone公司许诺给加盟的野狗能得到公司n的股份。这实在是太有诱惑力了。这些
>自认为是怀才不遇的野狗们都以为找到了知音:终于做公司的主人了,不用再忍受猎人
>们呼来唤去的不快,不用再为捉到足够多的兔子而累死累活,也不用眼巴巴地乞求猎人
>多给两跟骨头而扮得楚楚可怜。这一切对这些野狗来说,这比多吃两根骨头更加受用。
>于是野狗们拖家带口地加入了MicroBone,一些在猎人门下的年轻猎口也开始蠢蠢欲
>动,甚至很多自以为聪明实际愚蠢的猎人也想加入。好多同类型的公司象雨后春笋般地
>成立了,BoneEase, Bone.com, ChinaBone….一时间,森林里热闹起来。(to be
>continued…)

用div+css制作纯细线表格

<html>
<head>
<style type="text/css">
<!–
.rows {
display:block border-bottom:#cc0000 0px solid;
width:800px;
background-color: eeeeee;
display: block;
border: thin groove #FF9900;
}
.rows ul {
list-style:none; display:block; margin:0px;
}
.rows li {
width:160px;
}
.leftli {
float:left; border:#CC0000 1px solid; border-right:0px; border-bottom:0px; margin-right:-2px; padding:2px 10px 2px 10px;
}
.rightli {
border:#CC0000 1px solid; border-bottom:0px; padding:2px 10px 2px 10px;
}
.b-leftli {
float:left; border:#CC0000 1px solid; border-right:0px; margin-right:-2px; padding:2px 10px 2px 10px;
}
.b-rightli {
border:#CC0000 1px solid; padding:2px 10px 2px 10px;
}
–>
</style>

<title>测试div写表格</title></head>
<body>

<div class="rows">
<ul>
<li class="leftli">我是中国人</li>
<li class="leftli">我是中国人</li>
<li class="leftli">我是中国人</li>
<li class="leftli">我是中国人</li>
<li class="rightli">我是中国人</li>
</ul>
<ul>
<li class="leftli">abc</li>
<li class="leftli">abc</li>
<li class="leftli">abc</li>
<li class="leftli">abc</li>
<li class="rightli">def</li>
</ul>
<ul>
<li class="leftli">ABC</li>
<li class="leftli">ABC</li>
<li class="leftli">ABC</li>
<li class="leftli">ABC</li>
<li class="rightli">DEF</li>
</ul>
<ul>
<li class="leftli">123</li>
<li class="leftli">123</li>
<li class="leftli">123</li>
<li class="leftli">123</li>
<li class="rightli">456</li>
</ul>
<ul>
<li class="leftli">abc</li>
<li class="leftli">abc</li>
<li class="leftli">abc</li>
<li class="leftli">abc</li>
<li class="rightli">def</li>
</ul>
<ul>
<li class="leftli">ABC</li>
<li class="leftli">ABC</li>
<li class="leftli">ABC</li>
<li class="leftli">ABC</li>
<li class="rightli">DEF</li>
</ul>
<ul>
<li class="leftli">123</li>
<li class="leftli">123</li>
<li class="leftli">123</li>
<li class="leftli">123</li>
<li class="rightli">456</li>
</ul>
<ul>
<li class="leftli">abc</li>
<li class="leftli">abc</li>
<li class="leftli">abc</li>
<li class="leftli">abc</li>
<li class="rightli">def</li>
</ul>
<ul>
<li class="b-leftli">ABC</li>
<li class="b-leftli">ABC</li>
<li class="b-leftli">ABC</li>
<li class="b-leftli">ABC</li>
<li class="b-rightli">DEF</li>
</ul>
</div>
</body>
</html>

my december

腊月11的自己的生日,今年几乎忘记,
送给自己这首歌……
用心听,看你会不会流泪……

《my december》相关链接

My December-linkinpark

this is my december
this is my time of the year
this is my december
this is all so clear
this is my december
this is my snow covered home
this is my december
this is me alone
and i
just wish that i didn't feel
like there was something i missed
and i
take back all the things i said
to make you feel like that
and i
just wish that i didn't feel
like there was something i missed
and i
take back all the things that i said to you
and i'd give it all away
just to have somewhere to go to
give it all away
to have someome to come home to
this is my december
these are my snow covered dreams
this is me pretending
this is all i need
and i
just wish that i didn't feel
like there was something i missed
and i
take back all the things i said
to make you feel like that
and i
just wish that i didn't feel
like there was something i missed
and i
take back all the things that i said to you
and i'd give it all away
just to have somewhere to go to
give it all away
to have someone to come home to
this is my december
this is my time of the year
this is my december
this is all so clear
give it all away
just to have somewhere to go to
give it all away
to have someone to come home to
give it all away
just to have somewhere to go to
give it all away
to have someone to come home to

Zeus+php+Zend for Linux安装指南

Zeus+php+Zend Optimizer for Linux安装指南

本文是Crossday第一篇unix作文,基于linux而写出。zeus是一个著名的web服务器软件,其效能远在apache1/2之上,是整台服务器用户跑论坛的首选,对内存小于1G而流量非常大的用户,换用zeus会比apache多获得一倍的负载能力。
本文提供方法在redhat linux 7.3及以上各版本,PHP 4.3.0及以上版本,Zend Optimizer 2.1.0验证通过,所配置参数为适应每15分钟在线1000人以上的,使用Discuz! 2.0/3.0的中大型论坛所优化

进入一个目录 如
cd /usr/local/src

找一个zeus 4.2 r3 for linux的破解版本下载
wget http://download.discuz.net/zeus_linux.tgz

tar xvzf zeus_linux.tgz
cd Zeus.Web.Server.v4.2r3.Linux.x86/
tar xvzf Zeus_42r3_Linux-glibc2.1.tgz
cd Zeus_42r3_Linux-glibc2.1/

开始安装
./zinstall

按CTRL+C 打入accept

Where should the product be installed? [/usr/local/zeus]: 回车

Installation options:

1. Full install of both admin server & web server
2. Stand-alone install of admin server
3. Clustered install of web server
H. Help

Choose installation option [1]: 回车

Enter the key filename, or leave blank for unlicensed mode: /usr/local/src/Zeus.Web.Server.v4.2r3.Linux.x86/license.key (输入密匙位置)

Please choose a password for the admin server: ****** (输入管理员密码)
Re-enter: ****** (重新输入密码)

Would you like Zeus to start at boot time? Y/N [Y]: (回车)

以上是安装过程 很容易的就装好了 如果有apache在跑 先把他停掉 避免80端口冲突
/usr/local/apache/bin/apachectl stop

若安装中提示libdb.so.2不存在 先进入压缩包的libdb.so.2目录中
rpm -ivh db1-1.85-8.i386.rpm

安装php
cd /usr/local/src
从小日本网站下载php
wget http://cn2.php.net/get/php-4.3.4.tar.gz/from/jp2.php.net/mirror
tar xvzf php-4.3.4.tar.gz
cd php-4.3.4/
./configure –prefix=/usr/local/php –enable-fastcgi –enable-force-cgi-redirect –with-config-file-path=/etc –with-zlib –with-mysql –with-xml
make
make install
cp php.ini-dist /etc/php.ini

安装Zend Optimizer
cd /usr/local/src
wget http://download.discuz.net/ZendOptimizer-2%5B1%5D.1.0b-Linux_glibc21-i386.tar.gz
tar xvzf ZendOptimizer-2%5B1%5D.1.0b-Linux_glibc21-i386.tar.gz
cd ZendOptimizer-2.1.0b-Linux_glibc21-i386/
./install.sh
一阵回车 问Confirm the location of your php.ini file的时候打入/etc
问Are you using Apache web server?的时候选No

设置Zeus
访问 http://your.com:9090 (你的域名地址或IP地址)
用户名 admin 密码:刚才设定的密码

进入Zeus管理控制台,点Create a Virtual Server 把相关的六个选项填好 不多说
提交后出现刚才加入的virtual server,点FastCGI

Enabling Support for FastCGI Programs 选 Enabled
Restricting FastCGI locations 选 Enable FastCGI programs to be located anywhere
Configuring Directories for FastCGI Local Responders 不用写他 因为我们用remote方式连接fastcgi

Configuring FastCGI Remote Responders 中填入以下配置
Directory name : /usr/local/php/bin/php
Location: Machine name: localhost
Port: 8002
Additional methods supported?:None

其他都不用管,点Apply changes

点左边Url Handling下面的Handlers
File Extension : php
Specify the path and filename of the handler, relative to the document root : /usr/local/php/bin/php
点Apply changes

点左边Url Handling下面的Directory Requests
Index Files中加入一个 index.php 和一分隔逗号
Directory Listing选Disabled
点Apply changes

再点上面的 This configuration has been modified. Click here for details or to make it take effect.
出来的页面点Commit

配置php-fastcgi
cd /usr/local/zeus/rc.d
建立一个S05php的文件 内容为

#!/bin/sh

# Script to start and stop the persistent PHP runner for FastCGI.
# Please check paths before use.

# FastCGI PHP binary
FPHPBIN=/usr/local/php/bin/php

# Location to place semaphore
SEMFILE=/tmp/php.pid
PHP_FCGI_CHILDREN=200
PHP_FCGI_MAX_REQUESTS=1000
export PHP_FCGI_CHILDREN
export PHP_FCGI_MAX_REQUESTS

# This is Linux – use /proc to increase the local (ephemeral) port range
#echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_range

if [ -z "$ZEUSHOME" ]
then
cd `dirname $0`/..
ZEUSHOME=`pwd`
export ZEUSHOME
fi

case “$1″ in
’start’)

if [ -e $SEMFILE ]
then
echo FastCGI PHP error: already running.Restart FastCGI PHP now
kill `cat $SEMFILE`
sleep 5
fi

if [ ! -x $FPHPBIN ]
then
echo FastCGI PHP error: please check that $FPHPBIN is executable and exists.
exit 1
fi

echo Starting FastCGI PHP.
$ZEUSHOME/web/bin/fcgirunner –user=99 –group=99 –pidfile=$SEMFILE 8002 $FPHPBIN
;;

’stop’)
if [ -e $SEMFILE ]
then
echo Stopping FastCGI PHP.
kill `cat $SEMFILE`
rm $SEMFILE
exit 0
fi
;;
‘restart’)
if [ -e $SEMFILE ]
then
echo Stopping FastCGI PHP.
kill `cat $SEMFILE`
sleep 5
fi
echo Starting FastCGI PHP.
$ZEUSHOME/web/bin/fcgirunner –user=99 –group=99 –pidfile=$SEMFILE 8002 $FPHPBIN
;;
*)
echo “usage: $0 {start|stop|restart}”
;;

esac
exit 1

注意–user=65534 –group=65534 为php进程运行的用户和组,一般设置为nobody用户和组FreeBSD是65534/65534,Linux是99/99

如不会建文件 可看下面范例
vi S05php
(打一个小写的i)
(把上面的内容复制到剪贴板 然后按SHIFT+INSERT粘贴过去)
(按ESC)
(输入 :wq 然后回车)

改写属性使其可执行
chmod 755 S05php

回到Zeus的9090端口管理界面 把刚才设置的虚拟主机Start

启动Zeus的命令为 /usr/local/zeus/start-zeus
停止Zeus的命令为 /usr/local/zeus/stop-zeus
重启Zeus的命令为 /usr/local/zeus/restart-zeus

编辑/etc/rc.local
加入一行
/usr/local/zeus/start-zeus
使得Zeus在开机时自动运行

如果现在无法访问web,多半是因为没有把apache停掉造成的,注意要将启动时候的apache自启动给去掉 否则zeus无法绑定到80端口进而无法访问 如没有上述问题 安装后仍然无法访问 可能为web服务器没有正确安装 例如第一次安装后中断退出 第二次又以升级方式安装 等等 这样的情况建议先把zeus停掉 然后将其目录rm -fr删除 重新安装一次即可正常 个人以为这是zeus安装脚本设计的不合理所致

Linux的配置与优化

Linux作为一个免费的类似UNIX的操作系统,正日益受到人们的重视。本人作为一名Linux爱好者,出于学习,比较了各种不同的Linux发行套件,安装过各种Linux的发行套件,但是每一次安装完成,大量的配置与优化工作花费笔者许多时间,并且非常容易遗漏一些细节。本文以安装与使用RedHat 6.1为例,参考了/usr/doc/HOWTO/Config-HOWTO文档,结合自己的工作经验,谈一些自己的做法。以下的做法基本上适合各种liunx发行套件。

一、关于硬盘分区
关于安装Linux如何建立硬盘分区、交换分区等问题,已经超出本文范围,但是我的经验是安装Linux时一定要建立单独的分区,用于存储用户的私人数据,同时可以用于备份系统的配置文件(如像域名服务器,Samba的配置文件等),便于以后配置。

二、编辑/etc/inittab文件
大部分Linux的发行套件都建立六个虚拟控制台,实际上三个已经足够,并且可以节省可贵的内存空间。编辑/etc/inittab文件,在下面三行的前面加上#。
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6
然后执行init q,使系统重新读取/etc/inittab文件,关闭tty4、tty5、tty6虚拟控制台。如果不考虑系统的安全,你可以利用第四个虚拟控制台来查看各种系统信息,编辑/etc/syslog.conf文件,在最后一行加入:
*.* /dev/tty4
最后再执行killall -HUP syslog。

三、建立或者编辑/etc/inputrc、/etc/profile、/etc/bashrc文件
虽然最近几年个人计算机的潮流已经从命令行方式转向图形方式,采用鼠标操作,但是shell在Linux中依然有很强的生命力。shell有好几种,主要有bash、ksh、tcsh、zsh、ash, 用得最多的是bash。只要编辑/etc/inputrc文件,设置INPUTRC的环境变量,利用Tab键的命令补全功能,就可以实现类似于MSDOS的DOSKEY的功能。这样对文件与目录的各种操作,也一样方便与快捷。(附/etc/inputrc文件)
__________________________________________________________________
set bell-style none # don’t beep
set meta-flag on # allow 8-bit input
set convert-meta off # don’t strip 8-bit characters
set output-meta on # display 8-bit characters correctly
set horizontal-scroll-mode On # scroll long command lines
set show-all-if-ambiguous On # after TAB is pressed

“\e[1~": beginning-of-line # home
"\e[2~": insert-last-argument # insert
"\e[3~": delete-char # delete
"\e[4~": end-of-line # end
"\e[5~": backward-kill-word # page up
"\e[6~": kill-word # page down

# define F7 F8 like msdos doskey
"\e[18~": history-search-forward # F7
"\e[19~": history-search-backward # F8
__________________________________________________________________

编辑/etc/profile文件,在其尾部插入下面内容:
_________________________________________________
# add by zws
# customize less
#LESS='-M-Q-r'
PS1="[\u@\h \w]\\$ ”
INPUTRC=/etc/inputrc
LESS=’-M-r’ # -r 为了ls | less 支持彩色。
LESSEDIT=”%E ?lt+%lt. %f”
LESSOPEN=”| lesspipe.sh %s”
LESSCHARSET=latin1
PAGER=less
export LESS LESSEDIT LESSOPEN LESSCHARSET INPUTRC
_________________________________________________

建立/usr/bin/lesspipe.sh文件,内容如下:
__________________________________________________________________________
#!/bin/sh
# This is a preprocessor for ‘less’. It is used when this environment
# variable is set: LESSOPEN=”|lesspipe.sh %s”
lesspipe() {
case “$1″ in
*.tar.bz2) bzip2 -cd $1 $1 2>/dev/null | tar tvvf – ;;
*.tar) tar tf $1 2>/dev/null ;; # View contents of .tar and .tgz files
*.tgz|*.tar.gz|*.tar.Z|*.tar.z) tar ztf $1 2>/dev/null ;;
*.Z|*.z|*.gz) gzip -dc $1 2>/dev/null ;; # View compressed files correctly
*.zip) unzip -l $1 2>/dev/null ;; # View archives
*.arj) unarj l $1 2>/dev/null ;;
*.rpm) rpm -qpil $1 2>/dev/null ;;
*.cpio) cpio –list -F $1 2>/dev/null ;;
*.bz2) bzip2 -dc $1 2>/dev/null ;; # View compressed files correctly
*.1|*.2|*.3|*.4|*.5|*.6|*.7|*.8|*.9|*.n|*.l|*.man) FILE=`file -L $1`
FILE=`echo $FILE | cut -d ‘ ‘ -f 2`
if [ "$FILE" = "troff" ]; then
groff -s -p -t -e -Tascii -mandoc $1
fi ;;
*) file $1 | grep text > /dev/null ;
if [ $? = 1 ] ; then # it’s not some kind of text
strings $1
fi ;;
esac
}
lesspipe $1
_________________________________________________________________这样就可以使用less查看以上文件格式的信息与内容。
注意要利用chmod 755 /usr/bin/lesspipe.sh命令将此文件设置为可执行!
/etc/bashrc文件的例子:
____________________________________________
# /etc/bashrc

# System wide functions and aliases
# Environment stuff goes in /etc/profile

# For some unknown reason bash refuses to inherit
# PS1 in some circumstances that I can’t figure out.
# Putting PS1 here ensures that it gets loaded every time.
# PS1=”[\u@\h \w]\\$ ”

eval `dircolors -b`
alias ls=’ls –color=yes -F -N’ # ls 支持彩色
alias l=’ls –color=yes -l -F -N’ # l
alias cp=’cp -i’
alias mv=’mv -i’
alias rm=’rm -i’
alias df=’df -h’
alias ln=’ln -i’
lrpm() # list information on an .rpm file
{
if [ $# != 0 ]; then rpm -qilf `which $1` | less; fi
}
lsrpm() # list information on an .rpm file
{
if [ $# != 0 ]; then rpm -qif `which $1` | less; fi
}
set -o noclobber # 避免覆盖与重写文件
____________________________________________

四、编辑/etc/rc.local文件
如果需要定制自己的登录信息,注意要修改/etc/rc.d/rc.local文件,因为每次执行/etc/rc.d/rc.local文件,都需要修改/etc/issue与/etc/issue.net文件,可以注解掉这些命令,编辑定制自己的/etc/issue文件,加快Linux引导过程,并且加入以下内容:
echo “base=0xd8000000 size=0×800000 type=write-combining” >> /proc/mtrr
# Enable NumLock
for tty in /dev/tty[1-3]; do
setleds -D +num < $tty
done
说明:关于第一行命令请看/usr/src/linux/Documentation/mtrr.txt文件。

五、定制vim的环境
在Linux环境中,有许多编辑器,主要有emacs、vim、joe等,对于从没有使用过UNIX或者Linux的人,我的建议是最好找几本有关的参考书,先了解这些编辑器的使用方法,这样安装好Linux后,在编辑与查看一些配置文件时,不至于茫然不知所措。特别是vi,一开始难以掌握,最好开始能够得到高手的指点,一旦上手,简直就像驾驶一辆高速奔驰的赛车,初学者可以到ftp://ftp.cs.pdx.edu/pub/elvis或者http://www.vim.org下载相应的版本,它提供支持MSDOS、Windows 98等操作系统的版本,解压后就可以在自己熟悉的环境学习与使用vi。
以下是/usr/share/vim/vimrc的例子:
___________________________________________________________
“” (for Chinese)
” Set file encoding format as ‘prc’ for Simplified Chinese
” Valid values for ’set fe=’ is ansi, japan, korea, prc, taiwan
” We set fe to prc for default, if you need single-byte editing,
” just type ‘:set fe=ansi’ will do the work.

set fe=prc

“” (for Chinese)
“” Set ruler on, you must set this to ensure
“” the Chinese functionality of gvim
set ru

“” For syntax color
if &term==”xterm”
set term=rxvt
set t_Co=8
set t_Sb=^[4%dm
set t_Sf=^[3%dm
endif
syntax on

“” Set visual bell and disable screen flash
” :set vb t_vb=

set bs=2

“” Toggle on/off highlightsearch
map <F8> :set hls!<bar>set hls?<cr>

“” Toggle on/off paste mode
map <F9> :set paste!<bar>set paste?<cr>

“” You can toggle the syntax on/off with this command
if has(“syntax_items”) | syntax off | else | syntax on | endif
map <F7> :if has(“syntax_items”) <Bar> syntax off <Bar> else <Bar> syntax on <Bar> endif <CR>

“” Set non-compatible with vi
set nocompatible

“” Set backup extension
” set backup
” set backupext=.bak

” add by zws
set autoindent
set ignorecase
set shiftwidth=4
set showmode
set tabstop=4
set nowrap
“if &t_Co > 1
” syntax on
“endif
“” Map for parenthesis matching
map \ %
“” search English word
map <F3> <Esc>:set keywordprg=/usr/local/bin/cdict<Esc>K<Esc>:set keyword=man<CR>
map <F6> <Esc>:set keywordprg=man<Esc>K
” backspace
map <BS> X
___________________________________________________________

六、编辑/etc/mtools.conf文件
一般情况下,都是在自己的机器安装Windows 98与Linux两种操作系统,通过安装mtools包,可以不用安装相应的文件系统,允许在MSDOS、Windows 98与Linux的文件系统之间,实现文件的读、写、移动、显示等操作。假设Windows 98安装在/dev/hda1、/dev/hda5分区下,修改/etc/mstools.conf文件,加入以下内容:
drive c: file=”/dev/hda1″
drive d: file=”/dev/hda5″
这样就可以执行mdir c:等命令。

七、拷贝各种配置文件
根据机器的用途,编辑拷贝相应的配置文件,例如:samba的配置文件/etc/smb.conf,域名服务器的配置文件,DHCP的配置文件/etc/dhcpd.conf等文件,在一般情况下,这些文件一旦配置好,很少发生改动,这样可以节约许多时间,注意原来的配置文件一定要做好备份,如果配置文件发生改动也要做好备份!

八、编译Linux内核
一般各种Linux系统套件安装的内核,都适合大部分的机器,但缺点是大而全,模块中包含有许多自己根本不需要的模块。只有根据自己的要求及机器硬件配置,来配置内核才能达到最优配置。注意在编译内核前,一定要对自己机器有一个全面的了解,这样才能做到心中有数。

以下是编译内核的简要步骤:(以redhat6.1为例说明)
1.进入/usr/src/linux,编辑Makefile文件,修改EXTRAVERSION= -xx,其中xx表示编译的版本号,最好用数字,并且大于原来的数值。
2.根据自己机器的硬件配置,选择相应的选项来配置内核。
#make menuconfig
3.理顺各文件的依存关系,清理以前生成的目标文件及其他文件。
#make clean ; make dep
4.编译内核与安装,并且安装模块。
#make bzImage
#make modules; make modules_install
5.安装内核。
# cp arch/i386/boot/bzImage /boot/vmlinuz-y.y.yy-xx
将内核复制到/boot目录下,其中y.y.yy表示Linux版本号,xx表示编译的版本号。
# cp System.map /boot/System.map-y.y.yy-xx
# cd /boot
# ln -s System.map-y.y.yy-xx System.map
6.编辑lilo的配置文件/etc/lilo.conf(略)。
注意最好保留原来的内核,这样如果新建的内核引导Linux不成功,可以利用旧的内核引导Linux操作系统。
7.测试新内核。
引导完成后,注意检查/lib/modules/y.y.yy-xx目录下,是否建立modules.dep文件。如果文件存在,可以修改/etc/rc.d/rc.sysinit,将有关执行模块依赖的命令的内容注解掉,这样可以加快Linux的启动过程。

Page 38 of 49« First...102030«3637383940»...Last »