迎接中秋节,铲除校园恶霸Dr.com

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
snappy
帖子: 279
注册时间: 2006-03-02 22:34
来自: 广西南宁

迎接中秋节,铲除校园恶霸Dr.com

#1

帖子 snappy » 2007-09-26 14:03

安装Dr.com
在linux下面安装Dr.com是不怎么方便,但是又想上网,怎么办?经过我查阅的资料,我把我自己的安装过程给大家详细写出来,方便那些在学校的朋友。(我是广西大学的,欢迎和大家交流)
我参照的是UBUNTU论坛里面的一篇文章。
--------------------------------------------用了几天,问了师兄。也搞了好久。用了好多方法不行。

别说那么多了。分享一下吧。大学的同学们。

首要因素是你要安装 build-essential

如果你没有安装过,请利用下面的命令安装

sudo apt-get install build-essential

当然你可以用“新立得”,我就很喜欢新立得!

你需要做的第二件事就是安装libssl-dev,这个包包括了drcom需要用到的用于认证加密的md5函数,它需要一个md5.h的头文件,而这个文件在libssl-dev中有,另外libssl-dev还包括了其他好多的用于加密的头文件哦。

第三,你需要安装对应内核版本的头文件,这个用 uname -r命令可以得到关于你机器的信息,比如我的:

uname -r

2.6.12-10-686

这是我的内核版本,我用的是Intel P4的CPU,所以我安装的是这个内核,ubuntu默认安装的是 2.6.12-9-386,当你第一次系统更新时就会安装 2.6.12-10-386,然后一般人都会根据自己的CPU类型选择合适的内核版本,AMD用户会选择 2.6.12-10-k7;

另外你得到信息的方法就是查看/proc/version文件,这里有你机器的一般信息,包括编译内核采用的gcc版本,这也是呆会要用的。

cat /proc/version

比如我的信息显示为:

Linux version 2.6.12-10-686 (buildd@rothera) (gcc version 3.4.5 20050809 (prerelease) (Ubuntu 3.4.4-6ubuntu8)) #1 Mon Jan 16 17:58:04 UTC 2006

它不但告诉了我内核版本还告诉了我gcc的版本是3.4.5,因为你编译新的内核模块时要用到和编译内核同样版本的gcc版本。

一、要从能上网的机上下载drcom的源代码,(libdrcom、drcomsuite)以下给出地址:

http://jaist.dl.sourceforge.net/sourcef ... -2.tar.bz2

http://jaist.dl.sourceforge.net/sourcef ... 3.2.tar.gz



二、解压包:以下操作大部分需要超级用户的权限,所以如果你当前是普通用户请用“su”切换到“root“用户

#tar jxvf libdrcom-0.0-20050423-2.tar.bz2

#tar jxvf drcomsuite-0.1.12.tar.bz2



三、安装libdrcom

#cd libdrcom-0.0-20050423-2/

#more INSTALL "查看安装说明

#make

#make install

安装libdrcom一般是没什么问题的,关键是安装后面的那部分



四、安装drcomsuite

安装之前你要确定在以下目录中有Linux内核的头文件或源代码存在,查看方法如下:

#uname -r "如我的就显示"2.6.20-15-server"

#ls /usr/src "那么这里就会有" linux-headers-2.6.20-15-server"或者是"linux"等等目录。注意这版本号一定要跟上面那命令显示的版本号相对应,要不然可能导致后面的安装失败,或者是drcom程序崩溃。

#cd drcomsuite-0.1.12/

#more INSTALL "可以看到这可以编译生成针对于不同内核版本的drcom,比较新的Linux发行版都是2.6以后的版本了,这也就是为什么从网络中心下载的客户端使用不了的原因,如果你的系统是2.6以后的版本,那就使用命令的默认参数就行了

#make "如果在make过程中出现以下错误:

/……/Drcom/drcomsuite-0.1.12/module/Linux/2.6.x/proto.c: 在函数 ‘init_proto’ 中:

/……/Drcom/drcomsuite-0.1.12/module/Linux/2.6.x/proto.c:306: 错误: 向只读变量 ‘inet_stream_ops’ 赋值

/……/Drcom/drcomsuite-0.1.12/module/Linux/2.6.x/proto.c:309: 错误: 向只读变量 ‘inet_dgram_ops’ 赋值

/……/Drcom/drcomsuite-0.1.12/module/Linux/2.6.x/proto.c: 在函数 ‘cleanup_proto’ 中:

/……/Drcom/drcomsuite-0.1.12/module/Linux/2.6.x/proto.c:322: 错误: 向只读变量 ‘inet_dgram_ops’ 赋值

/……/Drcom/drcomsuite-0.1.12/module/Linux/2.6.x/proto.c:323: 错误: 向只读变量 ‘inet_stream_ops’ 赋值

说明了你的内核头文件中‘inet_stream_ops’和‘inet_dgram_ops’声明是常量,要想进行下去,必须要其对进行修改:(可以编译通过后再改回原样)

#vi /usr/src/你的内核头文件目录/include/net/inet_common.h

找到以下两句,然后删除“const”,保全再从新编译过一次。

extern const struct proto_ops inet_stream_ops;

extern const struct proto_ops inet_dgram_ops;

#make "好了,没有出错了吧

#make install



五、配置drcom.conf文件

顺利安装好drcom只是成功的一半,后面还有好戏看呢……在安装的时候已经复制了配置文件样式“drcom.conf.new"到“/etc/“目录下了。我们需要做的就是:

#mv /etc/drcom.conf.new /etc/drcom.conf

#vi /etc/drcom.conf "会看到以下内容

……

……

# Username and password

# A blank password is considered valid.

username=填入你的帐号名

password=填入帐号密码

# Interface information

# mac is the MAC address of the nic we use to connect

# to the server.

# Example:

# mac=1a:2b:3c:4d:5e:6f

# If left blank it will default to 00:00:00:00:00:00

mac=填入你网卡的物理地址 #不清楚的在终端以root用户输入“ifconfig“查看

# nicn is the nth nic. This is the real data that's

# passed to the server, and thus I suggest you only

# fill in the first nic.

# Example:

# nic0=192.168.0.1

# nic1=

# nic2=

# nic3=

# Only nic0 is mandatory; the others should normally

# be left blank.

nic0=填入你本机的IP #一般都是单网卡用户,后面的空白

nic1=

nic2=

nic3=

# dnsp(rimary) and dnss(econdary).

dnsp=219.222.191.9 #主dns,这是我们学校的

dnss=202.96.128.86 #次dns,这是我们学校的,一定要填,不填程序会出错,如果没有次dns,填一个合法的ip地址

# dhcp server address. Windows XP uses 255.255.255.255

# and Windows 2000 uses 0.0.0.0

# If left blank it defaults to 255.255.255.255

dhcp= #一般都不是由dhcp指配的ip,所以这里也留空

# Connection information

# If the network supports it, and serverip is set

# to 1.1.1.1, then the gateway will help us find

# the real server (beex said this was the reason

# why we had to upgrade, but I don't see the

# practical reason why)

# All are optional, if left blank, then:

# + hostip defaults to nic0

# + servip defaults to 1.1.1.1

# + hostport defaults to 61440 (0xf000)

# + servport defaults to 61440 (0xf000)

# Note: hostip can be given one of the special values

# eth0, eth1, eth2, ... eth9 (I don't think

# regular users would need eth10 ), which

# corresponds to the inet address of the

# interface.

hostip=

servip=192.168.252.9 #输入你用drcom时打开浏览器被自动引导如提示你登陆的那个地址就可以了,这个是我们学校的登陆地址,其他的留空默认

hostport=

servport=

# Miscellaneous Machine Information

# We don't need to be honest about these.

# For example, Windows XP has a version number

# of 5.1 and a build number of 2600.

# All are optional, if left blank, then:

# + hostname defaults to "localhost"

# + winver defaults to 5.1

# + winbuild defaults to 2600

# + servicepack defaults to "Service Pack 2"

#后面的四项是用来假冒windows xp主机的,可以不填

hostname=

winver=

winbuild=

servicepack=



六、测试运行

#drcomcd "启动drcom的守护进程,如果运行成功会提示如下信息:

1177613153 DEBUG drcomc: Creating socket...

#drcomc login "如果显示 Login succeeded,就表示已经连接了,恭喜你。



如果这样不行的话就再装个drcom-1.3.5。我师兄的这样就行了。

下载地址: http://sourceforge.net/projects/drcom-client

[安装。

tar zxvf drcom-1.3.5.tar.gz

cd drcom-1.3.5

make

make install



gedit /etc/drcom.conf



username=rli1_03 #用户名

password=******* # 你的密码



mac=00:0F:B0:63:1C:D9 #mac地址,可以通过运行ifconfig命令查得



nic0=10.5.63.254 # 你的ip地址

nic1=

nic2=

nic3=

dnsp=202.113.32.6 # DNS

dnss=202.106.196.115 # 次DNS

dhcp=



hostip=

servip=192.168.100.251 #用drcom时打开浏览器被自动引导如提示你登陆的那个地址



hostport=

servport=



hostname=

winver=

winbuild=

servicepack=







7.呵呵,现在就可以上网了



登录:



sudo drcomd



sudo drcomc login



如果出现以下信息,说明登录成功:



lee@lee-ubuntu:~/dowload/drcom$ sudo drcomc login

Login succeeded







退出:比以前 kill drcomc 好多了那~~呵呵



lee@lee-ubuntu:~/dowload/drcom$ sudo drcomc logout

Logout succeeded

--------------------------------------------
安装的步骤要和上面的一样,否则会出现问题的。我下面把我的配置文件给大家看看,大家可以参考我的配置。
--------------------------------------------
username=你的用户名
password=你的密码
mac=你自己的网卡地址(ifconfig)
nic0=172.30.8.9(你的ip,ifconfig可以看到的)
nic1=
nic2=
nic3=
dnsp=210.36.16.33(你学校的DNS)
dnss=210.36.16.33(要是没有次DNS,可以设置和前面的一样)
dhcp=

hostip=
servip=210.36.18.110(服务器IP地址,就是你打开网页时候那个地址)
hostport=
servport=

hostname=
winver=
winbuild=
servicepack=
autologout=0
Ubuntu8.04
IBM T40 PM 1.5G
1.5G内存
80G硬盘
14.1XGA
显卡 ATI RADEON 7500 32M
56K/1GB/红外/TV-out/无线802.11b
COMBO
xukalo
帖子: 4
注册时间: 2007-08-16 21:01

#2

帖子 xukalo » 2007-09-26 22:26

不是把安装个DR。COM都要这么长,看了头真痛
头像
waxmax
帖子: 141
注册时间: 2006-04-11 8:36
联系:

#3

帖子 waxmax » 2007-09-27 1:58

这个文章在很多地方都转载了
我也正在找去掉学校上网的Dr.COM的方法

我的同学给我说了一个方法
只要启动WINE然后下载一个绿色版的Dr.COM就可以了

然后在WINE下面启动,就可以了.非常好用,没有什么影响.
回复