⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 407-410.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTML
字号:
<HTML>

<HEAD>

<TITLE>Linux Configuration and Installation:Linux and the Internet</TITLE>

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!--ISBN=1558285660//-->

<!--TITLE=Linux Configuration and Installation//-->

<!--AUTHOR=Patrick Volkerding//-->

<!--AUTHOR=Kevin Reichard//-->

<!--AUTHOR=Eric Foster//-->

<!--PUBLISHER=IDG Books Worldwide, Inc.//-->

<!--IMPRINT=M & T Books//-->

<!--CHAPTER=9//-->

<!--PAGES=407-410//-->

<!--UNASSIGNED1//-->

<!--UNASSIGNED2//-->



<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="404-407.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="410-414.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>

<P><BR></P>

<H4 ALIGN="LEFT"><A NAME="Heading6"></A><FONT COLOR="#000077">Setting up a PPP Connection</FONT></H4>

<P>Here are the steps you&#146;ll want to follow to establish a PPP connection to an Internet Service Provider, or ISP. In these situations, you&#146;re calling the same phone number and are dynamically allocated an IP address each time you login the ISP&#146;s computer.

</P>

<P>First, you&#146;ll need to make sure that your local permissions are set up correctly. When logged in as <B>root</B>, you should edit your <B>/etc/hosts.deny</B> file to add the following line:</P>

<!-- CODE SNIP //-->

<PRE>

     ALL: ALL

</PRE>

<!-- END CODE SNIP //-->

<P>This prevents others from logging on your system via the Internet when you&#146;re connected to your ISP. However, you do want to allow yourself access to your own machine (we assume you do, anyway), so edit your <B>/etc/hosts.allow</B> file to add the following line:</P>

<!-- CODE SNIP //-->

<PRE>

     ALL: 127.0.0.1

</PRE>

<!-- END CODE SNIP //-->

<P>If you haven&#146;t done so already, you should give your own machine a name (we told how to change this in Chapter 2). This information is found in <B>/etc/HOSTNAME</B>.</P>

<P>Next, you&#146;ll need to tell your Linux system where to find data on the Internet. This involves adding the name of your service provider and a DNS server to the <B>/etc/resolv.conf</B> file, in the following format:</P>

<!-- CODE SNIP //-->

<PRE>

     search mr.net

     nameserver <I>xxx.xxx.xxx.xxx</I>

</PRE>

<!-- END CODE SNIP //-->

<P>In this example, we told Linux to look for things like news and mail at <I>mr.net</I>. In the place of <I>xxx.xxx.xxx.xxx</I> you&#146;ll provide a DNS address as provided by your ISP.</P>

<P>You&#146;ll also want to take a look at <B>/etc/hosts</B>. It should contain two lines, looking something like this:</P>

<!-- CODE SNIP //-->

<PRE>

     127.0.0.1 localhost

     0.0.0.0   gilbert

</PRE>

<!-- END CODE SNIP //-->

<P>If <I>127.0.0.1</I> is used for your machine name, change it. This should not be used when a connection to the Internet is made, because it may conflict with some Internet services.</P>

<P>Finally, you&#146;ll want to give Linux the username and password provided to you by your ISP in the <B>/etc/ppp/pap-secrets</B> file. This line will look something like this:</P>

<!-- CODE SNIP //-->

<PRE>

     reichard * <I>password</I>

</PRE>

<!-- END CODE SNIP //-->

<P>where <I>password</I> is the password.</P>

<P>One more step before you make a connection: You&#146;ll need to create a <B>/etc/ppp/chatscript</B> to include information about your ISP, particularly a phone number. The following script works with most modems:</P>

<!-- CODE //-->

<PRE>

  TIMEOUT 5

  '' ATZ

  OK ATDT<I>xxx-xxxx</I>

  ABORT 'NO CARRIER'

  ABORT BUSY

  ABORT 'NO DIALTONE'

  ABORT WAITING

  TIMEOUT 45

  CONNECT "We are connected!"

  TIMEOUT 5

  "name:" reichard@mr.net

  "word:" <I>password</I>

  in&gt; ppp

</PRE>

<!-- END CODE //-->

<P>where <I>xxx-xxxx</I> is the phone number of your ISP. The final three lines are tailored to our ISP, which presents two prompts (<I>username:</I> and <I>password:</I>) as well as a command line for launching <B>ppp</B> on the host computer. You&#146;ll want to change this for your specific ISP.</P>

<P>Once connected, you should be able to use any of the Internet tools presented here.</P>

<H3><A NAME="Heading7"></A><FONT COLOR="#000077">Internet Tools</FONT></H3>

<P>After you work out your connections to the Internet, you can take advantage of the network tools available under Linux.

</P>

<P>We&#146;ll begin with a discussion of Internet mail, then we&#146;ll discuss other Internet goodies.</P>

<H4 ALIGN="LEFT"><A NAME="Heading8"></A><FONT COLOR="#000077">Using Electronic Mail</FONT></H4>

<P>The ability to send electronic messages to individuals, groups of people, or everyone in the company is not one of the flashiest features of the Linux operating system, but it is certainly one of the most used. Other networking systems, particularly from the MS-DOS world (like Novell NetWare) lack basic electronic-mail (or e-mail) capabilities, while other operating systems featuring built-in electronic mail lack the other extensive capabilities featured in Linux.

</P>

<P>The mail program has been an important part of UNIX almost since the very beginning. As UNIX evolved, so has mail&#151;to an extent. The actual electronic-mail mechanisms are similar to the original mail mechanisms; changes mainly concern how a user interacts with a mail program. The procedures described here may not appear exactly the same on your system, as there are many mail programs, both UNIX- and X Window-based, that vary in how they present information to the user.</P>

<P>Linux gives you a few options for reading and sending mail, starting with the <B>mailx</B> command and ending with programs like <B>elm</B> and <B>pine</B>, which ship on the accompanying CD-ROMs.</P><P><BR></P>

<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="404-407.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="410-414.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>





</td>
</tr>
</table>

<!-- begin footer information -->





</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -