当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 5 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : [分享]编译安装PPPOE
帖子发表于 : 2007-08-26 2:28 
头像

注册: 2006-09-21 14:28
帖子: 2376
送出感谢: 0 次
接收感谢: 0 次
localhost forGentoo # mv rp-pppoe-3.8 /usr/src/
localhost forGentoo # cd /usr/src/rp-pppoe-3.8/
localhost rp-pppoe-3.8 # ls
README configs go gui rp-pppoe.spec src
SERVPOET doc go-gui man scripts
localhost rp-pppoe-3.8 # cd src/
localhost src # ./configure
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for ranlib... ranlib
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking sys/dlpi.h usability... no
checking sys/dlpi.h presence... no
checking for sys/dlpi.h... no
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for unistd.h... (cached) yes
checking net/if_arp.h usability... yes
checking net/if_arp.h presence... yes
checking for net/if_arp.h... yes
checking netinet/if_ether.h usability... yes
checking netinet/if_ether.h presence... yes
checking for netinet/if_ether.h... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking sys/uio.h usability... yes
checking sys/uio.h presence... yes
checking for sys/uio.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for fcntl.h... (cached) yes
checking net/bpf.h usability... no
checking net/bpf.h presence... no
checking for net/bpf.h... no
checking netpacket/packet.h usability... yes
checking netpacket/packet.h presence... yes
checking for netpacket/packet.h... yes
checking net/ethernet.h usability... yes
checking net/ethernet.h presence... yes
checking for net/ethernet.h... yes
checking asm/types.h usability... yes
checking asm/types.h presence... yes
checking for asm/types.h... yes
checking linux/if_packet.h usability... yes
checking linux/if_packet.h presence... yes
checking for linux/if_packet.h... yes
checking linux/if_ether.h usability... yes
checking linux/if_ether.h presence... yes
checking for linux/if_ether.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/cdefs.h usability... yes
checking sys/cdefs.h presence... yes
checking for sys/cdefs.h... yes
checking net/if.h usability... yes
checking net/if.h presence... yes
checking for net/if.h... yes
checking net/if_dl.h usability... no
checking net/if_dl.h presence... no
checking for net/if_dl.h... no
checking net/if_ether.h usability... no
checking net/if_ether.h presence... no
checking for net/if_ether.h... no
checking net/if_types.h usability... no
checking net/if_types.h presence... no
checking for net/if_types.h... no
checking for netinet/if_ether.h... (cached) yes
checking for net/if_types.h... (cached) no
checking for net/if_dl.h... (cached) no
checking for linux/if.h... yes
checking for linux/if_pppox.h... yes
checking for an ANSI C-conforming const... yes
checking for pid_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct sockaddr_ll... yes
checking for N_HDLC line discipline... yes
checking for working memcmp... yes
checking for function prototypes... yes
checking whether setvbuf arguments are reversed... no
checking return type of signal handlers... void
checking for select... yes
checking for socket... yes
checking for strerror... yes
checking for strtol... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for unsigned short... yes
checking size of unsigned short... 2
checking for unsigned int... yes
checking size of unsigned int... 4
checking for unsigned long... yes
checking size of unsigned long... 4
checking for pppd... /usr/sbin/pppd
checking for echo... /usr/bin/echo
checking for setsid... /usr/bin/setsid
checking for id... /usr/bin/id
checking for Linux 2.4.X kernel-mode PPPoE support... yes
checking packing order of bit fields... reversed
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libevent/Makefile
config.status: creating ../scripts/pppoe-connect
config.status: creating ../scripts/pppoe-start
config.status: creating ../scripts/pppoe-stop
config.status: creating ../scripts/pppoe-init
config.status: creating ../scripts/pppoe-init-suse
config.status: creating ../scripts/pppoe-init-turbolinux
config.status: creating ../scripts/pppoe-setup
config.status: creating ../gui/Makefile
config.status: creating ../gui/tkpppoe
config.status: creating config.h
On this platform, the following targets will be built:
pppoe pppoe-server pppoe-sniff pppoe-relay
Type 'make' to compile the software.
localhost src # make
gcc -g -O2 -Wall -Wstrict-prototypes -ansi '-DPPPOE_PATH="/usr/sbin/pppoe"' '-DPPPD_PATH="/usr/sbin/pppd"' '-DPLUGIN_PATH="/etc/ppp/plugins/rp-pppoe.so"' '-DPPPOE_SERVER_OPTIONS="/etc/ppp/pppoe-server-options"' -Ilibevent '-DVERSION="3.8"' -c -o pppoe.o pppoe.c
gcc -g -O2 -Wall -Wstrict-prototypes -ansi '-DPPPOE_PATH="/usr/sbin/pppoe"' '-DPPPD_PATH="/usr/sbin/pppd"' '-DPLUGIN_PATH="/etc/ppp/plugins/rp-pppoe.so"' '-DPPPOE_SERVER_OPTIONS="/etc/ppp/pppoe-server-options"' -Ilibevent '-DVERSION="3.8"' -c -o if.o if.c
gcc -g -O2 -Wall -Wstrict-prototypes -ansi '-DPPPOE_PATH="/usr/sbin/pppoe"' '-DPPPD_PATH="/usr/sbin/pppd"' '-DPLUGIN_PATH="/etc/ppp/plugins/rp-pppoe.so"' '-DPPPOE_SERVER_OPTIONS="/etc/ppp/pppoe-server-options"' -Ilibevent '-DVERSION="3.8"' -c -o debug.o debug.c
gcc -g -O2 -Wall -Wstrict-prototypes -ansi '-DPPPOE_PATH="/usr/sbin/pppoe"' '-DPPPD_PATH="/usr/sbin/pppd"' '-DPLUGIN_PATH="/etc/ppp/plugins/rp-pppoe.so"' '-DPPPOE_SERVER_OPTIONS="/etc/ppp/pppoe-server-options"' -Ilibevent '-DVERSION="3.8"' -c -o common.o common.c
gcc -g -O2 -Wall -Wstrict-prototypes -ansi '-DPPPOE_PATH="/usr/sbin/pppoe"' '-DPPPD_PATH="/usr/sbin/pppd"' '-DPLUGIN_PATH="/etc/ppp/plugins/rp-pppoe.so"' '-DPPPOE_SERVER_OPTIONS="/etc/ppp/pppoe-server-options"' -Ilibevent '-DVERSION="3.8"' -c -o ppp.o ppp.c
gcc -g -O2 -Wall -Wstrict-prototypes -ansi '-DPPPOE_PATH="/usr/sbin/pppoe"' '-DPPPD_PATH="/usr/sbin/pppd"' '-DPLUGIN_PATH="/etc/ppp/plugins/rp-pppoe.so"' '-DPPPOE_SERVER_OPTIONS="/etc/ppp/pppoe-server-options"' -Ilibevent '-DVERSION="3.8"' -c -o discovery.o discovery.c
gcc -o pppoe pppoe.o if.o debug.o common.o ppp.o discovery.o
gcc -g -O2 -Wall -Wstrict-prototypes -ansi '-DPPPOE_PATH="/usr/sbin/pppoe"' '-DPPPD_PATH="/usr/sbin/pppd"' '-DPLUGIN_PATH="/etc/ppp/plugins/rp-pppoe.so"' '-DPPPOE_SERVER_OPTIONS="/etc/ppp/pppoe-server-options"' -Ilibevent '-DVERSION="3.8"' -c -o pppoe-server.o pppoe-server.c
gcc -g -O2 -Wall -Wstrict-prototypes -ansi '-DPPPOE_PATH="/usr/sbin/pppoe"' '-DPPPD_PATH="/usr/sbin/pppd"' '-DPLUGIN_PATH="/etc/ppp/plugins/rp-pppoe.so"' '-DPPPOE_SERVER_OPTIONS="/etc/ppp/pppoe-server-options"' -Ilibevent '-DVERSION="3.8"' -c -o md5.o md5.c
cd libevent && make
make[1]: Entering directory `/usr/src/rp-pppoe-3.8/src/libevent'
gcc -g -O2 -Wall -Wstrict-prototypes -ansi -I.. -c -o event.o event.c
gcc -g -O2 -Wall -Wstrict-prototypes -ansi -I.. -c -o event_tcp.o event_tcp.c
gcc -g -O2 -Wall -Wstrict-prototypes -ansi -I.. -c -o hash.o hash.c
gcc -g -O2 -Wall -Wstrict-prototypes -ansi -I.. -c -o event_sig.o event_sig.c
rm -f libevent.a
ar -cq libevent.a event.o event_tcp.o hash.o event_sig.o
ranlib libevent.a
make[1]: Leaving directory `/usr/src/rp-pppoe-3.8/src/libevent'
gcc -o pppoe-server pppoe-server.o if.o debug.o common.o md5.o -Llibevent -levent
gcc -g -O2 -Wall -Wstrict-prototypes -ansi '-DPPPOE_PATH="/usr/sbin/pppoe"' '-DPPPD_PATH="/usr/sbin/pppd"' '-DPLUGIN_PATH="/etc/ppp/plugins/rp-pppoe.so"' '-DPPPOE_SERVER_OPTIONS="/etc/ppp/pppoe-server-options"' -Ilibevent '-DVERSION="3.8"' -c -o pppoe-sniff.o pppoe-sniff.c
gcc -o pppoe-sniff pppoe-sniff.o if.o common.o debug.o
gcc -g -O2 -Wall -Wstrict-prototypes -ansi '-DPPPOE_PATH="/usr/sbin/pppoe"' '-DPPPD_PATH="/usr/sbin/pppd"' '-DPLUGIN_PATH="/etc/ppp/plugins/rp-pppoe.so"' '-DPPPOE_SERVER_OPTIONS="/etc/ppp/pppoe-server-options"' -Ilibevent '-DVERSION="3.8"' -c -o relay.o relay.c
gcc -o pppoe-relay relay.o if.o debug.o common.o

Type 'make install' as root to install the software.
localhost src # make install

Type 'make install' as root to install the software.
mkdir -p /usr/sbin
/usr/bin/install -c -m 755 pppoe /usr/sbin
/usr/bin/install -c -m 755 pppoe-server /usr/sbin
if test -x licensed-only/pppoe-server-control ; then /usr/bin/install -c -m 755 licensed-only/pppoe-server-control /usr/sbin; fi
if test -x pppoe-relay ; then /usr/bin/install -c -m 755 pppoe-relay /usr/sbin; fi
if test -x pppoe-sniff; then /usr/bin/install -c -m 755 pppoe-sniff /usr/sbin; fi
/usr/bin/install -c -m 755 ../scripts/pppoe-connect /usr/sbin
/usr/bin/install -c -m 755 ../scripts/pppoe-start /usr/sbin
/usr/bin/install -c -m 755 ../scripts/pppoe-status /usr/sbin
/usr/bin/install -c -m 755 ../scripts/pppoe-stop /usr/sbin
/usr/bin/install -c -m 755 ../scripts/pppoe-setup /usr/sbin
mkdir -p /usr/share/doc/rp-pppoe-3.8
/usr/bin/install -c -m 644 ../doc/CHANGES /usr/share/doc/rp-pppoe-3.8
/usr/bin/install -c -m 644 ../doc/KERNEL-MODE-PPPOE /usr/share/doc/rp-pppoe-3.8
/usr/bin/install -c -m 644 ../doc/HOW-TO-CONNECT /usr/share/doc/rp-pppoe-3.8
/usr/bin/install -c -m 644 ../doc/LICENSE /usr/share/doc/rp-pppoe-3.8
/usr/bin/install -c -m 644 ../README /usr/share/doc/rp-pppoe-3.8
/usr/bin/install -c -m 644 ../SERVPOET /usr/share/doc/rp-pppoe-3.8
/usr/bin/install -c -m 644 ../configs/pap-secrets /usr/share/doc/rp-pppoe-3.8
mkdir -p /usr/man/man8
for i in pppoe pppoe-server pppoe-sniff pppoe-relay ; do \
if test -f ../man/$i.8 ; then \
/usr/bin/install -c -m 644 ../man/$i.8 /usr/man/man8 || exit 1; \
fi; \
done
/usr/bin/install -c -m 644 ../man/pppoe-start.8 /usr/man/man8
/usr/bin/install -c -m 644 ../man/pppoe-stop.8 /usr/man/man8
/usr/bin/install -c -m 644 ../man/pppoe-status.8 /usr/man/man8
/usr/bin/install -c -m 644 ../man/pppoe-connect.8 /usr/man/man8
/usr/bin/install -c -m 644 ../man/pppoe-setup.8 /usr/man/man8
mkdir -p /usr/man/man5
/usr/bin/install -c -m 644 ../man/pppoe.conf.5 /usr/man/man5
mkdir -p /etc/ppp
mkdir -p /etc/ppp/plugins
echo "# Directory created by rp-pppoe for kernel-mode plugin" > /etc/ppp/plugins/README
# L2TP

Type 'pppoe-setup' to configure the software.
localhost src # pppoe-setup
Welcome to the Roaring Penguin PPPoE client setup. First, I will run
some checks on your system to make sure the PPPoE client is installed
properly...

Looks good! Now, please enter some information:

USER NAME

>>> Enter your PPPoE user name (default bxxxnxnx@sympatico.ca): lanyifan@zjjs.net

INTERFACE

>>> Enter the Ethernet interface connected to the DSL modem
For Solaris, this is likely to be something like /dev/hme0.
For Linux, it will be ethn, where 'n' is a number.
(default eth1):

Do you want the link to come up on demand, or stay up continuously?
If you want it to come up on demand, enter the idle time in seconds
after which the link should be dropped. If you want the link to
stay up permanently, enter 'no' (two letters, lower-case.)
NOTE: Demand-activated links do not interact well with dynamic IP
addresses. You may have some problems with demand-activated links.
>>> Enter the demand value (default no):

DNS

Please enter the IP address of your ISP's primary DNS server.
If your ISP claims that 'the server will provide DNS addresses',
enter 'server' (all lower-case) here.
If you just press enter, I will assume you know what you are
doing and not modify your DNS setup.
>>> Enter the DNS information here: 61.144.56.101
Please enter the IP address of your ISP's secondary DNS server.
If you just press enter, I will assume there is only one DNS server.
>>> Enter the secondary DNS server address here: 211.95.193.97

PASSWORD

>>> Please enter your PPPoE password:
>>> Please re-enter your PPPoE password:

FIREWALLING

Please choose the firewall rules to use. Note that these rules are
very basic. You are strongly encouraged to use a more sophisticated
firewall setup; however, these will provide basic security. If you
are running any servers on your machine, you must choose 'NONE' and
set up firewalling yourself. Otherwise, the firewall rules will deny
access to all standard servers like Web, e-mail, ftp, etc. If you
are using SSH, the rules will block outgoing SSH connections which
allocate a privileged source port.

The firewall choices are:
0 - NONE: This script will not set any firewall rules. You are responsible
for ensuring the security of your machine. You are STRONGLY
recommended to use some kind of firewall rules.
1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation
2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway
for a LAN
>>> Choose a type of firewall (0-2): 1

** Summary of what you entered **

Ethernet Interface: eth1
User name: lanyifan@zjjs.net
Activate-on-demand: No
Primary DNS: 61.144.56.101
Secondary DNS: 211.95.193.97
Firewalling: STANDALONE

>>> Accept these settings and adjust configuration files (y/n)? y
Adjusting /etc/ppp/pppoe.conf
Adjusting /etc/resolv.conf
(But first backing it up to /etc/resolv.conf-bak)
Adjusting /etc/ppp/pap-secrets and /etc/ppp/chap-secrets
(But first backing it up to /etc/ppp/pap-secrets-bak)
(But first backing it up to /etc/ppp/chap-secrets-bak)



Congratulations, it should be all set up!

Type 'pppoe-start' to bring up your PPPoE link and 'pppoe-stop' to bring
it down. Type 'pppoe-status' to see the link status.
localhost src # pppoe-start
. Connected!
localhost src #


_________________
http://lee.youxu.info/


页首
 用户资料  
 
2 楼 
 文章标题 :
帖子发表于 : 2007-08-26 2:30 
头像

注册: 2006-09-21 14:28
帖子: 2376
送出感谢: 0 次
接收感谢: 0 次
DNS可以在UB下获得

代码:
lee@LF824-alice:~$ cat /etc/resolv.conf
nameserver 61.144.56.101
nameserver 211.95.193.97
lee@LF824-alice:~$


_________________
http://lee.youxu.info/


页首
 用户资料  
 
3 楼 
 文章标题 :
帖子发表于 : 2007-08-26 2:33 
头像

注册: 2005-12-28 1:16
帖子: 3916
地址: 火星
系统: Ubuntu 12.10 X64
送出感谢: 1
接收感谢: 0 次
$ sudo emerge rp-pppoe

这样也可以


_________________
目前负债150多万


页首
 用户资料  
 
4 楼 
 文章标题 :
帖子发表于 : 2007-08-26 13:25 
头像

注册: 2006-09-21 14:28
帖子: 2376
送出感谢: 0 次
接收感谢: 0 次
xhy 写道:
$ sudo emerge rp-pppoe

这样也可以


就是用上面这个方法不行的,已经被三个以上的所谓高手"误导"……

自己编译一次,什么都好了.


_________________
http://lee.youxu.info/


页首
 用户资料  
 
5 楼 
 文章标题 :
帖子发表于 : 2007-09-23 1:45 
头像

注册: 2007-04-28 18:15
帖子: 133
送出感谢: 0 次
接收感谢: 0 次
好吧,说说我是怎么连接ADSL的
编译内核时加上对pppoe的支持
/etc/conf.d/net:
代码:
config_eth0=( "null" )
#dhcp_eth0="release nontp nonis"
config_ppp0=( "ppp" )
link_ppp0="eth0"
plugins_ppp0=( "pppoe" )
username_ppp0='ADSL帐号'
password_ppp0='ADSL密码'
pppd_ppp0=(
       "noauth"
       "defaultroute"
       "usepeerdns"
       "holdoff 3"
       "child-timeout 60"
       "lcp-echo-interval 15"
       "lcp-echo-failure 3"
       noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp
)

depend_ppp0() {
    need net.eth0
}


重点来了:我平时要ADSL和教育网切换着用,所以可能随时要更改网络设置:
要上教育网,先修改/etc/conf.d/net,将config_eth0修改为dhcp并把第二行注释前的#号去掉,然后/etc/init.d/net.eth0 stop,再/etc/init.d/net.eth0 start
要上ADSL,将config_eth0修改为null,然后/etc/init.d/net.eth0 stop,再/etc/init.d/net.ppp0 start

切换一下得5分钟……

真怀念ubuntu里面的网络漫游模式……


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 5 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 2 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译