099-103.html

来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 158 行

HTML
158
字号
<HTML>

<HEAD>

<TITLE>Linux Configuration and Installation:Installing Linux</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=2//-->

<!--PAGES=099-103//-->

<!--UNASSIGNED1//-->

<!--UNASSIGNED2//-->



<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="095-099.html">Previous</A></TD>

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

<TD><A HREF="103-106.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>

<P><BR></P>

<H3><A NAME="Heading25"></A><FONT COLOR="#000077">Booting the System</FONT></H3>

<P>After Linux has been installed, go ahead and reboot. If you&#146;ve installed LILO, you&#146;ll see it appear after the PC runs through its BIOS check. As Linux boots, you&#146;ll see a long Linux-related diagnostic, as Linux checks the system and makes sure everything is where it&#146;s supposed to be. For the most part, you can ignore any errors messages you see here (such as a proclamation that the name of the machine <I>darkstar</I> does not appear to be supported). After all the diagnostics, you&#146;ll finally be presented with a command prompt:</P>

<!-- CODE SNIP //-->

<PRE>

     Welcome to Linux 2.0.29.

     darkstar login:

</PRE>

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

<BLOCKQUOTE>

<P><FONT SIZE="-1"><HR><B>NOTE:&nbsp;&nbsp;</B>If you installed networking capabilities when you installed Slackware96, you were asked the name of your machine. This name should appear in the place of <I>darkstar</I>.<HR></FONT>

</BLOCKQUOTE>

<P>Because there are no users on the system, you&#146;ll login as the root user, so go ahead and type in <B>root</B> as the login. There will be no prompting for a password.</P>

<BLOCKQUOTE>

<P><FONT SIZE="-1"><HR><B>NOTE:&nbsp;&nbsp;</B>The <I>root user</I> is the supreme being on a UNIX system. Most of the traditional security tools within the UNIX operating system don&#146;t apply to the root user&#151;when logged in as <B>root</B>, you can do just about anything. It&#146;s generally not a good idea to use the UNIX system as the root user, however; the proscribed practice is to set up your own account and then save the root login only for those times when you&#146;re performing system administration.<HR></FONT>

</BLOCKQUOTE>

<P>After you&#146;re logged in, you&#146;ll see the following command prompt:

</P>

<!-- CODE SNIP //-->

<PRE>

     darkstar:~#

</PRE>

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

<P>A <I>command prompt</I> is where you enter commands into the UNIX system. Your first commands will be to change your machine name and to set up a user account for yourself.</P>

<H4 ALIGN="LEFT"><A NAME="Heading26"></A><FONT COLOR="#000077">Adding Users</FONT></H4>

<P>Your first action as the Linux supreme being is to set up an account for your daily usage. To do this, type the following at the command prompt:

</P>

<!-- CODE SNIP //-->

<PRE>

     darkstar:~# adduser

     Login name for new user (8 characters or less) []: kevinr

</PRE>

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

<P>The <B>adduser</B> command does exactly what it says: adds a new user to the system. In the previous example, the user <I>kevinr</I> has been added to the system. After specifying the username, you&#146;ll be asked additional information about the preferences of that user. Unless you&#146;re familiar with Linux, you&#146;ll want to stick with the defaults for now. (The defaults will be listed in brackets. Wherever there&#146;s a default, you can go ahead and hit the <B>Enter</B> key instead of typing in the default selection. In our example, we&#146;ll type in the defaults.) The entire sequence will look something like this:</P>

<!-- CODE //-->

<PRE>

     User id for kevinr [defaults to next avaliable]:

     Initial group for kevinr [users]: users

     Additional groups for kevinr []:

     kevinr&#146;s home directory [/home/kevinr]: /home/kevinr



     kevinr&#146;s shell [/bin/bash]: /bin/bash

     kevnir&#146;s account expiry date (MM/DD/YY) []:

     OK, I&#146;m about to make a new account. Here&#146;s what you entered so far.



     New login name: kevinr

     New UID: [Next available]

     Initial group: users

     Additional groups: [none]

     Home directory: /home/kevinr

     Shell: bin/bash

     Expiry date: [no expiration]

     This is it...if you want to bail out, hit Control-C. Otherwise,

     press ENTER and go ahead and make the new account.



     Making new account:



     Changing the user information for kevinr

     Enter the new value, or press return for the default



          Full Name []: Kevin Reichard

          Room Number []:

          Work Phone []:

          Home Phone []:

          Other []:



     Changing password for kevinr

     Enter the new password (minimum of 5, maximum of 8 characters)

     Please use a combination of upper and lower case letters and numbers.

     New password: &lt;new password1&gt;

     Re-enter new password: &lt;new password1&gt;

     Password changed.

     Done...

</PRE>

<!-- END CODE //-->

<P>If you&#146;re not planning on using Linux for anything but a single-user operating system, you don&#146;t need to worry about things like group ID and UID (which is short for <I>user ID</I>). And even if you do plan on using Linux on a network, you can change these parameters later.</P>

<P>Additionally, you probably noticed that the name <I>darkstar</I> appears as the name of your machine. You probably don&#146;t want to leave this as the name of your machine, so you should change it right off the bat. This name is contained in the file <B>/etc/HOSTNAME</B>, and the default is <B>darkstar.frop.org</B>. To change it, you&#146;ll use a text editor (in the example, we&#146;ll use <B>vi</B>) and edit this file. To load the <B>vi</B> text editor and the <B>/etc/HOSTNAME</B> file, use the following command line:</P>

<!-- CODE SNIP //-->

<PRE>

     darkstar:~# vi /etc/HOSTNAME

</PRE>

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

<P>You&#146;ll see a screen like the one in Figure 2.4.

</P>

<P><A NAME="Fig1"></A><A HREF="javascript:displayWindow('images/02-01.jpg',500,296 )"><IMG SRC="images/02-01t.jpg"></A>

<BR><A HREF="javascript:displayWindow('images/02-01.jpg',500,296)"><FONT COLOR="#000077"><B>Figure 2.4</B></FONT></A>&nbsp;&nbsp;Editing the <B>/etc/HOSTNAME</B> file.

</P>

<BLOCKQUOTE>

<P><FONT SIZE="-1"><HR><B>NOTE:&nbsp;&nbsp;</B>You may have to make further changes if you&#146;re on a TCP/IP network. For now, you can change the name to anything you&#146;d like.<HR></FONT>

</BLOCKQUOTE>

<P>You&#146;ll want to edit this file, changing <I>darkstar.frop.org</I> to whatever you&#146;d like. If you&#146;ve never used the <B>vi</B> or <B>elvis</B> text editor, skip ahead to Chapter 4 for a short tutorial.</P>

<P>If your system is configured properly, you should have the following directories in your root directory:</P>

<!-- CODE SNIP //-->

<PRE>

     bin/     dev/   home/        mnt/     sbin/     var/

     boot/    dos/   lib/         proc/    tmp/

     cdrom/   etc/   lost&#43;found/  root/    usr/

</PRE>

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

<P>If you&#146;ve installed Slackware from the CD-ROM, and then the system refuses to see the drive when you reboot, you&#146;ll need to install a new kernel or add the support through loadable kernel modules.

</P><P><BR></P>

<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="095-099.html">Previous</A></TD>

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

<TD><A HREF="103-106.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>





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

<!-- begin footer information -->





</body></html>

⌨️ 快捷键说明

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