在ubuntu上安装drcom很简单

只要make&&make install就行了

但在gentoo却遇到了很多问题 ,先是不能编译,少了什么变量,security_ops,然后到网上搜,好不容易找到了一个解决方法,(当时我的内核是2.6.22,后来才更新到2.6.24)

在网友zrx550 http://hi.baidu.com/z%5Fr%5Fx那看到这篇文章
----------
linux下的drcom是在2.6的内核中开发的,用到了<linux/security.h>中的security_ops。>但是这个 EXPORT_SYMBOL 在2.6.24的内核中被取消了,导致drcom不能被成功的编译。随之
而来的问题就是新内核在需要drcom的网络环境中不能上网了。就这个问题我请教了开源版>本drcom开发者之一的Wheelz。目前最简单的办法只能修改内核,重新编译。针对2.6.24的>内核,具体办法如下:
1) 在内核的security/security.c文件的最后加上EXPORT_SYMBOL(security_ops);
2) 重新编译一下内核。
3) drcom-1.3.7/kmod/proto.c在#include <linux/security.h>后面加上一句:
extern struct security_operations *security_ops;
4)编译安装drcom。

但却始终不起作用,编译了好几次内核,始终没用,后来在.config 中加入

先 grep SECURITY .config 然后vim .config

CONFIG_SECURITY=y
CONFIG_SECURITY_NETWORK=y

前几次编译都不成功,好像编译时重新配置内核,立马^C,

然后又一次次偿试,终于可以了。

到这里我发现了一个问题,一般情况了我重新编译内核都不会

make clean 而这次编译了7分钟,所以我觉得它应该将内核重新编译了一遍,以前编译时只要很短的时间,特别是改动很少的时候,因为它没有全部重新编译,只是编译了那些配置改变了的部分,而当它们的依赖关系比较严重时,系统就会自动全部重新编译,所以以后当内核改0动比较大时,最好先make clean下

最后终于安装成功了,但确不能登录,试了好几个方法

drcomcd

drcomc login

drcomc logout

都不行,经过好多次试验才可以上网了

后来发现只有以root用户登录后,

1。drcomd

2登录:drcomc login

3.登出:drcomc logout

然后就一切OK了,然后再以普通用户登录就可以了。

我是在用普通用户登录后,然后Ctrl +Alt +F1,进入一个终端用root登录, 再dromd,drcomc login

登录成功后,再返回到图形界面: Ctrl +Alt +F7

下面是我的调试信息,希望你在检索进能够检索到:

make
make -C drcomc
make[1]: Entering directory `/home/pjq/drcom-1.3.7/drcomc’
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o drcomc.o drcomc.c
gcc drcomc.o -o drcomc
make[1]: Leaving directory `/home/pjq/drcom-1.3.7/drcomc’
make -C drcomd
make[1]: Entering directory `/home/pjq/drcom-1.3.7/drcomd’
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o drcomd.o drcomd.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o daemon.o daemon.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o cleanup.o cleanup.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o dialog.o dialog.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o handle.o handle.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o init.o init.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o keepalive.o keepalive.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o login.o login.c
login.c: 在函数 ‘drcom_login’ 中:
login.c:50: 警告:未使用的参数 ‘timeout’
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o logout.o logout.c
logout.c: 在函数 ‘drcom_logout’ 中:
logout.c:34: 警告:未使用的参数 ‘timeout’
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o md5.o md5.c
md5.c:131:36: 警告:使用 C99 long long 整数常量
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o misc.o misc.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o passwd.o passwd.c
passwd.c: 在函数 ‘drcom_passwd’ 中:
passwd.c:32: 警告:未使用的参数 ‘timeout’
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o readconf.o readconf.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o watchport.o watchport.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o getaddr.o getaddr.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o log.o log.c
log.c: 在函数 ‘dbg’ 中:
log.c:34: 警告:未使用的参数 ‘format’
gcc -lm -lpthread drcomd.o daemon.o cleanup.o dialog.o handle.o init.o keepalive.o login.o logout.o md5.o misc.o passwd.o readconf.o watchport.o getaddr.o log.o -o drcomd
make[1]: Leaving directory `/home/pjq/drcom-1.3.7/drcomd’
make -C kmod
make[1]: Entering directory `/home/pjq/drcom-1.3.7/kmod’
make -C /lib/modules/2.6.22-gentoo-r9/build M=/home/pjq/drcom-1.3.7/kmod modules
make[2]: Entering directory `/usr/src/linux-2.6.22-gentoo-r9′
CC [M] /home/pjq/drcom-1.3.7/kmod/init.o
CC [M] /home/pjq/drcom-1.3.7/kmod/proc.o
CC [M] /home/pjq/drcom-1.3.7/kmod/proto.o
/home/pjq/drcom-1.3.7/kmod/proto.c: 在函数 ‘init_hijack’ 中:
/home/pjq/drcom-1.3.7/kmod/proto.c:450: 错误:‘security_ops’ 未声明 (在此函数内第一次使用)
/home/pjq/drcom-1.3.7/kmod/proto.c:450: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
/home/pjq/drcom-1.3.7/kmod/proto.c:450: 错误:所在的函数内只报告一次。)
/home/pjq/drcom-1.3.7/kmod/proto.c: 在函数 ‘cleanup_hijack’ 中:
/home/pjq/drcom-1.3.7/kmod/proto.c:461: 错误:‘security_ops’ 未声明 (在此函数内第一次使用)
make[3]: *** [/home/pjq/drcom-1.3.7/kmod/proto.o] 错误 1
make[2]: *** [_module_/home/pjq/drcom-1.3.7/kmod] 错误 2
make[2]: Leaving directory `/usr/src/linux-2.6.22-gentoo-r9′
make[1]: *** [default] 错误 2
make[1]: Leaving directory `/home/pjq/drcom-1.3.7/kmod’
make: *** [kmod] 错误 2
make
make -C drcomc
make[1]: Entering directory `/home/pjq/drcom-1.3.7/drcomc’
make[1]: Nothing to be done for `all’.
make[1]: Leaving directory `/home/pjq/drcom-1.3.7/drcomc’
make -C drcomd
make[1]: Entering directory `/home/pjq/drcom-1.3.7/drcomd’
make[1]: Nothing to be done for `all’.
make[1]: Leaving directory `/home/pjq/drcom-1.3.7/drcomd’
make -C kmod
make[1]: Entering directory `/home/pjq/drcom-1.3.7/kmod’
make -C /lib/modules/2.6.22-gentoo-r9/build M=/home/pjq/drcom-1.3.7/kmod modules
make[2]: Entering directory `/usr/src/linux-2.6.22-gentoo-r9′
CC [M] /home/pjq/drcom-1.3.7/kmod/proto.o
/home/pjq/drcom-1.3.7/kmod/proto.c: 在函数 ‘init_hijack’ 中:
/home/pjq/drcom-1.3.7/kmod/proto.c:453: 错误:提领指向不完全类型的指针
/home/pjq/drcom-1.3.7/kmod/proto.c:454: 错误:提领指向不完全类型的指针
/home/pjq/drcom-1.3.7/kmod/proto.c: 在函数 ‘cleanup_hijack’ 中:
/home/pjq/drcom-1.3.7/kmod/proto.c:461: 错误:提领指向不完全类型的指针
/home/pjq/drcom-1.3.7/kmod/proto.c:462: 错误:提领指向不完全类型的指针
make[3]: *** [/home/pjq/drcom-1.3.7/kmod/proto.o] 错误 1
make[2]: *** [_module_/home/pjq/drcom-1.3.7/kmod] 错误 2
make[2]: Leaving directory `/usr/src/linux-2.6.22-gentoo-r9′
make[1]: *** [default] 错误 2
make[1]: Leaving directory `/home/pjq/drcom-1.3.7/kmod’
make: *** [kmod] 错误 2
localhost drcom-1.3.7 # make
make -C drcomc
make[1]: Entering directory `/home/pjq/drcom-1.3.7/drcomc’
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o drcomc.o drcomc.c
gcc drcomc.o -o drcomc
make[1]: Leaving directory `/home/pjq/drcom-1.3.7/drcomc’
make -C drcomd
make[1]: Entering directory `/home/pjq/drcom-1.3.7/drcomd’
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o drcomd.o drcomd.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o daemon.o daemon.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o cleanup.o cleanup.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o dialog.o dialog.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o handle.o handle.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o init.o init.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o keepalive.o keepalive.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o login.o login.c
login.c: In function ‘drcom_login’:
login.c:50: warning: unused parameter ‘timeout’
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o logout.o logout.c
logout.c: In function ‘drcom_logout’:
logout.c:34: warning: unused parameter ‘timeout’
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o md5.o md5.c
md5.c:131:36: warning: use of C99 long long integer constant
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o misc.o misc.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o passwd.o passwd.c
passwd.c: In function ‘drcom_passwd’:
passwd.c:32: warning: unused parameter ‘timeout’
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o readconf.o readconf.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o watchport.o watchport.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o getaddr.o getaddr.c
gcc -Wall -W -Wstrict-prototypes -Wmissing-prototypes -pedantic -I/home/pjq/drcom-1.3.7/include -O2 -c -o log.o log.c
log.c: In function ‘dbg’:
log.c:34: warning: unused parameter ‘format’
gcc -lm -lpthread drcomd.o daemon.o cleanup.o dialog.o handle.o init.o keepalive.o login.o logout.o md5.o misc.o passwd.o readconf.o watchport.o getaddr.o log.o -o drcomd
make[1]: Leaving directory `/home/pjq/drcom-1.3.7/drcomd’
make -C kmod
make[1]: Entering directory `/home/pjq/drcom-1.3.7/kmod’
make -C /lib/modules/2.6.22-gentoo-r9/build M=/home/pjq/drcom-1.3.7/kmod modules
make[2]: Entering directory `/usr/src/gentoolinux/linux-2.6.22-gentoo-r9′
CC [M] /home/pjq/drcom-1.3.7/kmod/init.o
CC [M] /home/pjq/drcom-1.3.7/kmod/proc.o
CC [M] /home/pjq/drcom-1.3.7/kmod/proto.o
/home/pjq/drcom-1.3.7/kmod/proto.c: In function ‘init_hijack’:
/home/pjq/drcom-1.3.7/kmod/proto.c:453: error: dereferencing pointer to incomplete type
/home/pjq/drcom-1.3.7/kmod/proto.c:454: error: dereferencing pointer to incomplete type
/home/pjq/drcom-1.3.7/kmod/proto.c: In function ‘cleanup_hijack’:
/home/pjq/drcom-1.3.7/kmod/proto.c:461: error: dereferencing pointer to incomplete type
/home/pjq/drcom-1.3.7/kmod/proto.c:462: error: dereferencing pointer to incomplete type
make[3]: *** [/home/pjq/drcom-1.3.7/kmod/proto.o] 错误 1
make[2]: *** [_module_/home/pjq/drcom-1.3.7/kmod] 错误 2
make[2]: Leaving directory `/usr/src/gentoolinux/linux-2.6.22-gentoo-r9′
make[1]: *** [default] 错误 2
make[1]: Leaving directory `/home/pjq/drcom-1.3.7/kmod’
make: *** [kmod] 错误 2
localhost drcom-1.3.7 # drcomcd
1206323834 DEBUG drcomcd: Redirecting stderr to /var/log/drcomcd…
Segmentation fault
localhost drcom-1.3.7 # drcomc login
1206323840 DEBUG drcomc: Creating socket…
1206323840 DEBUG drcomc: Connecting…
drcomc: Connect: No such file or directory
localhost drcom-1.3.7 # drcomc logout
1206323843 DEBUG drcomc: Creating socket…
1206323843 DEBUG drcomc: Connecting…
drcomc: Connect: No such file or directory

sudo gedit /etc/apt/mirror.list


############# config ##################
#
set base_path /media/sda6/var/spool/apt-mirror
#
# if you change the base path you must create the directories below with write privlages
#
set mirror_path $base_path/mirror
set skel_path $base_path/skel
set var_path $base_path/var
# set cleanscript $var_path/clean.sh
# set defaultarch <running host architecture>
set nthreads 5
set tilde 0
#
############# end config ##############
#ubuntu-cn
deb http://archive.ubuntu.org.cn/ubuntu-cn/ gutsy main restricted universe multiverse
#中国科技大学(USTC) ubuntu 7.10 源
deb http://debian.ustc.edu.cn/ubuntu/ gutsy main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ gutsy-backports restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ gutsy-proposed main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ gutsy-security main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ gutsy-updates main restricted universe multiverse