前段時間下載了紅帽的linux,版本為redhat 9.0,整整刻了三張CD。最初是為了體驗一下linux下QQ聊天軟件的功能,最后因內核太低(官方推薦內核在2.6以上,我下載的版本是2.4)而告終。最大的收獲是了解了linux下文件系統及linux下軟件與windows的不同,還有linux下ADSL的連接設置。
linux下局域網的連接很簡單,在菜單的網絡設置里,填好IP地址及子網掩碼就OK了,ADSL的連接要費些周折了。前面的博文里介紹了如何設置windows下不用路由自動撥號上網的技巧,linux下也有相同點,就是要一步一步的輸入上網信息,建立連接。不同點就是在linux要通過輸入指令來完成ADSL的設置。
首先打開終端,在終端里輸入adsl-setup ,根據提示,完成設置:
[[email protected] root]# adsl-setup
Welcome to the ADSL client setup. First, I will run some checks on
system to make sure the PPPoE client is installed properly…
LOGIN NAME
Enter your Login Name (default root): (username) ‘此處輸入ADSL的用戶名。
INTERFACE
Enter the Ethernet interface connected to the ADSL modem For
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 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 dynamic DNS addresses’,
enter
‘server’ (all lower-case) here. ’DNS地址,南京地區的主DNS為218.2.135.1,輔DNS為61.147.37.1其它地區可參照
當地ISP
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
PASSWORD ‘輸入ADSL密碼,默認為自己的電話號碼
Please enter your Password: ’再次輸入密碼
Please re-enter your Password:
USERCTRL
Please enter ‘yes’ (two letters, lower-case.) if you want to allow normal
user to start or stop DSL connection (default yes): y ‘是否允許普通用戶開啟或關閉ADSL連接,默認允許。
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. ’選擇防火墻的等級,0到2,按需要選。
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
Start this connection at boot time
Do you want to start this connection at boot time? ‘是否在啟動時自動連接?
Please enter no or yes (default no):y
**
Summary of what you entered ** ’以下是ADSL賬號設置信息
Ethernet
Interface: eth0
User name: nj007.cn
Activate-on-demand: No
DNS addresses: Supplied by ISP’s server
Firewalling: NONE
User Control: y
Accept these settings and adjust configuration files (y/n)? y ‘以上信息正確嗎,Y保存,N重填。
Adjusting
/etc/sysconfig/network-scripts/ifcfg-ppp0
Adjusting
/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.
[[email protected] root]#
經過以上設置之后,連接ADSL的linux就能正常連接Internet了。其實如果自己想研究Linux,完全不用像我那樣下載之后刻成光盤再一步一步的安裝,因為我的電腦有兩塊硬盤,我是拿那塊不常用的硬盤安裝的。在只有一塊硬盤的情況下可以選擇用虛擬機來安裝多系統。不推薦直接裝雙系統,因為那樣會引起硬盤引導區的錯誤造成兩個系統均不能正常啟動。
像現在比較出名的linux系統有ubuntu(烏班圖),redflag(中科紅旗)等,做的都很優秀。尤其是在去年打擊盜版期間,微軟的XP銷量并沒有明顯上升,linux的系統卻深入人心。linux的開源性使得現在有越來越多的編程愛好者加入了linux的開發中,同時linux也成為微軟最強悍的競爭對手。對于現在來說linux并沒有普及,更多的用于服務器或是工作站中,相信再過不久linux會走向更多的用戶電腦中。
新聞熱點
疑難解答