Sie sind auf Seite 1von 6

Planning the Implementation

1. There are several important Linux services:


o Apache—Provides a Web server for users on a LAN or the Internet.
o Squid—Allows proxy or caching service for users on a LAN.
o BIND—Creates a database of domain names and IP addresses. Also known as DNS or a
nameserver.
o Firewall—Regulates traffic to and from a network, with utilities such as ipchains or iptables.
(Can also act as a proxy service.)
o Sendmail—Creates a mail server.
o NFS—Network File System. For communication between Unix-based computers, including
Linux.
o NIS—Network Information System. Configures a common database of usernames and
passwords on a LAN.
o Samba—Sets up communication between Linux and Microsoft operating systems. Also known
as the Common Internet File System (CIFS).
2. A caching service fulfills requests for Web pages, etc., that would otherwise have to be transmitted to the
Internet.
3. A proxy service represents other computers on a LAN on the Internet.
4. All you need for Linux is a 386 CPU and a floppy drive. For some services, such as a router, a gateway,
or an X Window terminal, no hard drive is required.
5. Kernels are numbered in major.minor.patch format.
6. While iptables was developed for kernel 2.4, ipchains is still in common use.

 Network installation of multiple computers normally requires NFS.

 The log file most closely related to installation is /var/log/messages.

 Try critical applications on test computers first.

 Files with the .tgz or .tar.gz extensions are compressed archives.

 To archive and compress files in the /example directory, use tar -xvf /example and gzip example.tar.
Alternatively, tar -xzvf /example also archives and compresses.

 As root, you can install, upgrade, or uninstall a rpm package as follows:

• Install—rpm -i package.rpm
• Upgrade—rpm -U package.rpm
• Uninstall—rpm -e package

 The most common partition scheme includes a root (/) and a swap partition. A swap file can be substituted for
a swap partition. Other partitions are commonly used /boot, /home, and /var.

 X Window installation requires a practical minimum 32MB of RAM.

 KDE/GNOME can be installed on a terminal; all you need is a video controller. A hard drive is not required.
Basic Configuration
16. There are several key Linux configuration files:
o /etc/inittab—Run levels, login screen, reboot modes
o /etc/fstab—Default mounts for each partition
o /etc/lilo.conf—The Linux Loader (LILO)
o /etc/syslog.conf—Organizes Linux configuration files
o /etc/httpd/httpd.conf—Apache configuration
o ~/.bashrc, /etc/profile—bash configuration files
o /etc/services—TCP/IP port numbers
o /etc/inetd.conf or /etc/xinetd.d—Allows TCP/IP services
o /etc/crontab—crond daemon configuration
17. In /etc/inittab, to change the login screen, change x in the id:x:initdefault line.
Typically, x=3 sets up a command-line login; x=5 sets up a GUI login.
18. Apache Web server configuration files are located in the directory defined by the
DocumentRoot variable, as configured in httpd.conf.
19. The tcp_wrappers package is required for regulating traffic through a firewall using
the /etc/hosts.allow and the /etc/hosts.deny files.
20. /etc/hosts.allow and /etc/hosts.deny contain IP address filtering information; e.g.,
192.168.0.0 in /etc/hosts.allow permits messages from computers with that network IP
address. ALL:ALL in /etc/hosts.deny stops all traffic.
21. IPv4 addresses include 32 bits; IPv6 addresses include 128 bits.
22. To use a DHCP server on a remote network, the BOOTP protocol is required.
23. Test a DHCP server with /sbin/dhcpcd -r. On Red Hat Linux, use /sbin/pump -r. The
command should be part of the /sbin/ifup script.
24. nslookup can test a DNS server.
25. pppd is most closely associated with a modem connection.
26. ypbind ensures that NIS clients are bound to a NIS server.
27. Volumes formatted to the ext2 and ReiserFS file systems are resizeable.
28. There are several basic Linux newsreaders, including tin and trn.
29. xf86config can configure the X Window through /etc/X11/XF86Config. Related tools
include XFree86 -configure, SuperProbe, and XF86Setup. XFree86 can be found in
the /usr/X11R6/bin directory.
30. The Red Hat X Window configuration tool is Xconfigurator.
Linux Administration
31. After you add a user with useradd, you still need to assign a password.
32. New users get default files from the /etc/skel directory.
33. If you know the root password, run root commands with su -c “command”.
34. If you’re authorized in /etc/sudoers, run root commands with sudo command.
35. Know the types of files associated with the following directories:
o /—The top level directory
o /bin—Basic command-line utilities
o /boot—Boot files
o /dev—Device drivers
o /etc—Basic configuration files
o /proc—Current processes and resource allocations
o /sbin—System administrative commands
o /var—Log files and print spools
36. The dot (.) represents the current directory. The double-dot (..) represents the parent of
the current directory.
37. To supersede a setting in /etc/fstab, specify the file system; e.g., mount -t vfat /dev/fd0
/mnt/floppy.
38. Know basic commands:
o copying, moving, removing, and linking a file—cp, mv, rm, ln
o creating and deleting a directory—mkdir, rmdir
o listing files—ls
o identifying and changing directories—pwd, cd
39. Use ln to point to the active version of an application.
40. man -k topic1 returns a list of commands with “topic1” in its man page title.
41. Use the absolute path when using tar to back up key directories.
42. If you use the relative path when using tar for backups, navigate to the same directory
to restore files to the original locations.
43. Direct data in a file as standard input to a program with program < data.
44. Direct the standard output from a command to a file; e.g.: ls > file.
45. Combine redirection arrows and pipes. For example:
o program1 < data | program2—data is processed by program1; the result is
standard input to program2.
o program3 < data > output—data is processed by program3; the result is
standard input to the output file.
46. The ampersand (&) at the end of a command runs that command in the background; the
bash shell then takes you to another prompt.
47. root can use the init 1 command to start single user mode. Alternatively, reboot Linux
and type linux single at the LILO boot: prompt.
48. You can add short user login messages to /etc/motd.
System Maintenance
49. The best documentation is kept in a local, readily available physical file.
50. Memorize the fields in an /etc/crontab entry. From left to right: minute, hour, day,
month, day of week.
51. logrotate can be used to rotate and/or delete logs periodically; usually documented in
/etc/crontab.
52. Find the differences between two text files with diff.
53. Find text strings in a file with grep “string” filename.
54. grep is commonly used as a filter for a long list of data.
55. dmesg lists detected hardware.
56. Watch for files owned by root on each individual user’s directory. If the SUID or SGID
bit is set on any of these files, a cracker can access it from any account.
57. Memorize /etc/passwd entries. From left to right: username, password, UID, GID, user
information, home directory, default shell.
58. Deactivate an account by replacing the password entry in /etc/passwd with an asterisk
(*).
59. Use groupadd to add a new group. Open /etc/group to add more members.
60. Each /etc/group entry includes from left to right: group name, group password, GID,
and the usernames of all members of the group.
61. pwconv and grpconv convert /etc/passwd and /etc/group to Shadow Password Suite
files /etc/shadow and /etc/gshadow. pwunconv, grpunconv reverse the process.
62. New file default permissions are based on umask. For example, if umask=023, the
default permissions for newly created files are 754 (=777–023), which corresponds to
rwx permissions for the owner, rx permissions for the group, and r permission for other
users.
63. chmod u+s program activates the SUID bit for full access for all users.
64. chmod g+s program activates the SGID bit for access equal to the group owner.
65. When you set the immutable flag with chattr +i file, even root can’t delete it.
66. Use 15G to get to line 15. Alternatively, G goes to the last line of the file.
67. To run a shell command in vi, type :!, followed by the actual command.
68. In vi, display line numbers with :set nu.
69. Any user can use ls ~ to list the files in her home directory.
70. fsck can fix misaligned inodes.
71. resize2fs can resize partitions formatted to ext2.
72. Unused TCP/IP port numbers in /etc/services can be reassigned to other services such
as HTTP, FTP, or POP.
73. ifconfig, ifup, and ifdown activates and deactivates network interfaces. For example,
ifconfig eth0 up activates network card eth0.
74. ifconfig eth0 irq 12 io_addr 0x300 assigns IRQ 12 and I/O 0x300 to eth0.
75. ifconfig eth1 10.11.12.14 netmask 255.0.0.0 assigns the given IP address and network
mask.
Troubleshooting
76. Commands such as ATDT (ATtention, Dial Touch-tone) and ATDP (ATtention, Dial
Pulse) check connections in modem utilities such as minicom.
77. Radius servers are modem authentication servers that verify usernames and passwords.
Reboot Radius if you have authentication problems.
78. One Denial of Service (DoS) attack includes a script that calls but does not complete
the connection. The resulting traffic keeps the Web server so busy that regular users can’t
connect.
79. On telnet, TERM=vt100 sets terminal emulation to a system suitable for a remote
connection.
80. For network problems, check physical connections first. Then use ping and traceroute
to check the logical connections.
81. If Web access works and mail does not (or vice versa), check allowed services on the
firewall, the proxy server, and /etc/inetd.conf or /etc/xinetd.d.
82. route -n and netstat -n returns a routing table with IP addresses. Since this does not
require access to a DNS server, it does not load the network.
83. Modify routing tables with the route (not the netstat) command.
84. An rpm “Permission denied” error message may be caused by trying to run rpm as a
regular (not root) user.
85. Use ps aux to find a process’s PID and %CPU usage.
86. Stop a running daemon such as httpd with kill ‘cat /var/run/httpd.pid’, or substitute
the actual PID. kill -1 PID or kill -HUP PID restarts a process. kill -9 PID stops a
process immediately, leaving temporary files behind.
87. Stop a running process with the killall processname command.
88. Program priorities range from –20 (highest) to 19 (lowest). Start program1 with a high
priority with a command like nice -n -10 program1. Raise the priority of a currently
running program with a command like renice -10 program1.
89. Several shutdown commands are available. shutdown -h +15 halts Linux in 15
minutes. shutdown -r now reboots Linux immediately. Related commands include halt,
reboot, and poweroff.
90. The PC reset button is the absolute last resort. Data in RAM that you thought you saved
is lost. Hard drive inodes can be misaligned, which can damage more data.
91. If you forget the root password, start single user mode. Then reset the root password
with the passwd command.
92. If you see only LI where you should see LILO boot:, the secondary boot loader
(/boot/boot.b) may be missing.
93. To restore LILO, boot Linux with a rescue disk, then run /sbin/lilo.
94. To bypass a graphical login, use the Ctrl+Alt+F1 command for a command-line login.
Hardware Configuration
95. If your computer beeps more than once and does not boot when powered on, you may
have a CPU or RAM problem.
96. Overclocked CPUs can lead to excessive heat and intermittent crashes.
97. Detected hardware is listed in the /proc directory; e.g., detected CPU information is
stored in /proc/cpuinfo.
98. If the floppy indicator light stays on and the drive does not work, the controller cable is
probably installed upside down.
99. IDE devices are based on a standard known as ATA or ATAPI.
100. Avoid installing a hard drive and CD drive on the same IDE controller. When
the CD drive is in use, hard drive data transfer speed may be limited.
101. CMOS settings determine where the computer looks first for an operating
system.
102. Reserve legacy hardware channels in CMOS.
103. A dead computer battery can erase CMOS settings and the BIOS password.
104. append can be used to set the IRQ, I/O, or DMA of a device in /etc/lilo.conf.
105. Regular SCSI connectors have 50-pins; Wide SCSI connectors have 68-pins.
106. A SCSI terminator is required at the end of a daisy-chain of SCSI devices.
107. Memorize the following COM port information:
o COM1, IRQ4, I/O 03f8
o COM2, IRQ3, I/O 02f8
o COM3, IRQ4, I/O 03e8
o COM4, IRQ3, I/O 02e8
108. Memorize this printer port information: LPT1=IRQ7; LPT2=IRQ5.
109. Current print cables accommodate bidirectional communication. They conform
to EPP (enhanced parallel port) or ECP (enhanced capabilities port) standards.
110. BNC connectors are used for Ethernet Thinnet networks; RJ-45 connectors are
used for Ethernet twisted-pair networks.
111. MAC addresses are also known as hardware addresses, which are in
hexadecimal notation and look like 00-11-c5-65-3e-d5.
112. arp associates network card hardware (MAC) and IP addresses (IPv4 or IPv6).
113. Many software and PCI modems are “winmodems,” which are difficult and
sometimes impossible to configure in Linux.
114. Reserve the IRQs, I/Os, and DMAs required for legacy hardware in CMOS, to
prevent their use by plug-and-play hardware.
115. Linux kernel 2.4 partially supports “hot-swap” requirements of PCMCIA, USB,
and IEEE 1394 devices. Occasionally, a reboot may help detect a newer device.
116. If loadable modules are enabled, the associated driver might be installed or
removed automatically while Linux is running. Alternatively, use modprobe, insmod, or
rmmod.

Das könnte Ihnen auch gefallen