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功能已被關閉。)