Linux Concise System Maintenance Manual - 1

xiaoxiao2021-03-06  41

Author: A Tan

Foreword

Have colleagues have completed long hundreds of documents for Linux through tough work. In fact, there are also more than 10,000 pages of technical essence on Linux on the Internet, and it is not included in English. There are tens of thousands of programmers and network experts working hard for this software. This is the charm of freedom.

I used Linux for a lot of time, and I have experienced countless setbacks during the period. At the same time, I also got a lot of experts. I have always liked a simple text. Through the simple sentences and code below, I hope to express my experience in using Linux. Maybe this article is more messy, but I hope that every sentence of it is useful to you. Of course, you have to know some more detailed things, please refer to my colleague written document.

Of course, it is my biggest wish to make your work through accessing this document.

First, the misunderstanding of Linux

1. What is Linux?

First, few people do desktop systems with Linux because the Windows desktop system is already good enough. We mainly use Linux as the operating system of the web server. If you and your app meet the following, then you use Linux:

* Don't worry about spending money on operating systems and web applications.

* Use the D version of the system to condemn or fear responsibility.

* I want to get and spend a lot of performance.

* It looks high in front of the user.

* Know several masters of Linux, or know where to find questions.

2, is there a lot of differences in each Linux issued package?

If you use a plenty of PC in the late 1980s to 95 years ago, you should understand it for Linux: it is like a DOS with 32-bit multitasking core, the difference is that the appearance looks Like a UNIX. Linux is a lot of people who have been piled up with wisdom. Beginners often ask: "Red Hat is good or slackware?". This person is also facing hundreds of options, which is indeed a headache. Most Linux issuings are actually very simple, almost all issuings have the same kernel (perhaps different versions), the difference in external commands and data files is limited to the location of storage in the file system (this leads to Some compatibility issues because a specific file is found in some places). Alternatively, some issuings have added some own utilities in the issue package to display their own brows. In fact, it is not too much manufacturer to modify the kernel, because this will continue to update the kernel's official version. Of course, some embedded system developers say that they have said their own system on the basis of Linux.

It is a very annoying issue of Linux, I prefer FreeBSD at this point, because it only has an official release version, but also runs more stable. There are too many programmers who can make software for Linux. There are more information on Linux. Remember: When a guy talking to you does not matter, then he is an expert.

3, is Linux amateur?

Such a propaganda gives many impressions like this. In fact, Linux is a serious operating system that has all the characteristics of all operating systems. It can be used in many serious occasions.

4, Linux performance better than Windows?

The answer here will disappoint you, according to my previous actual test, version 2.2 Linux core performance is lower than Windows2000. It is worth considering that the central performance of the 2.4 version has substantially approached Windows2000. But the Windows2000 complex graphical interface takes up considerable system resources.

5, Linux is more complicated and more professional than Windows?

From complexity, Windows 2000 is more complicated than Linux. In the core technology, Windows is more advanced.

6, is Linux more reliable?

The reliability of the system should be evaluated from the two angles. (1) The reliability of the system itself, the two are similar. People generally think that WindWOS is worse than Linux reliable impression derived from a wide range of wells of Windows. Of course, Linux is simpler than the Windows structure and can improve reliability to some extent. (2) From the perspective of security, Linux is much higher than the Windows system, which is very simple: the tree is striking. In addition, Linux's source code open mechanism makes the vulnerability discovery and eliminates very fast. Windows is relatively bureaucrats. Here, I added, the most reliable system I have used is the OS, reliability and security of the BSD class. 7, Linux really doesn't have to spend a penny?

Most of the issuings need to be a small amount of money. Of course, you can also download from the web. In fact, these issuings do not meet your applications, usually need to have some changes and customizations to run. Of course, the money of the flowers can not compare with Windows.

Second, Linux installation considerations

Most of the issues now are easy to install, basically a graphic wizard, each distribution package is not too the same, and you can't describe one by one. If you don't even understand, then you don't use Linux. Here only shows a few concerns.

1. If you want to mix with Windows, be sure to first install Windows, then load Linux.

2. When the partition is, the software is flexibly determined according to the software installed. General partitions include: /, / root, / usr, / var, and swap partitions, where the SWAP partition type and other different needs need to choose, it is generally twice the physical memory. / root partition is an emergency ROOT, 64 megabitches.

3, of course, for convenience, you can install the issuance package to give you a good job. But I am installing Linux habitat is to install a minimum system and install all compilation tools. Method for installing compilation tools is generally implemented through the package management tool you use, so that it is most convenient. For example, in TurboLinux, run / usr / sbin / turbopkg. Select all the options or GCC-related options for Developeropoment, which is generally available in the management tool.

4, LILO must be installed. Otherwise, it is not good to do if there is a partition problem.

5. If it is mixed with Windows, it is not coming. You can start with a 98 boot disk, then use the FDISK / MBR to reply to the main boot partition to keep the Windows partition.

After installing the minimum system and a full set of compilers, we should get a cleaner system. On this system, you can download and install a variety of applications.

Third, basically use

1, file system

No matter how many partitions, the entire file system is a complete tree structure. The most common catalogs are:

(1) / usr: Store various application files. Where use of / usr / local to store software installed

(2) / var: Used to store all data files

(3) / proc: The file inside is used to represent various configurations and status of the system kernel. This piece is not a real file system, but various data in memory. Some common system information can be obtained from here. For example, what is memory memory.

(4) / etc: Here is to place all system configuration files. Under normal circumstances, the post-installed software configuration file will not be placed here. Unless you are installing software or deliberately doing this with RPM. I don't like to mix together different software files, so I usually make different software configuration files in their respective directories.

2, common command

Here I list some of the frequently used commands, and the specific usage can be found in the relevant manus page (I hope your English is not as bad).

Vi (must use this very annoying thing, if you succumb, you can choose another editor called Pico, it has a bit icon Edit "Head (used to see a long file)

Tail (ibid)

NetStat (see network status)

TAR (unlock .tar.gz compression package)

PS (see process)

Kill (Dry Process)

TOP (see system conditions)

Shutdown (shut down system)

CAT (see file content)

Ping (see network communication conditions)

FTP (transfer file)

MAN (manual)

The above commands are most common, and the basic usage is sure to remember. In fact, each person can remember all the parameters of all commands or commands, remember that several commonly used. Other books.

3, kernel upgrade

If you don't want to adventure, you can skip this part. However, according to my actual experience, the 2.4.x version of the kernel performance is at least 40% of the performance of 2.2.x, or it is worth a try. Now the latest distribution kits have almost a new 2.4 core, but the version number wants to be conservative. Here, my suggestion is when deciding to upgrade any part, you must first look at the so-called "Currect Version Release Note" information, tell you what changes in this version upgrade. If the contents of the change do not involve your current environment or demand, just add some evil door equipment, you must not have to upgrade. In addition: One of Linux's kernel version number is an odd number of non-stable versions, such as 2.3, is an even number of stable versions.

The steps to upgrade the kernel are as follows:

(1) First find the kernel file you intend to upgrade online, the general name is: Linux-2.x.xx.tar.gz, copy this file to / usr / src. (I don't know where to find it? Take a look: http://www.kernel.org, it is best to find .tar.gz format, such as here: http://www.kernel.org/pub/linux/kernel/v2 .x /). The following upgrade example is upgraded from 2.2.18 to 2.5.7 (this is the latest kernel, you don't forget to change the version number using other versions)

(2) Decompression: TAR ZXVF Linux-2.5.7.tar.gz generated a directory: Linux-2.5.7.

(3) Enter / usr / src, use the ls -l command to see there is a connection in the SRC, similar to: Linux -> Linux-2.2.18 / (connection pointing to your current kernel version). First remove this connection (RM Linux), rebuild the connection with the ln -s linux-2.5.7 linux command. I think you will not even have the version number here.

(4) Enter Linux-2.5.7 directory, if not the first time to compile this core, it is best to use the command: make mrproperty to delete the .o file, etc., of course, the previously saved configuration is also lost.

(5) Use the command: make menuconfig command to adjust the kernel configuration to accommodate your current environment, remember, do not understand the configuration. The primary task is to adjust the environment of various hardware, such as the SCSI card: SCSI Support / SCSI Low-Level Drivers, don't know the current SCSI card model? It can be found in / proc / scsi. There is also a network card, in the Network Device Support. Don't know the current network card model? Write in this file: /Proc/net/pro_lan_adapters/th0.info or / proc / pci file can also be found. Use the space bar to change the option status in MenuConfig, the previous <*> indicates that the function is compiled in the kernel, mainly running fast. <> Indicates that this feature is not required. Indicates that the function is compiled into a module, which is usually compiled into a module to reduce the size, and the convenience of replacement.

(6) The following things are compared to the program, do: make dep (check the integrity of the file, the process is very complicated)

(7) Make Bzimage accounts cases (really start compiling yeah! I feel this is the most addicted, the screen "", this time you will feel that how many unknown programmers contribute in this complex system What kind of power is

(8) Make Modules (Compiling those marked as

Function module or driver)

(9) Make MODULES_INSTALL (copy the compiled module to the specified location, generally: / lib / modules /. Note: The module of the different version numbers is completely separated in different directories, because Modules is closely related to the kernel, Mixing is easy to cause system crash)

(10) CD /USR/SRC/LINUX-2.5.7/Arch/i386/boot, use commands: cp /usr/src/linux2.5.7/Arch/i386/boot/bzimage /boot/vmlinuz-2.5.7 File BZIMAGE file is changed to VMLinuz-2.5.7 copy to / boot /

(11) cp /usr/src/linux-2.5.7/system.map /boot/system.map-2.5.7

(12) Enter / boot directory, RM system.map

(13) Running the LN System.map-2.5.7 System.map 10-13 in the / boot directory. Two steps must be done each time you recompile.

(14) I started reminding, I hope that you have installed Lilo (otherwise you sing: "God, save me!"), Editorial file: /etc/lilo.conf, do the following editing:

Boot = / dev / sda

MAP = / boot / map

INSTALL = / boot / boot.b

Prompt

TIMEOUT = 50

LBA32

Default = linux-2.5.7

Image = / boot / vmlinuz

Label = Linux

INitrd = / boot / initrd

Read-only

root = / dev / sda5

Image = / boot / vmlinuz-2.5.7

Label = linux-2.5.7

INitrd = / boot / initrd

Read-only

root = / dev / sda5

The black body part is a followed and modified. In case you don't have LILO, you can only modify the / boot below to point to your new System.map and VMLinuz without modifying LILO. This can also be started, but once problems have, your machine can't start. (15) Execute the command: LILO (used to update LILO data), pay attention to the result of the output: With the star number is default.

(16) Pray, then the Reboot system is restarted, and the new kernel can be seen with uname -a. If any problems cannot be booted, you need to select the original kernel start in LILO's boot interface, re-change the kernel parameters, adjust the hardware or other configuration after entering the system. Then repeat all the procedures.

转载请注明原文地址:https://www.9cbs.com/read-78707.html

New Post(0)