Welcome to the ADSL client setup. First, I will run some checks onyour system to make sure the PPPoE client is installed properly...
LOGIN NAME
Enter your Login Name (default root): ← 填入ADSL连接的用户名
INTERFACE
Enter the Ethernet interface connected to the ADSL modemFor Solaris, this is likely to be something like /dev/hme0.For Linux, it will be ethX, where 'X' 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 secondsafter which the link should be dropped. If you want the link tostay up permanently, enter 'no' (two letters, lower-case.)NOTE: Demand-activated links do not interact well with dynamic IPaddresses. 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 dynamic DNS addresses',enter 'server' (all lower-case) here.If you just press enter, I will assume you know what you aredoing and not modify your DNS setup.Enter the DNS information here: ← 如果知道DNS服务器的信息在此填入。不知道的情况按回车跳过
PASSWORD
Please enter your Password: ← 输入ADSL的连接密码Please re-enter your Password: ← 再次确认输入ADSL的连接密码
USERCTRL
Please enter 'yes' (two letters, lower-case.) if you want to allownormal user to start or stop DSL connection (default yes): no ← 填入no,不允许一般用户控制PPPoE的连接
FIREWALLING
Please choose the firewall rules to use. Note that these rules arevery basic. You are strongly encouraged to use a more sophisticatedfirewall setup; however, these will provide basic security. If youare running any servers on your machine, you must choose 'NONE' andset up firewalling yourself. Otherwise, the firewall rules will denyAccess to all standard servers like Web, e-mail, FTP, etc. If youare using SSH, the rules will block outgoing SSH connections whichallocate a privileged source port.
The firewall choices are:0 - NONE: This script will not set any firewall rules. You are responsiblefor ensuring the security of your machine. You are STRONGLYrecommended to use some kind of firewall rules.1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation2 - MASQUERADE: Appropriate for a machine acting as an Internet gatewayfor a LANChoose a type of firewall (0-2): 0 ← 输入0,不在这里使用防火墙
Start this connection at boot time
Do you want to start this connection at boot time?Please enter no or yes (default no): yes ← 填入yes,在系统启动时自动连接ADSL
** Summary of what you entered **
Ethernet Interface: eth0User name: [email protected]: NoDNS: Do not adjustFirewalling: NONEUser Control: noAccept these settings and adjust configuration files (y/n)? y ← 配置信息确认无误后,键入y同意设置Adjusting /etc/sysconfig/network-scripts/ifcfg-ppp0Adjusting /etc/ppp/chap-secrets and /etc/ppp/pap-secrets(But first backing it up to /etc/ppp/chap-secrets.bak)(But first backing it up to /etc/ppp/pap-secrets.bak)
?
Congratulations, it should be all set up!
Type '/sbin/ifup ppp0' to bring up your xDSL link and '/sbin/ifdown ppp0'to bring it down.Type '/sbin/adsl-status /etc/sysconfig/network-scripts/ifcfg-ppp0'to see the link status.
然后,启动ADSL连接。 [root@sample ~]# adsl-start ← 启动ADSL连接[root@sample ~]# ← 稍等片刻后若启动成功后出现提示符(无任何提示即意味着连接成功) 这时,通过“ifconfig”命令可以看到各网络接口的信息(IP地址等等)。[6] root邮件的转送 在系统出现错误或有重要通知发送邮件给root的时候,让系统自动转送到我们通常使用的邮箱中,这样方便查阅相关报告和日志。 [root@sample ~]# vi /etc/aliases ← 编辑aliases,添加如下行到文尾root: [email protected] ← 加入自己的邮箱地址[root@sample ~]# newaliases ← 重建aliasesdb/etc/aliases: 79 aliases, longest 19 bytes, 825 bytes total[root@sample ~]# echo test mail root ← 发送测试邮件给root 如果成功的话,会在刚刚填入的 [email protected] 的邮箱中收到测试的邮件。[7] locate命令用数据库更新及自动更新设定 locate命令是Linux下告诉搜索文件用的工具,它的原理和Windows下的“Google桌面搜索”有点类似,是通过事先建立数据库的方式,来达到高速查找目标文件的目的。 [root@sample ~]# vi /etc/updatedb.conf ← 编辑locate数据库更新配置文件DAILY_UPDATE=no ← 找到这一行,将“no”改为“yes” ↓DAILY_UPDATE=yes ← 变为此状态后,保存、退出[root@sample ~]# updatedb ← 运行locate数据库更新命令,稍等片刻…更新成功后出现提示符[8] 定义yum的非官方库 在服务器构建的过程中,我们将要用到的一些工具不存在于CentOS中yum的官方库中,所以需要定义yum的非官方库文件,让一些必需的工具通过yum也能够安装。 [root@sample ~]# vi /etc/yum.repos.d/dag.repo ← 建立dag.repo,定义非官方库[dag]name=Dag RPM Repository for Red Hat Enterprise Linuxbaseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/daggpgcheck=1enabled=1[root@sample ~]# rpm --import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt ← 导入非官方库的GPG[9] 停止打印服务 如果不准备提供打印服务,停止默认被设置为自动启动的打印服务。 [root@sample ~]# /etc/rc.d/init.d/cups stop ← 停止打印服务Stopping cups: [ OK ] ← 停止服务成功,出现“OK”[root@sample ~]# chkconfig cups off ← 禁止打印服务自动启动[root@sample ~]# chkconfig --list cups ← 确认打印服务自启动设置状态cups 0:off 1:off 2:off 3:off 4:off 5:off 6:off ← 0-6都为off的状态就OK(当前打印服务自启动被禁止中)[10] 停止ipv6 在CentOS默认的状态下,ipv6是被启用的状态。因为我们不使用ipv6,所以,停止ipv6,以最大限度保证安全和快速。 首先再次确认一下ipv6功能是不是被启动的状态。 [root@sample ~]# ifconfig -a ← 列出全部网络接口信息eth0 Link encap:Ethernet HWaddr 00:0C:29:B6:16:A3inet addr:192.168.0.13 Bcast:192.168.0.255 Mask:255.255.255.0inet6 addr: fe80::20c:29ff:feb6:16a3/64 Scope:LinkUP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1RX packets:84 errors:0 dropped:0 overruns:0 frame:0TX packets:93 errors:0 dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:1000RX bytes:10288 (10.0 KiB) TX bytes:9337 (9.1 KiB)Interrupt:185 Base address:0x1400
lo Link encap:Local Loopbackinet addr:127.0.0.1 Mask:255.0.0.0inet6 addr: ::1/128 Scope:HostUP LOOPBACK RUNNING MTU:16436 Metric:1RX packets:12 errors:0 dropped:0 overruns:0 frame:0TX packets:12 errors:0 dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:0RX bytes:952 (952.0 b) TX bytes:952 (952.0 b)
sit0 Link encap:IPv6-in-IPv4 ← 确认ipv6是被启动的状态NOARP MTU:1480 Metric:1RX packets:0 errors:0 dropped:0 overruns:0 frame:0TX packets:0 errors:0 dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:0RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) 然后修改相应配置文件,停止ipv6。 [root@sample ~]# vi /etc/modprobe.conf ← 修改相应配置文件,添加如下行到文尾:alias net-pf-10 offalias ipv6 off[root@sample ~]# shutdown -r now ← 重新启动系统,使设置生效 最后确认ipv6的功能已经被关闭。 [root@sample ~]# ifconfig -a ← 列出全部网络接口信息eth0 Link encap:Ethernet HWaddr 00:0C:29:B6:16:A3inet addr:192.168.0.13 Bcast:192.168.0.255 Mask:255.255.255.0inet6 addr: fe80::20c:29ff:feb6:16a3/64 Scope:LinkUP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1RX packets:84 errors:0 dropped:0 overruns:0 frame:0TX packets:93 errors:0 dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:1000RX bytes:10288 (10.0 KiB) TX bytes:9337 (9.1 KiB)Interrupt:185 Base address:0x1400 lo Link encap:Local Loopbackinet addr:127.0.0.1 Mask:255.0.0.0inet6 addr: ::1/128 Scope:HostUP LOOPBACK RUNNING MTU:16436 Metric:1RX packets:12 errors:0 dropped:0 overruns:0 frame:0TX packets:12 errors:0 dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:0RX bytes:952 (952.0 b) TX bytes:952 (952.0 b)(确认ipv6的相关信息没有被列出,说明ipv6功能已被关闭。)(出处:http://www.sheup.com)