热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

linuxhme目录,Linux下PPPOE

Linux下PPPOE安装环境:【Centos6.4.x86_64操作系统】第一步:先下载最新的pppoe软件安装包,然后使用ftp软件把

Linux下PPPOE

安装环境:【Centos6.4.x86_64 操作系统】

第一步:先下载最新的pppoe软件安装包,然后使用ftp软件把它拷贝到Linux系统的文件目录下,具体操作如下:

4f9131fd0c434132bea8a0e1192f72ae.png

从上图可以看到pppoe软件安装包已经拷贝到了Linux系统目录下,同时还可以通过其他命令来查看,如下:

[root@huangzhong ~]# ll

total 297724

drwx------. 7 root root      4096 Apr  9 08:09 8192

drwxr-xr-x. 2 root root      4096 Mar 29 05:54 Desktop

drwxr-xr-x. 2 root root      4096 Mar 29 05:54 Documents

drwxr-xr-x. 2 root root      4096 Mar 29 05:54 Downloads

drwxr-xr-x. 2 root root      4096 Mar 29 05:54 Music

drwxr-xr-x. 2 root root      4096 Mar 29 05:54 Pictures

-rw-r--r--. 1 root root 304382512 Jan 17 19:30 mysql-5.6.15-linux-glibc2.5-x86_64.tar.gz

-rw-r--r--. 1 root root    223234 Apr 13 19:01 rp-pppoe-3.11.tar.gz

-rw-r--r--. 1 root root    192808 Mar 20  2013 vsftpd-3.0.2.tar.gz

第二步:从上面可以猜测这软件包应该是源码安装包,所以在这把它解压到源码的目录下,具体操作如下:

root@huangzhong ~]# tar -zxvf rp-pppoe-3.11.tar.gz -C /usr/local/src/

rp-pppoe-3.11/

rp-pppoe-3.11/go-gui

rp-pppoe-3.11/README

rp-pppoe-3.11/doc/LICENSE

rp-pppoe-3.11/man/pppoe-setup.8

rp-pppoe-3.11/scripts/pppoe-setup.in

rp-pppoe-3.11/scripts/pppoe-start.in

rp-pppoe-3.11/scripts/pppoe-stop.in

rp-pppoe-3.11/src/

rp-pppoe-3.11/src/plugin/

rp-pppoe-3.11/src/pppoe-sniff.c

rp-pppoe-3.11/src/pppoe-server.c

rp-pppoe-3.11/src/ppp.c

rp-pppoe-3.11/src/relay.h

rp-pppoe-3.11/src/Makefile.in

rp-pppoe-3.11/src/configure.in

rp-pppoe-3.11/src/plugin.c

rp-pppoe-3.11/src/libevent/

rp-pppoe-3.11/src/libevent/event.c

从上面可以看出这确实是个源码安装包,下面就是按照源码的安装步骤进行安装

第三步:进入解压的目录下查看解压问价,并进入解压后的文件目录查看有没有安装说明:

[root@huangzhong ~]# cd /usr/local/src/

[root@huangzhong src]# ll

total 8

drwxr-xr-x. 8 user1 user1 4096 Aug 18  2012 rp-pppoe-3.11

drwxr-x--x. 8  1000  1000 4096 Apr  9 04:56 vsftpd-3.0.2

进入解压后的pppoe目录下查看有没有安装说明:

[root@huangzhong rp-pppoe-3.11]# ll

total 48

-rw-r--r--. 1 user1 user1 1882 Aug 18  2012 README

-rw-r--r--. 1 user1 user1  561 Aug 18  2012 SERVPOET

drwxr-xr-x. 2 user1 user1 4096 Aug 18  2012 configs

drwxr-xr-x. 2 user1 user1 4096 Aug 18  2012 doc

-rwxr-xr-x. 1 user1 user1  845 Aug 18  2012 go

-rwxr-xr-x. 1 user1 user1 1941 Aug 18  2012 go-gui

drwxr-xr-x. 3 user1 user1 4096 Aug 18  2012 gui

drwxr-xr-x. 2 user1 user1 4096 Aug 18  2012 man

-rw-r--r--. 1 user1 user1 4109 Aug 18  2012 rp-pppoe.spec

drwxr-xr-x. 2 user1 user1 4096 Aug 18  2012 scripts

drwxr-xr-x. 4 user1 user1 4096 Aug 18  2012 src

从上面我们看到了README文件

第四步:打开README,查看有没有安装要求或步骤,具体如下:

[root@huangzhong rp-pppoe-3.11]# vim README

打开README文件后我们可以看到以下安装步骤:

Compile and install pppd if you don't already have it.  Then:

1) Unpack:

$ tar xzvf rp-pppoe-xxx.tar.gz

2) Change to source directory:

$ cd src

3) Configure:

$ ./configure

4) Compile:

$ make

4) Install (this step must be done as root)

# make install

5) Now read doc/HOW-TO-CONNECT

第五步:按照上面的步骤进行操作,安装步骤1已经完成接下就是完成2和3,进入到src目录下进行执行编译,具体操作如下:

[root@huangzhong rp-pppoe-3.11]# cd src/

[root@huangzhong src]# ./configure

checking for gcc... gcc

checking whether the C compiler works... yes

checking for C compiler default output file name... a.out

checking for suffix of executables...

checking whether we are cross compiling... no

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 ISO C89... none needed

checking for ranlib... ranlib

checking how to run the C preprocessor... gcc -E

pppoe pppoe-server pppoe-sniff pppoe-relay

Type 'make' to compile the software

从上面可以看出编译已经完成,接下来执行make命令:

root@huangzhong src]# make

gcc -g -O2 -fno-strict-aliasing -Wall -Wstrict-prototypes    '-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.11"' -c -o pppoe.o pppoe.c

Type 'make install' as root to install the software.

从上面可以看出make已执行完,接下来操作要执行make install命令:

[root@huangzhong 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

Type 'pppoe-setup' to configure the software.

从上面可以看出整个安装已经完成了。

第六步:找到.configs编译后的安装目录,可以使用以下命令找到.config的默认安装目录:

[root@huangzhong src]# ./configure --help

`configure' configures this package to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

Installation directories:

--prefix=PREFIX         install architecture-independent files in PREFIX

[/usr]

--exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX

[PREFIX]

以上可以看到安装默认目录,然后进入默认目录进行查看,看看有没有要找的文件,具体操作如下:

[root@huangzhong src]# ll /usr/sbin/ |grep pppoe

-rwxr-xr-x. 1 root root       96542 Apr 13 19:46pppoe

-rwxr-xr-x. 1 root root        9198 Apr 13 19:46pppoe-connect

-r-xr-xr-x. 1 root root       16160 Aug 23  2010 pppoe-discovery

-rwxr-xr-x. 1 root root       85506 Apr 13 19:46 pppoe-relay

-rwxr-xr-x. 1 root root      146842 Apr 13 19:46 pppoe-server

-rwxr-xr-x. 1 root root        9552 Apr 13 19:46pppoe-setup

-rwxr-xr-x. 1 root root       53795 Apr 13 19:46 pppoe-sniff

-rwxr-xr-x. 1 root root        5552 Apr 13 19:46pppoe-start

-rwxr-xr-x. 1 root root        2116 Apr 13 19:46 pppoe-status

-rwxr-xr-x. 1 root root        2273 Apr 13 19:46pppoe-stop

第七步:按照上面安装完成的步骤执行pppoe-setup

[root@huangzhong 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):user1(输入账号)

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 eth0):(按回车默认eth0)

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):(按回车表示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:server(表示是服务器DNS默认自动分配,具体解释可以上两行蓝色部分)

PASSWORD

>>> Please enter your PPPoE password:(输入密码)

>>> Please re-enter your PPPoE password(确认密码)

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):0(防火墙的配置,具体可以看上面的解释)

** Summary of what you entered **   //总结你的配置

Ethernet Interface: eth0

User name:          user1

Activate-on-demand: No

DNS addresses:      Supplied by ISP's server

Firewalling:        NONE

>>> Accept these settings and adjust configuration files (y/n)?Y(是否同意上面配置)

同上上面的配置后保存生成以下文件:

Adjusting /etc/ppp/pppoe.conf

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.

第八步:进行pppoe拨号,具体操作如下:

[root@huangzhong src]# pppoe-start

..........(如果你插网线了会显示拨号成功,然后输入用户名和密码就拨号成功了)

这样整个pppoe安装就完成了



推荐阅读
  • centos安装Mysql的方法及步骤详解
    本文介绍了centos安装Mysql的两种方式:rpm方式和绿色方式安装,详细介绍了安装所需的软件包以及安装过程中的注意事项,包括检查是否安装成功的方法。通过本文,读者可以了解到在centos系统上如何正确安装Mysql。 ... [详细]
  • 本文介绍了如何使用C#制作Java+Mysql+Tomcat环境安装程序,实现一键式安装。通过将JDK、Mysql、Tomcat三者制作成一个安装包,解决了客户在安装软件时的复杂配置和繁琐问题,便于管理软件版本和系统集成。具体步骤包括配置JDK环境变量和安装Mysql服务,其中使用了MySQL Server 5.5社区版和my.ini文件。安装方法为通过命令行将目录转到mysql的bin目录下,执行mysqld --install MySQL5命令。 ... [详细]
  • 安装mysqlclient失败解决办法
    本文介绍了在MAC系统中,使用django使用mysql数据库报错的解决办法。通过源码安装mysqlclient或将mysql_config添加到系统环境变量中,可以解决安装mysqlclient失败的问题。同时,还介绍了查看mysql安装路径和使配置文件生效的方法。 ... [详细]
  • 本文介绍了在rhel5.5操作系统下搭建网关+LAMP+postfix+dhcp的步骤和配置方法。通过配置dhcp自动分配ip、实现外网访问公司网站、内网收发邮件、内网上网以及SNAT转换等功能。详细介绍了安装dhcp和配置相关文件的步骤,并提供了相关的命令和配置示例。 ... [详细]
  • CentOS 6.5安装VMware Tools及共享文件夹显示问题解决方法
    本文介绍了在CentOS 6.5上安装VMware Tools及解决共享文件夹显示问题的方法。包括清空CD/DVD使用的ISO镜像文件、创建挂载目录、改变光驱设备的读写权限等步骤。最后给出了拷贝解压VMware Tools的操作。 ... [详细]
  • 本文讨论了在openwrt-17.01版本中,mt7628设备上初始化启动时eth0的mac地址总是随机生成的问题。每次随机生成的eth0的mac地址都会写到/sys/class/net/eth0/address目录下,而openwrt-17.01原版的SDK会根据随机生成的eth0的mac地址再生成eth0.1、eth0.2等,生成后的mac地址会保存在/etc/config/network下。 ... [详细]
  • Imtryingtofigureoutawaytogeneratetorrentfilesfromabucket,usingtheAWSSDKforGo.我正 ... [详细]
  • 本文介绍了在CentOS上安装Python2.7.2的详细步骤,包括下载、解压、编译和安装等操作。同时提供了一些注意事项,以及测试安装是否成功的方法。 ... [详细]
  • Centos下安装memcached+memcached教程
    本文介绍了在Centos下安装memcached和使用memcached的教程,详细解释了memcached的工作原理,包括缓存数据和对象、减少数据库读取次数、提高网站速度等。同时,还对memcached的快速和高效率进行了解释,与传统的文件型数据库相比,memcached作为一个内存型数据库,具有更高的读取速度。 ... [详细]
  • Linux下安装免费杀毒软件ClamAV及使用方法
    本文介绍了在Linux系统下安装免费杀毒软件ClamAV的方法,并提供了使用该软件更新病毒库和进行病毒扫描的指令参数。同时还提供了官方安装文档和下载地址。 ... [详细]
  • Python项目实战10.2:MySQL读写分离性能优化
    本文介绍了在Python项目实战中进行MySQL读写分离的性能优化,包括主从同步的配置和Django实现,以及在两台centos 7系统上安装和配置MySQL的步骤。同时还介绍了创建从数据库的用户和权限的方法。摘要长度为176字。 ... [详细]
  • LINUX学习之centos7营救模式
    今天卸载软件的时候,不小心把GNOME的一些组件给卸了,导致桌面无法正常开启,会卡在启动过程中,而我的开机启动模式又是设置为图形界面,所以一开LINUX就卡住了,进入不了命令行界面 ... [详细]
  • centos6.8 下nginx1.10 安装 ... [详细]
  • PHP程序员玩转Linux系列 搭建FTP代码开发环境
    PHP程序员玩转Linux系列搭建FTP代码开发环境-PHP程序员玩转Linux系列文章:有些同学可能觉得我写的都是啥yum安装的,随便配置一下而已,没啥技术含量,我的目的是让大家 ... [详细]
  • Java容器中的compareto方法排序原理解析
    本文从源码解析Java容器中的compareto方法的排序原理,讲解了在使用数组存储数据时的限制以及存储效率的问题。同时提到了Redis的五大数据结构和list、set等知识点,回忆了作者大学时代的Java学习经历。文章以作者做的思维导图作为目录,展示了整个讲解过程。 ... [详细]
author-avatar
aguiladesilvo_502
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有