ubuntu8.04下成功安装Dr.com上网客户端
发表于 : 2008-10-14 16:16
今天下午搞了一下ubuntu的drcom来方便在学校里面无线上网,由于学校的无线是内部网,则通过pppoe的拨号上网是行不通的。通过在网上查资料,和自己的实践,发现下面的方法成功的装上了drcom,所以特地来论坛里发个帖子来帮助那些和我一样的初学者,希望你们也能够通过下面的方法来解决所遇到的问题。
1、安装 build-essential:
sudo apt-get install build-essential
或者用“新立得软件包管理器”安装
2、安装libssl-dev,它包括了drcom需要用到的用于认证加密的md5函数,还包括了其他好多的用于加密的头文件,在“新立得软件包管理器”中搜索“libssl-dev”即可。
3、安装gcc-3.4,在“新立得软件包管理器”中搜索安装即可。
4、安装对应内核版本的头文件,在“新立得软件包管理器”中搜索"linux-headers"就行了,至于要选择哪一个,按如下方法可得到:
cat /proc/version ,就会得到类似这样的信息Linux version 2.6.20-16-generic (root@terranova) (gcc version 4.1.2 (Ubuntu 4.1.2-0ubuntu4)) #2 SMP Sun Sep 23 19:50:39 UTC 2007,其中2.6.20-16-generic就是内核版本,这里一定要对应,不然以后的编译会出错。
5、分别安装libdrcom、drcomsuite、drcom-1.3.7,到http://sourceforge.net/project/showfiles.php?group_id=128089下载。
1) 安装libdrcom:
#cd libdrcom-0.0-20050423-2/
#sudo make
#sudo make install
2) 安装drcomsuite:
安装之前要确定已经安装了Linux内核的头文件,查看方法如下:
#ls /usr/src
可以看到 linux-headers-2.6.20-15 linux-headers-2.6.20-16
linux-headers-2.6.20-15-generic linux-headers-2.6.20-16-generic
等等目录。版本号一定要对应,要然可能导致后面的安装失败,或者是drcom程序崩溃。
#cd drcomsuite-0.1.12/
#sudo 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’声明是常量,要想进行下去,必须对其进行修改:
#sudo gedit /usr/src/你的内核头文件目录/include/net/inet_common.h
找到以下两句,然后删除“const”,保存再重新编译
extern const struct proto_ops inet_stream_ops;
extern const struct proto_ops inet_dgram_ops;
#sudo make
#sudo make install
3) 配置drcom.conf文件:
#sudo mv /etc/drcom.conf.new /etc/drcom.conf
#sudo gedit /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=网卡物理地址,可以在终端输入“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=填入主DNS
dnss=填入辅DNS
# 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=
# 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 Razz), which
# corresponds to the inet address of the
# interface.
hostip=
servip=填入你打开浏览器被自动引导到提示你登陆的网址,其他的都留空,保持默认値
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"
hostname=
winver=
winbuild=
servicepack=
4)安装drcom-1.3.7:
$cd drcom-1.3.5
$sudo make
$sudo make install
$sudo gedit /etc/drcom.conf
再填一次:
username=帐号名
password=帐号密码
mac=网卡物理地址
nic0=IP地址
nic1=
nic2=
nic3=
dnsp=主 DNS
dnss=辅DNS
dhcp=
hostip=
servip=打开浏览器被自动引导提示你登陆的那个网址
hostport=
servport=
hostname=
winver=
winbuild=
servicepack=
保存退出。
登录:
$sudo drcomd
$sudo drcomc login
出现以下信息Login succeeded,登录成功。
要上内网,注销即可
$ sudo drcomc logout
出现以下信息Logout succeeded ,注销成功,可以登录内网了。
如果在运行sudo drcomc login 时出现:
can not create socket to server 这样~~
sudo killall drcomd
就都正常了~~
1、安装 build-essential:
sudo apt-get install build-essential
或者用“新立得软件包管理器”安装
2、安装libssl-dev,它包括了drcom需要用到的用于认证加密的md5函数,还包括了其他好多的用于加密的头文件,在“新立得软件包管理器”中搜索“libssl-dev”即可。
3、安装gcc-3.4,在“新立得软件包管理器”中搜索安装即可。
4、安装对应内核版本的头文件,在“新立得软件包管理器”中搜索"linux-headers"就行了,至于要选择哪一个,按如下方法可得到:
cat /proc/version ,就会得到类似这样的信息Linux version 2.6.20-16-generic (root@terranova) (gcc version 4.1.2 (Ubuntu 4.1.2-0ubuntu4)) #2 SMP Sun Sep 23 19:50:39 UTC 2007,其中2.6.20-16-generic就是内核版本,这里一定要对应,不然以后的编译会出错。
5、分别安装libdrcom、drcomsuite、drcom-1.3.7,到http://sourceforge.net/project/showfiles.php?group_id=128089下载。
1) 安装libdrcom:
#cd libdrcom-0.0-20050423-2/
#sudo make
#sudo make install
2) 安装drcomsuite:
安装之前要确定已经安装了Linux内核的头文件,查看方法如下:
#ls /usr/src
可以看到 linux-headers-2.6.20-15 linux-headers-2.6.20-16
linux-headers-2.6.20-15-generic linux-headers-2.6.20-16-generic
等等目录。版本号一定要对应,要然可能导致后面的安装失败,或者是drcom程序崩溃。
#cd drcomsuite-0.1.12/
#sudo 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’声明是常量,要想进行下去,必须对其进行修改:
#sudo gedit /usr/src/你的内核头文件目录/include/net/inet_common.h
找到以下两句,然后删除“const”,保存再重新编译
extern const struct proto_ops inet_stream_ops;
extern const struct proto_ops inet_dgram_ops;
#sudo make
#sudo make install
3) 配置drcom.conf文件:
#sudo mv /etc/drcom.conf.new /etc/drcom.conf
#sudo gedit /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=网卡物理地址,可以在终端输入“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=填入主DNS
dnss=填入辅DNS
# 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=
# 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 Razz), which
# corresponds to the inet address of the
# interface.
hostip=
servip=填入你打开浏览器被自动引导到提示你登陆的网址,其他的都留空,保持默认値
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"
hostname=
winver=
winbuild=
servicepack=
4)安装drcom-1.3.7:
$cd drcom-1.3.5
$sudo make
$sudo make install
$sudo gedit /etc/drcom.conf
再填一次:
username=帐号名
password=帐号密码
mac=网卡物理地址
nic0=IP地址
nic1=
nic2=
nic3=
dnsp=主 DNS
dnss=辅DNS
dhcp=
hostip=
servip=打开浏览器被自动引导提示你登陆的那个网址
hostport=
servport=
hostname=
winver=
winbuild=
servicepack=
保存退出。
登录:
$sudo drcomd
$sudo drcomc login
出现以下信息Login succeeded,登录成功。
要上内网,注销即可
$ sudo drcomc logout
出现以下信息Logout succeeded ,注销成功,可以登录内网了。
如果在运行sudo drcomc login 时出现:
can not create socket to server 这样~~
sudo killall drcomd
就都正常了~~