Skip navigation.

Sign up | Lost password? | Help

A new Page of Sealinger

Maybe I was a Bird in another Life !

Posts tagged with "linux"

关于sendmail与主机名的一些问题

系统环境:rhel as 4 update 4

今天在查看服务器的logwatch邮件时,发现有的/var/分区磁盘空间占用有点多,感觉应该是有不正常的日志产生了。

登录系统,查看/var/spool/mail/,果然邮件文件比较大。

1. 首先知道要优化监控脚本了,这个事情一直想做,可是老是没时间(有优先级更高的任务啊```):frown:

于是把脚本中没用的输出到重定向到 /dev/null ,一般我们是这么写的,比如apache的关闭信息:
apachectl stop > /dev/null 2>&1

这样就不会产生烦人的邮件了。

2. 有些日志邮件是比较怪的,比如:
From MAILER-DAEMON@mob2  Mon Apr 30 17:25:57 2007
Date: Thu, 26 Apr 2007 09:26:42 +0800
From: Mail Delivery Subsystem <MAILER-DAEMON@mob2>
To: <squid@mob2>
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
        boundary="l3Q1QdbT009121.1177550802/localhost.localdomain"
Subject: Warning: could not send message for past 4 hours
Auto-Submitted: auto-generated (warning-timeout)

This is a MIME-encapsulated message

--l3Q1QdbT009121.1177550802/localhost.localdomain

    **********************************************
    **      THIS IS A WARNING MESSAGE ONLY      **
    **  YOU DO NOT NEED TO RESEND YOUR MESSAGE  **
    **********************************************

The original message was received at Thu, 26 Apr 2007 05:01:01 +0800
from localhost.localdomain [127.0.0.1]

   ----- Transcript of session follows -----
<squid@mob2>... Deferred: Connection refused by mob2.localdomain.
Warning: message still undelivered after 4 hours
Will keep trying until message is 5 days old

连接被拒绝了。但这是本地传送,有什么好拒绝的?
再看这个主机名(mob2.localdomain)比较奇怪,查看一下:
# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=mob2
GATEWAY=192.168.4.1
# hostname --long
mob2

没这么配置主机名啊````

之前查看各个服务器的Logwatch邮件的时候,有那么一两台主机的logwatch邮件标题就是“LogWatch for name.localdomain”的格式,而不像其他的大部分都是“LogWatch for name”,当时就感觉奇怪,因为系统安装时设置都是一样的格式,没有用FQDN格式的长主机名,但为何有的显示name,有的显示name.localdomain呢?还待研究````

而且/var/spool/mail 下的邮件文件在阅读后,都变的很小了,但/var/分区还是占用较大,du一把:
[root@mob2 var]# du -sh ./*
...
344M     ./spool
...

随手ls一个文件夹:/var/spool/mqueue ,竟然翻了不知多少屏的文件,看名字,这应该是sendmail的邮件队列文件夹。mailq一把:
# mailq |less
l3TCx1Me027333      110 Sun Apr 29 20:59 <nemo@mob2>
                 (Deferred: Connection refused by mob2.localdomain.)
                                         <nemo@mob2>

发现都是这种被拒绝连接的队列````汗````:yikes:

感觉原因是不是找不到这个mob2.localdomain主机名呢?修改一下/etc/hosts试试:
# vi /etc/hosts
127.0.0.1               localhost.localdomain localhost mob2.localdomain
192.168.4.148           mob2

重启一下sendmail服务,过了一会,显示nemo用户收到新邮件,查看一把,真是N多啊```看来邮件队列总算被发出去了。

使用yum更新Redhat ES 4


参考:使用yum自動更新RedHat AS 4

用Nessus扫描出一台rhel es 4服务器有很多(多达147个)漏洞,老板要求让我第一时间把High级别的漏洞解决。

查看了一下一百多页的扫描报告,这台机器大部分的漏洞都是说软件包的漏洞,Redhat官方网站都有说明的,升级版本就可以了。但是那么多软件包一个一个来找更新岂不太麻烦?何况还会有包依赖问题,会牵连出更多更多的包要更新````

于是计划使用apt或yum。

搜索了一下,如果用Yum来更新Fedora,那是方便至极,yum资源站点很多而且很新。但正统Redhat Linux的资源就少了,一般有更新到最高版本Redhat Linux 9,企业版rhel真是难觅。以前找到的Redhat官方的下载资源也丢了````

后来搜索到如上文章,用Centos的资源来更新rhel。Centos改自rhel,应该是差不多的,于是一试```

首先用http://rpm.pbone.net/搜了一个yum-2.9.4-74.el4.at.i386.rpm ,安装时显示:

# rpm -ivh yum-2.9.4-74.el4.at.i386.rpm 
warning: yum-2.9.4-74.el4.at.i386.rpm: V3 DSA signature: NOKEY, key ID 66534c2b
error: Failed dependencies:
        /usr/lib/python2.3/site-packages/elementtree is needed by yum-2.9.4-74.el4.at.i386
        /usr/lib/python2.3/site-packages/rpm is needed by yum-2.9.4-74.el4.at.i386
        /usr/lib/python2.3/site-packages/sqlite is needed by yum-2.9.4-74.el4.at.i386
        /usr/lib/python2.3/site-packages/sqlitecachec.py is needed by yum-2.9.4-74.el4.at.i386
        /usr/lib/python2.3/site-packages/urlgrabber is needed by yum-2.9.4-74.el4.at.i386
        python(abi) = 2.3 is needed by yum-2.9.4-74.el4.at.i386
    Suggested resolutions:
        yum-2.1.11-3.noarch.rpm

后来找到似乎是yum的官方站点——Yellow dog Updater, Modified,哈哈,很多版本````

上面提示建议安装yum-2.1.11-3.noarch.rpm,那就下载了个yum-2.1.11-1.noarch.rpm 。安装OK:

# rpm -ivh yum-2.1.11-1.noarch.rpm 
warning: yum-2.1.11-1.noarch.rpm: V3 DSA signature: NOKEY, key ID 69886cc7
Preparing...                ########################################### [100%]
   1:yum                    ########################################### [100%]

下面开始配置yum:

# vi /etc/yum.conf 

[base]
name=CentOS 4.4 for RHEL4 - Base
baseurl=http://mirror.be10.com/centos/4/os/i386/
#因为我的系统是rhel es 4(没有update的)

[updates]
name=CentOS 4.4 for RHEL4 - Updates
baseurl=http://mirror.be10.com/centos/4/updates/i386/

下面来更新```
首先有个漏洞是关于vim的,先来查查vim:

# yum list |less
...
vim-common.i386                          1:6.3.035-3            installed       
vim-enhanced.i386                        1:6.3.035-3            installed       
vim-minimal.i386                         1:6.3.035-3            installed  
...

更新一下试试:

# yum update vim-common
Setting up Update Process
Setting up Repo:  base
repomd.xml                100% |=========================| 1.1 kB    00:00     
Setting up Repo:  updates
repomd.xml                100% |=========================|  951 B    00:00     
Reading repository metadata in from local files
base      : ################################################## 1499/1499
updates   : ################################################## 346/346
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for vim-common to pack into transaction set.
vim-common-6.3.046-0.40E. 100% |=========================| 116 kB    00:00     
---> Package vim-common.i386 1:6.3.046-0.40E.7 set to be updated
--> Running transaction check
--> Processing Dependency: vim-common= 1:6.3.035-3 for package: vim-enhanced
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for vim-enhanced to pack into transaction set.
vim-enhanced-6.3.046-0.40 100% |=========================| 7.2 kB    00:00     
---> Package vim-enhanced.i386 1:6.3.046-0.40E.7 set to be updated
--> Running transaction check

Dependencies Resolved
Transaction Listing:
  Update: vim-common.i386 1:6.3.046-0.40E.7

Performing the following to resolve dependencies:
  Update: vim-enhanced.i386 1:6.3.046-0.40E.7
Is this ok [y/N]: y
Downloading Packages:
vim-common-6.3.046-0.40E. 100% |=========================| 3.4 MB    00:03     
vim-enhanced-6.3.046-0.40 100% |=========================| 956 kB    00:01     
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating: vim-common 100 % done 1/4 
Updating: vim-enhanced 100 % done 2/4 
Completing update for vim-common  - 3/4
Completing update for vim-enhanced  - 4/4

Updated: vim-common.i386 1:6.3.046-0.40E.7
Dependency Updated: vim-enhanced.i386 1:6.3.046-0.40E.7
Complete!

看,自动解决包依赖关系,自动 下载更新,爽````!

编译出现<undefined reference to `_Unwind_Resume'>或<invalid option `tune=pentium4'>错误问题解决


运行环境:
rhel es 4
Oracle 10g 10.1.0.3

=========================================================

在rhel es 4上安装fcgi-2.4.0,编译时出现如下错误:

g++ -g -O2 -o .libs/echo-cpp echo-cpp.o  ../libfcgi/.libs/libfcgi++.so /home/nemo/build/fcgi-2.4.0/libfcgi/.libs/libfcgi.so -lnsl -Wl,--rpath -Wl,/usr/local/lib
echo-cpp.o(.text+0x443): In function `main':
/home/lee/build/fcgi-2.4.0/examples/echo-cpp.cpp:175: undefined reference to `_Unwind_Resume'
collect2: ld returned 1 exit status
make[2]: *** [echo-cpp] Error 1

还有就是安装ImageMagick-6.3.2,编译时有这样的错误:

gcc -c  -I../ -I.. -I/usr/include/freetype2 -I/X11 -I/usr/include/libxml2 -D_REENTRANT -

D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -

D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -g -O2 -Wall -W -pthread -O2 -g -pipe -m32 -march=i386 

-mtune=pentium4   -DVERSION=\"6.3.2\" -DXS_VERSION=\"6.3.2\" -fPIC "-I/usr/lib/perl5/5.8.5/i386-

linux-thread-multi/CORE"  -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES=1 -DHAVE_CONFIG_H Magick.c
cc1: invalid option `tune=pentium4'
make[1]: *** [Magick.o] Error 1

google了一下,大概发现是gcc版本的问题。
这台机器安装了Oracle 10g,安装前有一些compat版gcc是需要安装的:

compat-libgcc-296-2.96-132.7.2
compat-gcc-32-c++-3.2.3-47.3
compat-gcc-32-3.2.3-47.3

是不是这些补丁引起gcc不符合要求呢?
对比一下这台机器和其他没有安装oracle的机器(即没有安装gcc compat补丁)的gcc和g++版本信息:

安装了Oracle的机器:

$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --enable-languages=c,c++ --disable-libgcj --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-47.3)

$ g++ -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --enable-languages=c,c++ --disable-libgcj --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-47.3)

没有安装Oracle的机器:

$ gcc -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --

enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit 

--disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)

$ g++ -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --

enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit 

--disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)

应该有多个gcc,我们来找一找:

$ which gcc
/usr/bin/gcc
$ cd /usr/bin
$ ls gcc*
gcc  gcc32  gcc.orig

有三个,gcc32应该是3.2版的,我们来看下gcc.orig的信息:

$ gcc.orig -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)

OK!符合!应该就是它了!
再来看看g++ :

$ ls g++*
g++  g++32  g++.orig
$ g++.orig -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)

OK!都找到了!
把原来的gcc和g++备份一下,拷贝 gcc.orig 和 g++.orig 为gcc/g++ ,重新编译,成功!````

新版GPL 3草案周三发布


新版GPL 3草案周三发布

自由软件的根基 GNU General Public License (GPL) 3 将在周三(2007/03/28/)早上发布,根据自由软件基金会FSF周一的说法,新的草案将修正许可中的语言表达,以防止类似于Novell和Microsoft前些日子达成的交易行为生成.开源软件团体多次延迟了新版GPL的产生,连Linux之父Linus都曾多次公开反对GPL v3.

v3草案将公开接受意见60天,之后FSF将发布一个最终草案进行30天的公开审核.GPL v3将对自由软件界产生深远影响,发布后,FSF所控制的GNU系统将全面迁移到GPL3下(Linux暂时仍然工作在v2,原因前面说过了).

cnBeta采译自CRN
查看:New GPL 3 Draft Due Wednesday

Linux媒体中心--LinuxMCE(Wow!)


Linux媒体中心--LinuxMCE(Wow!)

Linux媒体中心--LinuxMCE,外观可一点不比微软的差!LinuxMCE,是基于MythTV核心.据官方称,目前只支持ubuntu 6.10,其他版本需要等待.内含截图和下载,Linux爱好者们千万别错过!






观看:一段Google Video
访问:LinuxMCE

安装DNS缓存服务器-djbdns


公司服务器集群想搞个DNS缓存服务器,以提高DNS解析速度。本来rhel4自带的BIND9默认配置就是缓存服务器了,老大说搞个其他的,用BIND好像有点小题大作````提供给我了一些资料,里面有个djbdns。

我了解了一下,原来djbdns是qmail作者写的一个简单、高效和安全的DNS cache Server,下面是一些网上介绍:

djbdns 是一個由 Qmail 的作者所設計的新一代 DNS server ,這套djbdns採用了跟BIND不同的思考方向,在程式的架構上也和BIND一手撐天的做法完全不同。它採用模組化的方式,將DNS運作上的各個角色都適當地分配到不同程式上面。採用UNIX的設計哲學,堅持讓一個程式做好一件事的方式,將DNS中最主要的Cache Server、Content Server的角色分離開來,由不同的程式來負責不同的事。

本人本来就非常喜欢qmail,这样爱屋及乌,马上着手研究安装djbdns!

下面给大家介绍一下安装方法:

安装环境:
redhat enterprise linux 4
daemontools 0.76
ucspi-tcp 0.88
djbdns 1.05 (http://cr.yp.to/djbdns.html)

1. 安装djbdns前,需要安装两个工具,即daemontoolsucspi-tcp

1)daemontools是一个收集管理UNIX进程的工具.用它来监听djbdns进程

     mkdir -p /package
     chmod 1755 /package
     cd /package
     gunzip daemontools-0.76.tar
     tar -xpf daemontools-0.76.tar
     rm daemontools-0.76.tar
     cd admin/daemontools-0.76
     package/install

很简单吧,这样就安装完了;下面来安装ucspi-tcp:

2)ucspi-tcp软件包由一组工具组成。它们用来简单的建立客户机-服务器tcp后台程序。TcpServer是一个比inetd安全性更好的选择。它内建有基于规则的连接控制,能完善地在达到预定义的最大系统负载时将连接推迟,这点比 inetd好。

     gunzip ucspi-tcp-0.88.tar
     tar -xf ucspi-tcp-0.88.tar
     cd ucspi-tcp-0.88
     make
     make setup check


2. 真是简单,现在我们来安装我们的主角-djbdns

1) 如果你想把参考文档安装在本机,以便方便使用elinks来查看,则:

   gunzip < doc.tar.gz | (cd /; tar -xf -)

然后运行slashdoc-merge脚本来生成 /doc/commands.html index文件就可以啦````

2) 安装djbdns-1.05

     gunzip djbdns-1.05.tar
     tar -xf djbdns-1.05.tar
     cd djbdns-1.05
     echo gcc -O2 -include /usr/include/errno.h > conf-cc
     make
     make setup check

哈,真是简单````

3. 配置djbdns让它成为你的网络的DNS Cache Server

1) 首先以root用户创建两个系统账户,名字为Gdnscache and Gdnslog;

2) 以root用户来建立/etc/dnscache 服务目录(命令的最后接你机器的IP)

dnscache-conf Gdnscache Gdnslog /etc/dnscache 10.53.0.1

这个目录包含一些日志文件和一些配置文件。

3) 以root用户,告诉svscan这个新服务,并使用svstat命令检查运行状态

     ln -s /etc/dnscache /service
     sleep 5
     svstat /service/dnscache

4) 以root用户,在/etc/dnscache/root/ip目录建立文件,限制只有你希望的客户端IP才能使用这个DNS CACHE,如:

    touch /etc/dnscache/root/ip/10.53.0

这样10.53.0.*的IP客户端才能使用你的DNS CACHE。

5) 在/etc/resolv.conf中设置DNS为本机,加nameserver 10.53.0.1 为第一行。测试一下:
     dnsip www.cnn.com
     dnsip www.fsf.org

看能不能返回IP地址?哈哈```恭喜你,成功了!

6) 默认djbdns使用1MB的内存作为它的cache,你可以调整为100MB:

     echo 100000000 > /service/dnscache/env/CACHESIZE
     echo 104857600 > /service/dnscache/env/DATALIMIT
     svc -t /service/dnscache    #重启dnscache

终于解决不能发送邮件到sohu


公司添置一批新服务器到汕头电信机房,我搭建了一台qmail邮件服务器。后来测试发现不能发送邮件到sohu,但可以收到sohu的来信。qmail日志显示如下:
2007-03-06 13:26:07.476335500 starting delivery 16148: msg 146196 to remote cnfx8888@sohu.com
2007-03-06 13:26:07.476354500 status: local 0/10 remote 1/20
2007-03-06 13:26:07.482487500 delivery 16148: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/

telnet一下sohu的mx服务器,发现:
[root@web home]# date
Tue Mar  6 13:25:55 CST 2007

[root@web home]# host -t mx sohu.com
sohu.com mail is handled by 10 sohumx.h.a.sohu.com.

[root@web home]# telnet sohumx.h.a.sohu.com 25
Trying 61.135.132.100...
telnet: connect to address 61.135.132.100: Connection timed out
telnet: Unable to connect to remote host: Connection timed out
[root@web home]# 

根本不能连接它的25端口。试了其他10几台机器(同一个IP段内)都是一样。
开始比较忙,没时间去理,怀疑有可可能是电信机房的防火墙拦截了到sohu的25端口连接。但联系电信,,,你知道,他们应该效率比较低,也就没管了。
年后回来,这两天有点时间,就跟sohu沟通了一下,几天后问题解决,哈哈````高兴!!:yes:
原来是服务器所属IP段曾经发送大量flg反动邮件,故被封了`````晕吧``````:faint:

-----------------------------------------------------
下面是来往的邮件原文:

您好:
经工程师检查,贵公司IP:125.***.***.xxx-125.***.***.yyy 所属IP段去年发送过大量flg反动邮件,所以IP段被前端设备拒收
所以之前我们在系统中没有查到
现已解除封锁
稍后可测试

谢谢
-----------------------------------------------------

Linux下增加apache的mod_rewrite模块


安装环境:rhel es 4
apache:1.3.37(源码自己编译安装)
gdbm:1.8.3

1. Apache安装rewrite模块的时候需要DBM支持,否则无法编译,表现为:
[nemo@web standard]$ ~/apache/bin/apxs -c mod_rewrite.c
gcc -DLINUX=22 -DHAVE_SET_DUMPABLE -DUSE_HSREGEX -fpic -DSHARED_MODULE -I/home/nemo/apache/include  -c mod_rewrite.c
In file included from mod_rewrite.c:51:
mod_rewrite.h:91:18: ndbm.h: No such file or directory
mod_rewrite.c: In function `lookup_map_dbmfile':
mod_rewrite.c:3035: error: `DBM' undeclared (first use in this function)
mod_rewrite.c:3035: error: (Each undeclared identifier is reported only once
mod_rewrite.c:3035: error: for each function it appears in.)
mod_rewrite.c:3035: error: `dbmfp' undeclared (first use in this function)
mod_rewrite.c:3036: error: `datum' undeclared (first use in this function)
mod_rewrite.c:3036: error: syntax error before "dbmkey"
mod_rewrite.c:3044: error: `dbmkey' undeclared (first use in this function)
mod_rewrite.c:3047: error: `dbmval' undeclared (first use in this function)
apxs:Break: Command failed with rc=1
[nemo@web standard]$ rpm -qa |grep gdbn
[nemo@web standard]$ rpm -qa |grep gdbm
gdbm-1.8.0-24
gdbm-devel-1.8.0-24

所以首先要安装一个GDBM :下载地址:ftp://ftp.gnu.org/gnu/gdbm/
GDBM安装步骤: 进入安装目录,
./configure
make
make install
make install-compat #否则无法编译出ndbm.h头文件.

2. 然后进入到apache源码包解压目录apache_1.3.37/src/modules/standard,用Apache bin目录下的apxs命令安装,注意apxs使用绝对路径:
cd /path/to/apache_1.3.37/src/modules/standard/
/usr/local/apache/bin/apxs -c mod_rewrite.c 
/usr/local/apache/bin/apxs -i -a -n mod_rewrite mod_rewrite.so

然后在http.conf配置文件里加上:
LoadModule rewrite_module libexec/mod_rewrite.so

接下来用
/usr/local/apache/bin/apachectl stop
/usr/local/apache/bin/apachectl start

停止apache,然后用再start,千万注意,在这里不能用restart或者graceful参数来重新启动apache,必须先停止,然后再开始,否则rewrite将不起作用。

如果你跟我一样的不幸,遇到dbm_fetch错误问题,那么请按我的尝试来操作:

执行完/usr/local/apache/bin/apxs -i -a -n mod_rewrite mod_rewrite.so后,这个命令已经帮我们复制mod_rewrite.so模块到libexec目录下并且修改好了httpd.conf文件,但测试却出现dbm_fetch错误:
[root@web conf]# ../bin/apachectl configtest
Syntax error on line 16 of /home/nemo/apache/conf/httpd.conf:
Cannot load /home/nemo/apache/libexec/mod_rewrite.so into server: /home/nemo/apache/libexec/mod_rewrite.so: undefined symbol: dbm_fetch

google一下,马上发现一篇文章写有解决方法(本文最后贴出),继续尝试:
到 apache_1.3.37/src/modules/standard 目录,执行一下这个命令:
gcc -shared -o mod_rewrite.so mod_rewrite.o -lgdbm
cp mod_rewrite.so /usr/local/apache/libexec/

重新检查一下:
[root@web conf]# ../bin/apachectl configtest
Syntax error on line 16 of /home/nemo/apache/conf/httpd.conf:
Can't locate API module structure `mod_rewrite_module' in file /home/nemo/apache/libexec/mod_rewrite.so: /home/nemo/apache/libexec/mod_rewrite.so: undefined symbol: mod_rewrite_module

修改 httpd.conf ,将
LoadModule mod_rewrite_module libexec/mod_rewrite.so
改为
LoadModule mod_rewrite libexec/mod_rewrite.so

检查一下:
[root@web conf]# ../bin/apachectl configtest
Syntax error on line 16 of /home/nemo/apache/conf/httpd.conf:
Can't locate API module structure `mod_rewrite' in file /home/nemo/apache/libexec/mod_rewrite.so: /home/nemo/apache/libexec/mod_rewrite.so: undefined symbol: mod_rewrite

靠!再改:
LoadModule rewrite_module libexec/mod_rewrite.so

检查:
[root@web conf]# ../bin/apachectl configtest
Syntax OK

NND,总算搞定了!
[root@web conf]# ../bin/apachectl restart   
../bin/apachectl restart: httpd restarted

-------------------------------------
google到的解决方法:
http://www.vttoth.com/rewrite.htm
Technical Notes: Undefined symbol 'dbm_fetch' with the Apache server

I tried to include in my Apache Web server's configuration the mod_rewrite module, but when I restarted the server, I received an error:
Cannot load /usr/local/apache/libexec/mod_rewrite.so into server:
/usr/local/apache/libexec/mod_rewrite.so: undefined symbol: dbm_fetch

The problem, as it turns out, is that mod_rewrite.so is compiled incorrectly. It should be linked with a dbm library but it isn't.

If you have an up-to-date set of Apache source files, you can easily solve this problem by manually rerunning the last compilation step of this module, using the correct options. When you execute make mod_rewrite.so in the appropriate directory, it performs this final step:
gcc -shared -o mod_rewrite.so mod_rewrite.lo

Rerun gcc, this time adding a reference to the GNU gdbm library:
gcc -shared -o mod_rewrite.so mod_rewrite.lo -lgdbm

Next, copy the newly created mod_rewrite.so over to /usr/local/apache/libexec or wherever your Apache module files are located.

In my case, this was all that was needed to solve the problem. Your mileage may vary.

自由软件基金会正在考虑禁止Novell发行Linux

自由软件基金会正在考虑禁止Novell发行Linux

据国外媒体报道,Linux世界的“外来户”Novell公司和微软公司达成有关软件专利的协议,这在开源业界当中引发了愤怒.二月二日,拥有Linux核心知识产权的自由软件基金会表示,他们正在考虑一些开源业界的建议,即禁止Novell公司发行Linux操作系统.

  自由软件基金会的首席律师摩格伦表示,开源业界希望他们采取各种手段干预Novell和微软公司的合作,他们有各种理由担心,这将是微软公司利用专利大棒攻击开源业界的开始.

  去年11月份,Novell公司宣布和微软公司签署多项合作协议,除了在提高Linux和Windows操作系统的兼容性方面,微软公司还表示,将不会对Novell Suse Linux用户提起软件专利侵权诉讼,开源业界认为,Novell公司“背叛”了开源业界,并让其Linux产品获得了“凌驾”与其他Linux的“免遭诉讼”优势.此后,开源业界一部分批评人士认为,自由软件基金会应该禁止Novell公司继续使用(免费)Linux内核,并发行Suse Linux版本.

  摩格伦表示,自由软件基金会目前尚未作出决定,不过预计将在两个星期内宣布正式的决定.

  据悉,如果基金会禁令出台,禁令将会禁止Novell公司继续使用新版的Linux核心发行新的操作系统,新的开源许可协议预计将从三月份生效,这个协议已经对旧的协议进行了修改.

  Linux属于开源软件,任何开发人员都可以免费获得代码,进行修改,自行发行免费软件版本,并从技术服务方面获益.Novell公司原来并不属于开源业界,后来收购了Suse Linux操作系统,从传统的Netware提供商转变成全球两大Linux供应商之一.

  Novell公司的首席营销官Dragoon暂时未对新闻界作出评论.他说,他们需要看到自由软件基金会的正式决定,才能作出反应.

来源:CNBETA(CB取自硅谷动力)

==========================================================

真为开源界捏一把汗,祝福linux!:worried:
--sealinger
November 2009
M T W T F S S
October 2009December 2009
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30