s i s t e m a o p e r a c i o n a l m a g n u x l i n u x | ~/ · documentação · suporte · sobre |
Next
Previous
Contents
2. General System Setup
2.1 A Few Words About Security
Even before your system boots, you should decide what level of security you want to implement. To begin with, don't connect your machine to the network until you have decided what to do. Security is a vast subject that goes beyond the scope of this HOWTO; two good starting points are the Linux Security Administrator's Guide at http://www.securityportal.com/lasg and the Linux Security Guide at http://nic.com/~dave/SecurityAdminGuide/index.html. You should consider at least the following steps: using shadow passwords (Shadow Password HOWTO), restricting network access to the machine (Section Restricting Network Access), using the Secure Shell ( http://www.openssh.org) or the Secure Remote Password ( http://srp.stanford.edu/srp/). Good luck.
2.2 Start the Logbook!
To keep your installation in shape, it's essential that you know exactly what happened to your machine, which packages you installed that day, what you removed or modified, and so on. So, the first thing you'll do before you tamper with your machine is start a ``logbook''. Therein you'll take note of every move you make as root; in my own logbook I also keep a section where I list all modified system files, additional .rpms, and .tar.gz I installed. Optimally, backtracking your moves you should be able to re-obtain a fresh installation. Make a backup copy of the system files you touch. Better still, use RCS; you'll be able to backtrack all changes. Never work as root without logging your moves!
2.3 Keyboard
If you missed this step during installation or have changed your keyboard, you'll have to:
To load the key table, issue
Other special keys will be dealt with in the following sections. To enable NumLock on by default, add these lines to /etc/rc.d/rc.sysinit:
Normally, the Linux console doesn't distinguish between, say, Arrow and Shift-arrow, but some applications (namely, the editor Jed) do. Normally, these key bindings are only available in xterm. The following key map, which you can choose to load at boot time, is very handy:
2.4 Boot and Rescue Floppy
Make a couple of boot floppies for your newly installed system. Your
distribution may include a command for creating such a floppy (say,
Also, have at least a couple of rescue disks ready. There's a wide choice of
rescue disks at
ftp://metalab.unc.edu/pub/Linux/system/recovery;
if you don't know which one to choose, I suggest you try out Tomsbtrt, whose
home page is
http://www.toms.net/rb. It's very complete, but
some utilities seem missing at first; for example,
2.5 Kernel Matters
IMHO, the first thing to do next is build a kernel that best suits your
system. It's very simple to do but, in any case, refer to the
2.6 Hard Disk Performance
Your (E)IDE hard disk's performance can be greatly enhanced by
carefully using Since many details depend on your hard disk and HD controller, I can't give you a general recipe. You risk to toast your filesystem, so read the man page carefully before using some of the options. At its simplest, you could add the following line to /etc/rc.d/rc.sysinit:
which enables (E)IDE 32-bit I/O support. As for the `
(...) if your system uses components from the past couple of years [< 1997], it will be fine. Older than that, there *may* be a problem (unlikely). The really buggy chips were the CMD0646 and RZ1000 chips, used *extensively* on 486 and (early) 586 motherboards about 2-3 years ago. For recent machines, these settings should work fine:
2.7 Parallel Port Zip Drive
Stock kernels include the driver for both old (ppa) and new (imm) Zip drives. If you recompile the kernel, make sure that SCSI support and SCSI disk support are enabled. Remember, there can be conflicts between the printer and the Zip drive on the same parallel port, so you have better use kernel modules. Zip disks are sold preformatted on partition /dev/sda4. To enable the Zip, append this to /etc/rc.d/rc.sysinit:
Zip disks can be mounted via /etc/fstab as shown below, or via Mtools adding this line to your /etc/mtools.conf:
besides, the command
2.8 Device Drivers
Devices in
In most notebooks the mouse device is /dev/psaux: take this
into account when configuring X11. If you wish, do
2.9 Sound Card
My desktop PC is fitted with an old Sound Blaster 16; even if you've got something different, you may take what follows as guidelines. I compiled the sound card support as a module (
To enable the sound, make sure that Besides the standard kernel sound drivers, the Alsa drivers (
http://www.alsa-project.org) are an excellent choice. Strangely,
though, the sound channels are muted by default. You'll want to use
2.10 Login Messages
If you wish to customise the login messages, check whether your /etc/rc.d/rc.local overwrites /etc/issue and /etc/motd. (RedHat does.) If so, get on with your editor. If you'd like a colourised login message, you may adapt your
2.11 Hostname
Issuing the command
2.12 Mouse
Moreover, you must have a file /etc/rc.d/init.d/gpm, where you'll put additional command line parameters. Mine reads:
Obviously, make sure this configuration is right for your mouse type. In
most notebooks, If you like to use menus in console with Ctrl-button, then configure
2.13 Mount Points
It's handy to have mount points for the floppy, other devices and NFS-exported directories. For example, you can do the following:
This creates mount points for a DOS/Win floppy, the CD--ROM, the Windows partition, the parallel port Zip drive, and an NFS directory. Now edit the file /etc/fstab and add the following entries:
Obviously, you must use the correct device in the first field. Note the `auto' filesystem type in the first line; it allows you to mount
both ext2 and vfat (DOS/Windows) floppies, but you need a recent version of
2.14 Automount Points
If you don't like the mounting/unmounting thing, consider using
In this example you tell autofs to automount media in /misc and /mnt, while the mountpoints are specified in /etc/auto.misc and /etc/auto.mnt. An example of /etc/auto.misc:
Start the automounter. From now on, whenever you try to access the inexistent mount point /misc/cdrom, il will be created and the CD-ROM will be mounted.
2.15 lilo(8) and LOADLIN.EXE
Many users run both Linux and DOS/Windows on their PC, and want to choose at boot time which os to use; this should be done at install time, but in case, do what follows. Let's suppose that /dev/hda1 contains DOS/Windows and that /dev/hda2 contains Linux.
This makes the Linux partition bootable. Then write this basic /etc/lilo.conf file:
Now issue /sbin/lilo and you're done. Being To boot Linux from DOS/Windows without resetting, put
If you use Windows 9x, set the properties of this
Security Tip
Making a backup copy of your MBR before installing Linux is a safe move.
Prepare a Windows rescue floppy, and make sure it includes
art MIME format. These two lines, put in -*- etc/mailcap, should let you read those messages: -*- -*-
-->
2.16 Printer Configuration
All distributions I know have a configuration tool for setting up the
printer ( Let's suppose you have a non--PostScript (non ``Windows-only'' too!) printer you want to use to print raw text (e.g., C source files) and PostScript files via Ghostscript, which is assumed to be already installed. Setting up the printer involves a few steps:
For more complex or exotic printing configurations, the Printing-HOWTO awaits you. If you use
2.17 SVGATextMode
This utility, available on ftp://tsx-11.mit.edu/pub/linux/sources/sbin, is useful for changing the console screen resolution, font, and cursor shape. Users whose language include accented characters will be able to use them in console applications, while notebook users may change the cursor shape to make it more visible. Edit /etc/TextConfig or /etc/TextMode, starting with the default VGA definition. Europeans should be happy with this ``LoadFont'' section:
Once you're done, try your configuration with a command like
Please note that the block cursor only works with some modes; on my notebook, "80x30x9".
Next Previous Contents |