Linux getting started tutorial (from www.linuxsir.org)

xiaoxiao2021-03-06  102

In 1994, Young and Mark Ewing created Red Hat and created the world's most widely used Red Hat Linux suite, and the popularity of Linux has set up the sweat work, and the author also walked into the Linux world with Red Hat. Red Hat has achieved brilliant achievements, and even many Linux issued companies have also used the code of Red Hat Linux, such as Mandrake, SoT Best, Connectiva, Abit, and Kondara. It can be said that Red Hat has become synonymous with Linux in a sense. On 16 April 2001, Red Hat officially launched the Red Hat Linux version 7.1. As a loyal user of Red Hat Linux, I installed a set on my own cranes in my own, I would like to help you control it. Chapter 1: System Introduction 1.1 System New Features 1) Adopt the latest Linux 2.4.2 stable kernel, support more hardware devices, high performance indicators; 2) use the latest graphics system XFree86 4.0.3, It provides powerful hardware support; 3) Introduced full graphics installation interface, making it easier to install; 4) Increased international language support, but the most hateful is supported by BIG5, but there is no simplified Chinese, it is true; ) Significantly improved support for multi-CPU computers, and for single CPU computing machines, up to 4G user process space, and cancel the restriction of the PCI bus, virtual memory can be as high as 64G physical memory, support multi-user and collective Using, it is possible to be an enterprise-class operating system; 6) provides excellent support for mobile storage devices, including: "Hot Plug" USB device, ZIP drive, and various disc burners. Red Hat Linux 7.1 mainly uses a program module called UPDFSTAB, making it easy to support, install, and unload these devices for various mobile storage devices; 7) Add some new system configuration tools to be convenient User management and Linux system use, such as apacheconf, bindconf, and printconf, etc., which makes it easy for users to configure Apache, Bind, and printers through the GUI graphical user interface. It is important to know that several services to configure in the past versions can be complicated. To manually modify a lot of parameters; 8) In addition, it has also enhanced support for PCMCIA devices, which is very important for users who use PCMCIA devices; 9) Many patch works in security, safety The provincial setting ensures that the port is closed, and the new firewall shield can be used to open or close; 10) Bundle a large number of newest applications, server software. 1.2 System hardware demand Linux develops to today, have gone from the previous hardware support, it has won the market with their own strength, and now many hardware vendors make their own products to work under Linux. 1) CPU: Redhat Linux 7.1 provides a support program for many CPUs on the installation CD, almost not blocked by the CPU during installation. However, for some old CPUs such as Intel 80386, 80486, AMD 486, 5x86, K5, etc., the system provides support, but not optimized for these CPUs, which may result in poor performance.

In addition, if you want to build a multi-CPU system, the optional CPU is: Intel Celeron, Pentium, Pentium II, Pentium II Xeon, Pentium III, Pentium III Xeon, Pentium Pro, Pentium with MMX. 2) Main board: Red Hat Linux 7.1 Supports all X86 compatible motherboard 3) memory: suggest 64M or more, preferably 128m 4) CDROM: Supports all IDE interface CD-ROMs, most SCSI interfaces can also be identified; 5) SCSI card : Support Adapterc 152x, 154x, 274x, 284x, 294x, 394, aic7890-based card, and most popular SCSI cards. This device is not required unless you have a storage device of the SCSI interface. 6) Graphics: For the Linux system, all graphics cards are supported in the character terminal mode. But if you want to make your display under the X Window graphical interface, you need to make the corresponding settings according to the different graphics cards. In the early days, the graphics card often plagues beginners, but now the support of the graphics card has become a lot. Most of the graphics cards can be identified at the time of installation and automatically complete the settings. The only common graphics card that cannot be identified is Intel's I810, you can find help (http://support.intel.com/support/gr...intel.com/support/gr... instal.htm). 7) Sound card: More sound card support is provided in Red Hat Linux 7.1, even if the Creative Labs Sound Blaster Live sound card can "plug and play". However, some small brands of sound cards often have no support. 8) NIC: Support NE2000 compatible network card, most of the PCI networks are also better. 9) Others: Redhat Linux 7.1 supports all X86 compatible motherboards; supports keyboards, mouse, flies on sale on all markets; support all brands of memory, at least 8M memory, it is recommended to come with more than 64M. There is a detailed hardware compatibility list on the Red Hat website, you can get more detailed information by it: http://hardware.redhat.com/hcl/genp...gi? PageName = 7.1 Chapter 2 : Installation Guide 2.1 Preparation 1 before installation 1 The number of computers installed; CD-ROM: interface type (IDE, SCSI); SCSI card: card model; NIC: NIC model; mouse: Type of mouse (serial port, PS / 2, bus type), protocol (Microsoft, Logitech, Mouseman, etc.), the number of buttons, also know which serial port is connected to the serial mouse; display card: display card model (or it uses the chipset), display memory quantity; Most PCI bus graphics cards can be automatically identified by the installer.) Display: model, and horizontal and vertical refresh frequencies. You can use the Windows Control Panel -> Device Manager to get the appropriate information, of course, you can also review the corresponding random data.

2, check CMOS settings: Anti VRIUS: Disable Close this option to prevent crashing during installation, because the installer wants to write the main guidance fan. Swap A, B: disable may cause problems when starting. Boot Sque: CDROM, A, and C Let your computer start from the CD. Memory Hole: Disable If it is not closed, Linux can only recognize 16M memory. 3. Learn about the name design and file system knowledge of Linux hard disk partition: Linux Install at least two partitions: Linux Native (file) partition and Linux SWAP partition. The primary partition is used as a file that stores Linux, and the exchange partition provides virtual memory when running Linux. The exchange partitions each 16 ~ 32m, up to 8, which can be determined according to the memory. In general, it is possible to build a 16M exchange partition. The file partition is determined as needed and the hard drive size is generally not less than 200m. Since we have access to the DOS operating system, most people are accustomed to using symbols similar to // 'c: //' to identify the hard disk partition, but this is not the case in Linux. Linux's naming design is more flexible than other operating systems and can express more information. LINUX identifies the hard disk partition through the combination of letters and numbers, such as "HDA1", which is the specific meaning of the partition name, the two letters of the partition name indicate the type of the device where the partition is located, such as HD refers to the IDE hard drive, SD (refer to SCSI hard drive); Which device is arranged in the order of A, B, C, D, such as the HDA is the main hard disk of IDE 1, the main hard disk of the IDE 2 should be HDC; the last number is on the device Sub-sequence, the first four partitions (main partitions or extensions) are represented by numbers 1 through 4, and the logical partition starts from 5, for example: HDA3 represents the third primary partition or expansion partition on the first IDE hard disk. In Linux's file system, there is a few file partitions, all in a tree directory structure. For example, you can use a partition to be specified to / (root directory), specify to the / usr directory, however, after you enter the Linux system, you can't feel that they are in different partitions, you just I feel on a tree. But if you only have a file partition, you must use it to / (root directory). 4. Preparation for hard drives to install Linux: Generally speaking, the hard drive on the big computer is all the partitions of the MS-DOS / WIN operating system as the hard drive. In order to be able to install Linux, you have to reassign the hard disk space for Linux. I immediately borrowed a friend's hard drive, and the data is now backup, and reload the system. However, there are three optional methods: 1) Map all the data on the last logical disk under MSDOS to other partitions, delete the logical disk with partition tool, use this part of the space to Linux. 2) Renew the hard disk partition, which is the most direct and most troublesome way. The specific operation is as follows: Back up the user's file. Start the system with the MS-DOS system. Use fdisk to remove the original partition, rebuild the new partition, leave the space allocated to Linux to any partition. Reinstall the original User System 3) Re-partitions with some partition tools without deleting the original data of the hard disk. Such as partition magicians, etc. 2.2 Installing Red Hat Linux 7.1 From CDROM We can install the Red Hat Linux 7.1 system through discs, hard drives, networks, the most common method is to use CD.

It is three requirements that use CD installation: 1) Your motherboard support CD 2) You have CD-ROM 3) You have Red Hat Linux 7.1 Installation CDs Normally, this is no problem. The author also recommends that you use CD to install, which is simple. With the gradual increase in the application under the Linux system, a disc has been accommodated, and the Red Hat Linux 7.1 installation disc has two, the first one can start directly from the CD, including most packages and some installation tools. The second optical disk is a number of additional packages. However, this time is different from the past, Red Hat has been improved, and the installer can read data from multiple discs. When installing, you will find that you will change your second CD. Now we start the Red Hat Linux 7.1 installation trip. The first step: Select the installation mode to put into the first disc, so that the computer starts from the CDROM, a simple welcome information will appear. At this point, you can choose different installation modes: 1) Graphics mode: Press the Enter directly, the entire installation process is like Windows, and you can use the mouse action. However, the Red Hat at this time is very picky to the graphics. Some screens are too large, can not find buttons, and some will display the graphical interface according to the could not display. If so, you can press the hot start key to restore text mode. 2) Text mode: Enter text and press Enter. It will enter the installation interface of the text mode, and some people have a better use of this way. 3) Expert mode: Enter EXPERT, press Enter. In this case, the installer seems to have no brain, all things have to be decisive. Do not use this way unless you are very familiar with Linux and have some special hardware installations that cannot be configured correctly. 4) Rescue mode: This is not used in the first installation, it is only used for the original Linux system that cannot be started normally. In this way, you will enter a miniature Linux system and provide many tools for recovering Linux for you. 5) Driving disk mode: If you have a special hardware driver, you need to use it to the Linux system during installation, you will enter "Linux DD", press Enter, and the installer will provide you with the driver floppy. It is recommended to use text mode installation. Step 2: Select Language Red Hat Linux 7.1 provides 18 different languages, but unfortunately there is no Chinese, can only choose "English". Then continue. Note: Red Hat has recently launched Chinese version, you can find a try. Step 3: Select the keyboard to select US, continue. Note: The author tried to use Logitech ITOUCH wireless keyboard under Red Hat Linux 7.1, then the normal 104 keyboard will not have problems. Step 4: Selecting the installation method Red Hat Linux 7.1 provides Workstation, Server, Laptop, Custom, Upgrade EXisting (sizes, servers, laptops, user-defined, upgrade old versions). We can choose the installation method according to your actual needs. 1) Workstation: Workstation mode. This way is recommended for general users.

Workstation Type Installation will clear all the original Linux partitions on all hard drives, which are uneven for non-Linux partitions (such as Windows 98). This way is very simple, and if you have Windows 98 on your machine, you will automatically complete the LILO dual start configuration. However, if you are NT on your machine, don't use this way, otherwise your NT may never start. 2) Server system: server system mode. WARNING: Installation in this way, will do everything about all partitions on all hard drives. This is definitely not a joke! Many beginners have paid the cost of blood and tears. It is usually selected to build a web server on an empty PC. 3) Laptop: Portrait, notebook method. For the name suggestion, this method is recommended when you install on your laptop. 4) Custom System: Custom installation. For friends who have a certain understanding of Linux, it is recommended to use this way, freely build Linux. This approach is brave when you install Linux in the next installing linux. 5) UPGRADE EXISTING SYSTEM: Upgrade the existing system. Assuming your hard has an old version of Red Hat Linux, this is your best choice. It is recommended to use "custom installation". Step 5: Working hard disk partition, you will choose different partition tools: Disk Druid and FDISK, it is recommended to use Disk Druid. The top of the main interface of Disk Druid is // 'Current Disk Partitions //', list information of each hard disk partition. Each line consists of five projects: Mount Point - Specifies the Linux system directory corresponding to the partition; device-hard disk partition device name; Requested - the minimum space applied by the partition definition; actual - currently assigned to this partition Space; Type - Partition type. In the middle, the // 'drive summaries //' area, one line corresponds to a physical hard disk, each consisting of six projects: Drive - the device name of the hard disk; Geom [C / H / S] - Hard disk physical information , Including the number of cylinders, magnetic heads, and sectors; Total - All available spaces for hard disk; Used - Hard Disk has allocated space; Free - hard disk unallocated space; bar graph - hard disk has spatial representation. The lowermost is the button area of ​​Disk Druid, consists of five buttons: add - Apply for a new partition; edit - modify the properties of the partition selected in the // 'Current Disk Partitions //' area; delete - Delete the partition selected in the // 'Current Disk Partitions //'; OK - Confirm partition operations, rewritten the hard disk partition table; Back - does not save modifications, returns to the previous screen, start again. I suggested dividing a partition zone for Linux, a swap partition (recommended 64M, 128M or 256M), namely: Select the Add button with Tab, press Enter, then a topic on the screen is // 'Edit New Partition / / 'Dialog box.

First we enter the system directory corresponding to this partition in the Mount Point item: "/" (root directory); then enter the size of the partition in the Size (Megs) item; in the Type this, under the cursor, Key key Select the appropriate partition type, we select Linux file partition Linux native; finally press OK to confirm. This successfully established a partition used for Linux. Of course, if your hard disk space is allowed, you can use one or several partitions to use Linux again. Then add a swap partition to Linux with the same method, and different only in the mount point item, let it empty, select Linux SWAP in the Type project. Note: If you select a graphical interface installation, you will provide a graphical partition interface, which is also very convenient to use, and you can use an automatic partition. Let the installer have created from the partition. Need to be cautious when doing this step, don't accidentally delete the original partition, it is miserable. After confirmation, press the OK button to continue. Then format the new Linux partition according to the prompt for use. Step 6: LILO Configuration Lilo is Linux Loader, the Linux boot, which is responsible for launching the Linux operating system. We can configure it to achieve dual start. First, the installer will allow you to fill in any kernel parameters to pass to LILO, usually unnecessary. Then, you will ask if you want to install LILO, usually there are two options: 1) The main leading area (MBR) of the first hard disk; 2) The leading fan of the Linux partition. If you want to use Lilo to do double start, you need to select the first, if you want to use Linux to boot the floppy disk or other system boot to boot Linux, then choose the second. Step 7: Set the host name to take a name for your machine. Step 8: Select System Security Level This is also a new option provided by Red Hat Linux 7.1, which provides three options: 1) High: If you choose HIGH level, then all network access issues from outside will be Prohibited; 2) Medium: The default level, select this level, the external network access is limited to the network service provided by the system; 3) NO FireWall: The lowest security, any external network access will be allowed. Step Ninth: Common options are set, set the mouse, select the language type you need to support (note, here is a Chinese support), and time zone (under the graphical interface, you should choose in text mode) PRC). Chapter 10: User Settings 1) Set the system administrator (that is, the root user) password, the system administrator is the highest authority of the system, which has the system, so this password is important; 2) Then the installer provides one Increase user tools, you can easily add system users through this tool. 3) The last is about the configuration of user authentication: a. Shadow passwords: By default is selected, please do not modify it.

This feature is used to protect password security; b. Use MD5 password encryption: By default is also selected, please do not modify, it is also safe; c. Use NIS: When you want to verify user verification over the network When you fill in the relevant information; d. Using LDAP: When you want to verify the user authentication over the network, please fill in the relevant information; e. Use Kerberos: When you use the Kerberos system to perform user authentication, fill in the relevant information; Step 11: Selecting a package This step is the most important step in the installation process, you can select the software you need according to the prompt. The installer divides all the software into many classes: Printer Support: Printer Support X window: Desktop Manager GNOME KDE: Desktop Manager Kde Mail / WWW / News Tools: Some Transit Mail, Web Browse, News Reading common tools DOS / Windows Connectivity: Provides DOS and Windows compatible tools graphics manipulation: Game Software MultiMedia Support: Multimedia Support Software Laptop Support: NetWorkStation: Network Workstation: Network Workstation: Network Workstation Tool, such as Telnet , FTP and other clients Dialup Workstation: Coiled Internet Tools News Server: News Server NFS Server: Network File System Server SMB (Samba) Server: Samba (NetBIOS Protocol) Server System IPX / NetWareTM Connectivity: IPX Protocol Support Software Anonymous FTP Server: Anonymous FTP Server SQL Server: PostgreSQL and MySQL Database Server Web Server: Web Server (Apache) DNS Name Server: Domain Name Server Network Management Workstation: Network Management Workstation, providing some SNMP support authoring / publications: publishing software Emacs: famous Integrated Editing Software Developments: Urnuclear development kits, including kernel, UTILITIES: Some common tools, such as Linuxconf everything: All packages, if your Linux partition is large enough (2400M or more), then you can choose it , Put all the software. Note: In the selection interface, there is an option, which is selected, and it will list the detailed software installation list, you can also make some choices. After selecting the package you want to install, the system will perform a package dependent check, then start the copy of the file. At this time you can take a break. However, when you are different from before, you need to change the CD when copying to half! Step 12: After making the boot disk installation is completed, you will prompt you to make a Linux boot floppy disk. Although it is not very useful, it is good for beginners.

Therefore, in the following, it is possible to use: 1) Prepare LILO in the Linux partition, and can be covered by floppy directing Linux; 2) The LILO program mounted on the MBR is overwritten, and this floppy disk can be used. Boot, then run "/ sbin / lilo", refurbish the LILO program on MBR; 3) When the system crashes, you can use the Linux boot floppy disk to start, do some recovery. Step 13: Copy files are the longest, and the core process: copy file. The Linux installer copies the package you selected into the hard disk partition. It should be noted that you need to change the second disc during the installation process. Step 14: Configuring the graphics card / X Window Next, the installer will automatically detect your graphics card, display, because Red Hat Linux 7.1 uses the latest XFree86 4.0, so the support of the display card is better, most of the graphics card It can be identified. If you can't identify, then you have to configure it later. If your graphics card, the display is fortunately identified, then the installer will ask you to select the resolution of the graphical interface. If your graphics card is very good, then choose 800 * 600 * 24 color or 1024 * 768 * 24 color , I have to choose 800 * 600 * 16 color. You can also choose from (after startup, Ctrl Alt and - to switch). After setting the resolution, the installer will test x window. If you choose normal, then you can see beautiful X Window, then you can easily press OK, indicate it. After pressing the OK button, the installer will ask if your Linux system enters X Window, and the default is "Yes". But I don't like it. I chose "No" here so that I will enter the character status after starting Linux. When you need x window, execute the startX command manually start. Ok, reach this, Red Hat Linux 7.1 will prompt you to remove the disc, restart your computer, and the penguin with a small red hat sets your home. Note: Red Hat Linux 7.1 will run a program called Kudzu when starting, to complete some hardware add operations, usually a NIC and a sound card. The operation is very simple, you only need to select the Configure button, the system will help you complete the configuration of these hardware. 2.3 Other installation methods Introduction If you don't have a CD-ROM drive, you can also complete the installation in the following ways: 1) Installing from the FTP Site (Installing 3) From the SMB Shared Volume 4) From the hard disk installation 1. Making Linux boot disk If you use these installation methods, you first have to make two Linux boot dishes. 1) Find the two files of the image file of the Linux boot disk on the installation disc, the Boot.img (boot disk) and the Suppy.IMG (extension) of the / images directory. 2) Find the tool Rawrite.exe for making an image disc in / images, / install, or / dosutils directory.

3) Turn the image file and Rawrite.exe to the same directory, then execute Rawrite: C: Linst> Rawrite Enter Disk Image Source File Name on the DOS command: Enter the image file name Enter Target Diskette Drive: Here Enter the target drive letter as A: 2. Install from the FTP site To use this way to install one of the following conditions: 1) Your machine is connected to the FTP server stored in the installation disk; 2) in your local area network There is a mounting disk on the FTP server. Note that your FTP server must support long file names to be successfully installed. You need to use Linux's boot disk and extension, and configure a valid domain name server or the IP address of the specified FTP server. 3. Install from NFS Server If there is an NFS server in your local area network, you can copy the installation disk to the NFS server, then start with Linux boot disk, access the NFS server for installation. Similarly, this also requires an NFS server to support long file names. 4. Place the installation disk on a Windows 9x / NT / 2000 server that supports shared volumes from the SMB shared volume installation, and then starts using the Linux boot disk with the extended disk, and installs the installation disk in the shared volume. 5. Install this method from the hard disk to the user who downloads the installation disk from the Internet. First, you can copy the Red Hat Linux package file to your hard drive: 1) All files must be placed on a hard disk partition; 2 ) Put all the content in the redhat directory; 3) Then copy the package to be installed to another subdirectory RPMS then you can use the Linux boot disk to start the system installation. Chapter 3: Red Hat Linux 7.1 Using the Foundation 3.1 Login and Exit System 1. Starting the system Usually LILO is installed on the MBR, after the computer is started, the program on the MBR is executed, and one is not a very beautiful graphic: left is A small red hat image lists the operating system that can be started, you can use the keyboard arrow to switch. After the installation is installed, the default is Linux, that is, you don't choose, you will start Linux for a while. If you want the default choice is Windows, then you can modify the Lilo.conf file under the / etc directory after starting Linux, plus default = windows, then execute / sbin / lilo to regenerate LILO. 2. User Login Linux is a real multi-user operating system. Users to use the system, first must log in, after using the system, you must exit. When the user logs in to the system, in order to enable the system to identify the user, the username and password must be entered, and the system can be used after the system is verified. There are two users under Linux: 1) Root users: super authority, the owner of the system, there is only one root user in the Linux system, which can be in the system. The password set when the system is installed is the password of the root user. 2) Ordinary users: Linux system can create many ordinary users and specify corresponding permissions to make it limited to use the Linux system. With regard to the management of users, we will explain in detail later.

User login is divided into two steps: 1) Enter the user's login name, the system identifies the user according to the login name; 2) Enter the user's password, the password is a string of the user you choose, completely confidential to other users, is login When the system is identified, the user's unique basis, so each user should protect his password! At the beginning of the system, only root users, other users are created by root users. Since root users have too much permissions, if the Root user misuse will cause great losses. Therefore, it is recommended that the system administrator serves since the newly built a user, and only the root user is logged in when you need to do system maintenance. Below is a login example: (including the black body is input) Red Hat Linux Release 7.1 (Seawolf) Kernerl 2.4.2-2 on AN I686 Home Login: root password: In the above example, we found that it is empty behind Password In fact, it is not a password, but when entering, the Linux system does not display it, so that the password is used to protect the password! If you log in, we will get the shell (shell is a program used to interact with the user, it is like command.com in DOS, but there can be multiple shell options, such as Bash, CSH, KSH, etc.) The prompt, if you log in with the root user, the obtained prompt is "#", otherwise it will be "$". Tip: If the setting is set to a graphical interface at that time, then the system is started, the user login interface will be graphical, a bit like Windows, and when you enter the correct username and password, it will enter directly X window. This setting can be modified: there is an initTab file in the / etc directory, where there is a line configuration: ID: 3: Default where the number 3 is representing a startup character terminal, if it is changed to 5, the representative starts to enter X Window . 3. Modify the password In order to better protect the security of the user account, Linux allows the user to modify its own password with the passwd command to use the passwd command after logging in. Modifying the password requires: 1) Enter the original password, if the password is lost, the procedure cannot be modified; 2) Enter a new password; 3) Tips Repeat a new password, if the password is in line twice, Then the password is modified successfully. It should be noted that Red Hat Linux 7.1 is to better protect the password, if the new password you entered is too simple, it will refuse to modify it. Below is an example of a modification of the password: (in black body words) $ passwd Changing Password for User1 (CURRENT) UNIX Password: ß In some Enter the original password new Unix Password: ß Enter new password Retype New Unix Password: ß again Enter a new password passwd: All Authentication tokens Updated SuccessFully ß Modify success! Note that the password input here will not be displayed. And if the root user modifies the password, you don't need to enter your old password! That is, it can modify the password of any user. 4. Exit login No matter whether you are a root user or a normal user, you can quit login simply execute the exit command.

5. Turning off the machine In the Linux system, ordinary users are universal shutdown systems! Only root users can close it. Of course, if you are pressing the shutdown button, don't be true. We can implement: 1) Press the Ctrl Alt Del combination key so that the system will restart! 2) Execute the reboot command so the system will also restart! 3) Execute the shutdown -h now command so that the system will turn off the computer! 4) Execute the HALT command to turn off the computer. Pay attention to not use a hard shut-off, restart key, etc., which will cause the Linux file system to damage! 6. Virtual Console Linux is a real multi-user operating system that can accept remote and local logins at the same time, and allow the same user to log in multiple times. Linux is a local user (that is, users doing in front of the computer) provide virtual console access, allowing users to log in multiple times from different consoles at the same time. The selection of the virtual console can be implemented by pressing the ALT key plus F1-F6 six function keys. For example, after the user logs in, press the Alt F2 combination key, and the user can see "Login:" prompt, which is actually the second virtual console, and then press the Alt F1 combination key, the user It can also return to the first virtual console. You can experience multi-user characteristics of Linux systems by using a virtual console. For example, the user can switch to another virtual console at another virtual console on a virtual console that can be switched to another virtual console. For example, when developing software, you can edit the program on a console, compiling on another console, check the information on the third console. 3.2 Files The Directory Operation is the same as other operating systems, and the user's data and programs under the Linux system are also saved in the form of a file. So in the process of using Linux, it is often necessary to operate with the directory. Now we learn the files and directory operation methods under Linux with a WINDOW user. 1. File name and file type file name are identified by a file. From this perspective, the rules of the file name are substantially the same as Windows 9x. It is also composed of letters, numbers, underscores, and dots, and the maximum length is 255 characters. Like Windows 9x, there are normal files and directory files in the Linux system, but the directory file is referred to as a directory in Window. And there is a special file in the Linux system, that is, the device file. In the Linux system, each I / O setting is mapped into a file, which can be handled as normal files, which makes the operation of the file and the device as unity. From the user's users, the use of the I / O device is almost the same as the usage of the general file, so you don't have to know the details of the I / O device. 2. The directory structure is the same as Windows, and the file is organized in Linux. But the difference is that there is only one root directory under Linux, not as one partition in Windows. If there are multiple partitions, you need to use other partition mount to the root directory. Everyone recalls that when it is partitioned for the Linux, there is a option to fill, that is, Mount Point, we write one "/", which is the root directory (this is the opposite of Windows, one is "/", one is " / "It's really natural. Other probably/ home, / usr. After installing the system, you will find / home, / usr is the Home, USR directory below the root directory! Yes, the entire partition is used for this directory.

After installing Linux, there are many directorys. Let's explain some important directories: / bin: The commands that are used for more than 100 Linux, tools / dev: All device files under Linux! / home: User main directory, every construction, you will create a directory with the same name as the user, give the user a space / Lost Found: As the name suggest, some lost files may be available here / mnt: The mount point of external equipment, usually uses CDROM and FLOPPY two subdirectories! Its existence simplifies the use of disc and floppy disk. You only need to run in the CD, you can visit the content mount to / mnt / cdrom on the CD, you can visit the contents of the CD to / MNT / CDROM. However, after you use it, you should leave this directory and perform Umount / MNT / CDROM. Similarly, the floppy disk is Mount / MNT / FLOPPY and Umount / MNT / FLOPPY. / proc: This is actually a fake directory, and you can access the content in memory by here. / sbin: A system-level command and tools are stored / usr: Typically used to install a variety of software / usr / x11r6 x window directory / usr / bin and / usr / sbin some post-installation commands and tools / USR / Include, / usr / lib and / usr / share is to store some shared link library / usr / local commonly used to install new software / usr / src linux source / boot: Linux is started from here / etc: here is stored in Linux Most of the profiles / lib: static link library / root: root user's home directory, this is one of privileges! / var: Usually used to store things in some changes! / var / log: Storage System Log / VAR / Spool: Store some emails, news, print queues, etc. In addition, it is to be explained, in "Current Directory", "Path", etc. under Linux is the same as WINDOWS. 3. Show file content Users who have used DOS commands should know that we can use the type command to view the content of a file. There are five related commands under Linux, and the functions have a thousand autumn, but they are as used as the Type command, can only be used to view text files. 1) CAT command CAT command is the most icon of the Type command, the method used is simple: "CAT file name". However, more powerful than the Type command is that it can view multiple files at the same time: "CAT file name 1 File name 2". 2) More command If the text file is longer, the screen cannot be displayed, so you may not be able to see it using the CAT command. Here we can simply use more to replace the CAT command. Its effect is similar to Type file name / p. Using the more command will display a screen text, after the display is full, stopped, and prompt the percentage that has been displayed, press the space bar to see the next screen. 3) The ability of the LESS command LESS command is almost the same as the more command. It is also a page display file, and the difference is that the LESS command allows the user to pass back files forward when the file is displayed. Ø Turn forward: Press B. Ø Run back: Press P to: Ø Specify location: Enter percentage Ø Exit: q I often use more and less, hardly use CAT to view files.

4) The head command can only view the first few rows of a file, the format is: Head Route file name If the number of rows is not specified, the default value is used. 5) The tail command corresponds to the head command, we can use the tail command to view the contents of the file tail. Usually used to monitor whether a file is modified in real time, usually used to observe the log. Such as: Tail -f Maillog 4. Edit files There are many text editing tools in Red Hat Linux 7, which is the most commonly used VI, which is an editor widely applied to all UNIX systems. It is somewhat specifically: First, you can open a file using the command "VI file name". When you just start, the VI is in the command state and cannot enter any character. In this state, you can use the arrow keys to move, and when you need to enter content, you need to enter the "I" or "A" command to enter the editing state. Once the editing is complete, you need to press the "ESC" button to return to the command status. In the command state, you can enter ": q!" Does not store it, enter the ": WQ" storage exit. 5. Document copy, delete and mobile everyone are well known under DOS We can use the COPY, DEL, MOVE command to implement file copy, delete, and move. Let's talk about how to do more in the Linux system. 1) CP command: File / Directory copy command Its syntax format is: CP [Option] Source file or directory target file or directory common option: Ø a This option is often used when copying the directory, it reserves the link, file properties And recursively copy the directory, just like XCOPY / S in DOS Ø f If the target file or directory already exists, you will overwrite it, and do not prompt Ø i and the F option, it is overwriting, it will let the user Answer "Y" to confirm that Ø p Use this option to copy the file when you reserve the modification time and access Ø r If the source gives the source is a directory, then the CP will recursively copy all the subdirectory and files under the directory, but this The demand is also a directory name. In addition, everyone should pay attention to that if the source is a file name, the target is the directory name, then the multiple source files can be specified using the CP command. Such as: $ cp a.txt b.txt / home / user1 This command will copy the A.TXT and B.TXT files to the / home / usr1 directory.

2) RM command: File / Directory Delete Command Its Syntax Format is: RM [Options] File ... Commonly used options are: Ø f Do not give any instructions during the delete, directly delete Ø r indicates that RM lists the parameters. All directory and subdirectory are recursively deleted Ø i interactive deletion, each file gives a prompt when deleting prompts to use the RM command, especially when logging in with root, I have seen a friend is using When the RM command deletes the / home / tmp, the command "RM-RF / HOME / TMP" misuses the command "RM-RM-RM-HOME / TMP", and the result is that the whole system is deleted before he walks back to the computer! 3) MV command: File / Directory Move Commands Its Syntax Format is: MV [Option] Source File or Directory Target File or Directory Common options Are: Ø f If the action is to overwrite an existing target file does not give any instructions Ø I interactive operation, if the operation is to override the existing target file, ask the user to overwrite the execution effect of the MV command and the parameter type! The first parameter (source) second parameter (target) result file name file name will change the source file name to the target file name file name directory name file Move to the target directory Directory name directory already exists: Source directory to the target directory The target directory does not exist: the renamed directory name file name error 6. Directory Related Operation 1) Create a new directory: MKDir, its use is the same as the MD under DOS: MKDir directory name; 2) Delete the empty directory: RMDIR, its use The same RD under DOS: RMDir directory name; 3) Change the directory: CD, its use is basically the same as the CD command under DOS, the only one is, no matter what the directory name is, there must be space between the CD and the directory That is: "CD /", "CD ..", "CD." Is illegal, but should be entered: "CD /", "CD ..", "CD.", If you enter the command "CD ", Do not add any parameters, will return to the home directory of this user. 4) Display current directory: PWD 5) Column directory command: LS, equivalent to DIR in DOS Its syntax is: LS [option] [directory or file] Common options: Ø a Display all subdirectory in the specified directory With files, including hidden files; Ø c Press the file modification time Sort Ø l Use long formats to display the details of the file, each file is a line of information, its content is: File Type and Permissions Link Document Lord Size Recently Modified Time File Name 7. Files and Directory Permissions Operations In Linux systems, each file and directory have corresponding access license privileges, can we use it to determine how to access files and directories? And operation. The access rights of the file or directory are divided into readable, writable and can perform three kinds, which are represented by R, W, X, which means that the RWX file readable can be written can be used to list the directory. Writing can access the directory When the file is created, the file owner can set the permissions of the file.

For a file, you can divide the user into three, and give different privileges: 1) File Owner 2) With the file owner's group users 3) Other users, each file or directory access, three Group, each group is expressed in three, such as: D rwx rx r - Part 1: D represents the directory here, other: - Represents normal file C represents character device file; Part 2: File owner's permission word Here is RWX to represent readable, writable, executable (can enter the directory); Part III: Writing words with the user's associated user, here is R - X means readable, Do not be writable, executable. Due to more communication between the same group users, let him look at the file, don't change it. Part IV: Other users' permissions word, here - - -, of course, people who have nothing to do, my files don't just write you, not letting you read. 1) File / Directory Permissions Settings Command: Chmod This is one of the most commonly used commands for Linux system administrators, which is used to change access to files or directories. This command has two usages: Ø Use the text settings containing letters and operator expressions, its grammatical format is: chmod [who] [opt] [mode] file / directory name where WHO represents object, is in the following letters One or a combination: u: Represents the file owner g: Represents the same group user o: Represents other users A: Indicates that all user OPT is a representative operation, which can be: : Add a permission -: Cancel a permission =: Give Given permissions, and cancel the original permissions and modality representative: R: Readable W: Write x: Executive, for example: add-write permission to file A.TXT for the same group: CHMOD G RW A.TXT Ø Using Digital Setting Methods More Simple: Chmod [Mode] The key is the value of MODE. At the beginning, many beginners will be confused. In fact, we are very simple, we will see RWX The binary number, if there is one represented, there is no 0, then RWX RX R-can be represented as: 111 101 100 to convert each three digits to a decimal number, that is, 754. For example, we want A.TXT's permissions to: you can read it by other users of your own group, is it writable to be executable, let's get the right string according to the above table: RW-RW-R - Then, the converted into a binary number is 110 110 100, and then every three-digit conversion becomes a decimal number, it will be 664, so we execute commands: chmod 664 a.txt 2) Master command to change the file: Chown syntax format is very simple: Chown [Option] Username File / Directory Name Where is "R", plus this parameter, you can change all subdirectories and files of the entire directory into designated users. 3) Change the file genus command: chgrp This command is also very simple: CHGRP Group name file name 3.3 User management user management, the main job is to establish a legal user account, setting up, and managing the user's password, modify the properties of the user account and Delete the discarded user account when necessary.

1. Add a new user in the Linux system, only root users can create a new user, the following command will create a user of the login User1. # UserAdd User1 However, this user cannot be logged in because it has not been given to the initial password, and the user without password is not able to log in to the system. By default, a user main directory that is the same as the username will be created under the / home directory. If you need another user-owner directory, then you can use the following command: # UserAdd -d / home / xf user1 At the same time, you will get a shell program when you log in: / bin / bash, and if you don't want this user to log in, You can also specify the user's shell program as: / bin / false, so that even if the user is logged in, it is not able to perform commands under Linux: # Useradd -s / bin / false User1 In Linux, add a user while adding a user A new group will be created, this group is the same name with the user, and this user is a member of the group. If you want new users to belong to a group already existing group, you can use the following command: # Useradd -g user USER1 This user belongs to a member of the User group. And if you just want it to belong to a group, you should use: # userAdd -g user user1 After completing this, you should use the passwd command to set an initial password. 2. Remove a user to delete a user, just use a simple command "Userdel username". However, it is best to remove it on the system, and you can use the "UserDel -r User Name" to achieve this. 3. Modify User Attributes In front we see how to specify its user home directory when newing a user, how to specify its shell, how to set the group to which it belongs ... etc. Provide a command in Linux to implement: UserMod -g Group name -g Group name -D User main directory -s user shell has a direct method, that is, modify the / etc / passwd file, each in this file. User's content is: User Name: Password: User ID: Group ID: User Name: User Home Copy: User Shell But notice that the password is usually replaced with a * number, you It can't be seen. 4. Increasing a group, remember that Linux files can set different access rights for those who are in groups, non-group people? We can create user groups according to your needs: GroupAdd group name 5. Delete a group, we sometimes need to delete a group, its command is the group name. 6. Modify group members If we need to add a user to a group, simply edit the / etc / group file, write the user name to the group name. For example, add newuser users to the SoftDevelop group, just find SoftDevelop: x: 506: User1, user2 then add newuser, forming: SoftDevelop: x: 506: User1, user2, newuser additional, in Red Hat A graphical user management tool is also provided in Linux: userConf, which can manage user management more directly. 3.4 Process Management Linux is a multi-user operating system. Multi-user means that multiple users can use a computer system at the same time; multitasking means that Linux can execute several tasks at the same time, which can perform another task while not completing a task. All running things on the Linux system can be called a process.

Each user task, each system management daemon, can be called a process. Linux uses all tasks to share system resources with all tasks. Let's take a look at how to control these processes. 1. Startup process There are two ways to start the process in the Linux system: 1) When entering the command directly, start a process directly Ø In normal case, the process will execute at the front desk, then we can't execute new commands Ø If we add a "&" after the command, the row process will be executed in the background, we can still perform new commands 2) By the AT, Cron, the crontab command can be scheduled to start a certain time like the planned task in Windows. Process, specific usage methods You can use the Man command name to query. 2. View the process In the Linux system, we can use the PS command to view the running process, for example: List the process belonging to the current user: # ps pid tty time cmd 16767 PTS / 1 0:00 PS 18029 PTS / 1 0: 00 Bash where the PID represents the process ID, TTY is the process started by this process, and the CMD is a command. If you want to list more detailed information, you can use the command: "ps -auxw". 3. Termination Process One process will be completed automatically after the task is completed. If you want to stop this process, there are two methods: 1) For programs running in the front desk, the process can be aborted directly by the combination key Ctrl C; 2), for the program running in the background, you need to introduce the previous introduction The PS command finds its process number and then uses the "Kill process number" to terminate the process. 3.5 Disk Management System Software and Applications All in the form of a computer in the form of a computer, as system administrators should monitor the usage of disk space at any time. We can use the following two commands to implement: 1. DF command df, is Disk free, as the name refer to check how many space left on the disk. Here is an example: # DF FileSystem 1k-block Used Available Use% MOUNTED ON / DEV / HDA5 4134900 1749728 2175124 45% / / DEV / HDA6 6048320 5741092 0 100% / home showed 6 columns: 1) FileSystem: Hard Disk Partition 2) 1k-blocks: Press the partition size 3) Used: Size size (Press K) 4) Available: Partition Size 5) USE%: The percentage of the space has been used 6) MOUNTED ON: Mounting point can be seen / home is another partition, and now the space has been runned! This is no planning! If you represent a hard disk space for the calculation unit, you can use DF -M, which will use m to calculate the unit. 2. Du command du is Disk usage, just look at the disk usage. Here is an example: #PD / var / log # du 4 ./uucp 776. Here, we use the du command to list the disk space occupied by the / var / log directory. It statches this directory with a subdirectory: UUCP, occupied 4K, and the files in / var / log directory have 776K.

This command has some common options to complete more features: Ø -a will list all files, subdirectories, subdirectories in the current directory, subdirectory in subdirectory ... Ø -B In-byte, the disk space that is occupied Ø -c is finally displayed on the Red Hat Linux installed under Red Hat Linux, and the application software installation package usually has two formats: 1) RPM package, such as Software -1.2.3-1.I386.rpm. It is a packaged format created by Redhat Linux. 2) TAR package, such as Software-1.2.3-1.tar.gz. It is packaged using a packaging tool Tar using UNIX system. Moreover, most Linux application packages also have certain rules, which follow: Name - version - revision - type, for example: sfotware-1.2.3-1.i386.rpm Software Name: Software version number: 1.2.3 Correction Version: 1 Available platforms: I386, suitable for Intel 80x86 platforms. Type: RPM, an illustration is an RPM package. According to the contents of the Linux application software installation package can be divided into :: 1) is an executable file, which is to run directly after unpacking the package. All packages in Windows are this type. You can use it after you have installed this program. However, pay attention to this software is the platform you use, otherwise it will not be installed. 2) The other is the source program, and after unpacking the package, you also need to use the compiler to compile it into an executable file. This is almost no in the Windows system, because Windows's thoughts are not open source. Typically, use TAR packages, all source programs; and use RPM packages often executable. 1. Applying software RPM to use RPM packaging, RPM, can be called a contribution of Redhat, which makes Linux software installation more easily. 1) Installation: I only need a simple sentence, you can finish it. Execute: RPM -IVH RPM software package name is higher, please see the following table: RPM parameter parameter Description -i Installation Software - T Test Installation, not really installing the -p display installation progress -f no matter any error - Upgrade installation - v Detects if these parameters are installed correctly. More content can refer to the command help of the RPM. 2) Uninstall: I also need to finish simply a simple sentence. Execute: RPM -e software name But note that the software name is used later, not the software package name. For example, when installing Software-1.2.3-1.i386.rpm, you should execute: rpm -ivh software-1.2.3-1.i386.rpm and when uninstalled, then: rpm -e software. 2. Finding the application software for TAR packages 1) Installation: The entire installation process can be divided into the following steps: Ø Get the application software: Get the method of downloading, buy CD; Ø Unpleaged file: General Tar bag, will make a compression, Such as Gzip, BZ2, etc., you need to decompress first. If it is the most common GZ format, you can execute: TAR-XVZF Software Package Name, you can complete the decompression and unpacking work in one step.

If not, first use decompression software, then perform "TAR-XVF Decompression Tar Pack" for unpacking; Ø Read the included install file, readme file; Ø Execute "./configure" command to prepare for compilation; Ø Execute the "make" command for software compilation; Ø Execute "Make Install" to complete the installation; Ø Execute "Make Clean" to delete the temporary file generated during installation. Ok, I have a big merit this. We can run the app. But at this time, some readers will ask, how do I execute? This is also a problem with Linux features. In fact, in general, Linux's application software will be stored in / usr / local / bin directory! However, this is not the truth of "all the four seas", the most reliable or see this software's install and readme files, generally will be explained. 2) Uninstall: Usually developers developers rarely consider how to uninstall their own software, and TAR is only the work of packaging, so there is no good unloading method. Make Uninstall is generally provided to uninstall the software. . To be a good operating system, in addition to the performance stability, full function, you should have a friendly operating system, otherwise you will only stay in the study room, it is difficult to spread. Under UNIX systems, most of them use x window as graphical interfaces. In 1984, the Massachusetts Institute of Technology and DEC have developed ATHENA programs, which is the first version of X WINDOW. A non-profitred X alliance was established in January 1988, which is responsible for developing the standards of X Window. After Linux appears, Xfree86 Project Inc. implements an open source based on Linux: Xfree86. X Window Compared to other graphical interface systems, there are several features: Ø Good network support: X WINDOW uses a C / S network structure, and the program can communicate through the network, and there is a good network transparency, that is Say users don't need to know the program in using remote host resources. Ø Personalized window interface: X WINDOW does not have a uniform specification for window interface, programmers can design it according to demand, where the most famous is the gnome and KDE you want later. Ø Inside the operating system: X WINDOW only defines a standard, not an operating system, so you can run the same X Window software on a different operating system. The entire X WINDOW consists of three parts: Ø X Server: Mainly the program that controls the output and input devices, and maintains related resources, it receives the information of the input device, and pass it to X Client, and transmits X Client The information is output to the screen. So different graphics cards need to choose different X Server, the most important thing when configuring X WINDOW is to configure X Server Ø X Client: It is the core part of the application, it is unrelated to hardware, each application is one X Client Ø x Protocol: X Client between X Server is x protocol to make X Window more easy to use, each different company and organizations have made many integrated desktop environments. For example, CDE on AIX, Sun OpenServer, and under Linux is mainly GNOME and KDE's double male club. Let's take a look at them. 4.2 GNOME Introduction GNOME was initially initiated by Mexico programming Miguel DE ICAZQ, which was supported by Red Hat.

It is now part of the GNU (GNU IS Not UNIX) program, the main purpose is to provide users with a complete, easy to learn to use the desktop environment and provide a powerful application development environment for program designers. In August 1997, in order to overcome the difficulty of QT license agreements encountered by KDE, the 250 programmer headed by Mexico's Miguel DE ICAZA was started, starting from the beginning, this is GNOME. After 14 months of joint efforts, this project was finally completed. Now Gnome has received support for the maximum distributor Red Hat of Linux market share, with a large number of applications, including text processing software Go, spreadsheet software gnumeric, calendar gnomecal, graphic image processing software GIMP, comparable to Photoshop, etc.. Now GNOME and KDE have become two major competitive camps, which will make Linux easier to use.

A large number of applications are also available in GNOME, they are all placed in GNOME (a little feet) à programs, including a lot of applications, below: 1. Applications: Application Software 1 DIA: A Drawing Editor for drawing circuit diagrams; 2) Calendar: a good tool for a set calendar and a schedule; 3) Address book: A address book 4) Gedit: A function is similar to the notepad under Windows This text editor; 5) GNUMERIC: a spreadsheet software similar to Excel under Linux; 6) Time Tracking Tools: a gadget for reminder time; 2. Games: Game Software 1) Gnome Milnes: gnome Mining; 2) Gnibbles: Eat snake games; 3) Freecell: Air Xilong Dragon Game under Windows; 3. Graphics: Graphics Processing Software 1) Electric Eyes: A very excellent graphics processing software, can be described as gnome ACDSEE! 2) XPDF: A tool for reading PDF documents in Linux; 3) The GIMP: A very excellent drawing software, very elephant with Photoshop! 4. Internet: Internet Application Software 1) Dialup Configuration Tool: An interface is very friendly Coiled Internet setting tool; 2) GFTP: A FTP client 3) Pine: A E-mail client software 4) Netscape: Ding Ding browse Software, 5) RH Network Monitor: Network traffic display 5. MultiMedia: Multimedia Software 1) Audio Mixer: Sound Controller 2) CD Player: CD Player 3) XMMS: Winamp is a The 4.3 KDE introduction of the Duzi was initiated in October 1996, which is a completely easy to use desktop environment on X-WINDOW. KDE now except that KFM (similar to IE4.0), KPRESETER (similar to PowerPoint), Killustrator, etc. Heavyweight software, and a considerable user's GUI configuration software helps users configure UNIX / Linux to make them deep Welcome by the user. However, because KDE is based on the QT library developed by Trolltech, it has also been criticized. Although QT itself is very good as a C cross-platform development tool, but unfortunately it is not free software. Qt's license allows anyone to use QT to write free software and free copies to other users, but if you use QT to write non-free software, you need to purchase their license. More importantly, no one can modify the QT source code at will. If Trolltech change QT License, the company is closed or giving people to the acquisition will make KDE before.

In KDE, there are many applications, which are packet in the "Start" menu, saying, I feel that KDE's software application is more than gnome, and the graphical interface is better. 1. Office: Office software This is a famous Koffice kit. 1) KWORD: Word processing software 2) KSPREAD: EXCEL spreadsheet processing software 3) KPRESEnter: A Demo Software similar to PowerPoint 4) KCHART: An Electronic Chart Software 5) Kiiiustrator: An Electronic Publishing Software 2. Develop: Development Tool 1) KDevelop: Integrated Development Environment under a KDE 3. Applications: Application Software 1) Advanced Editor: A Enhanced Text Editing Software 2) Emacs: This is a powerful editing software, in Gnome, it Orthox is the Emacs 3 under the character terminal) Organizer: A schedule Software 4. Internet: Internet Software 1) KPP: A very friendly Co-Down Configuration Tool 2) Kmail: A very beautiful Email client, a bit like Outlook! 3) Chat Client: A IRC Client 4) KppLoad: A Network Traffic Tool 5) Netscape: The famous web browser, there is also integration in GNOME 4.4 Using Window Manager Red Hat Linux 7.1 After the default installation, x WINDOW will use GNOME As a window manager, unless you remove GNOME when you install, and choose the KDE package. Usually we can install these two packages and choose again when you are using. 1) Execute the following command under the character terminal, then X Window window manager has become KDE: # SwitchDesk KDE 2) If you don't want to use KDE, you can use the following command to turn back to GNOME: # SwitchDesk Gnome 4.5 Chinese Red Hat Linux 7.1 1. Install the TrueType font to use Chinese TrueType font in the system, it is best to disable the XFS font server, XFS automatically updates the fonts.dir file under the font directory at boot, which will affect our modification . Log in as root, then execute the Setup tool, close the XFS in the service.

1) Modify the XF86CONFIG-4 configuration file to enter the / etc / x11 directory, edit the XF86CONFIG-4 file with VI, as follows: section "Files" # fontpath "UNIX /: 7100"; comment out this line, add the following A few lines of fontpath "/ usr / x11r6 / lib / x11 / fonts / misc: unscaled" fontpath "/ usr / x11r6 / lib / x11 / fonts / 75dpi: unscaled" fontpath "/ usr / x11r6 / lib / x11 / fonts / 100DPI : UNSCALED "fontpath" / usr / x11r6 / lib / x11 / fonts / misc "fontpath" / usr / x11r6 / lib / x11 / fonts / type1 "fontpath" / usr / x11r6 / lib / x11 / fonts / spetedo "fontpath" / usr / x11r6 / lib / x11 / fonts / 75dpi "fontpath" / usr / x11r6 / lib / x11 / fonts / 100dpi "fontpath" / usr / x11r6 / lib / x11 / fonts / trueType "endsection section" Module "LOAD" dbe "# Double-buffering Load" GLcore "# OpenGL support Load" dri "# Direct rendering infrastructure Load" glx "# OpenGL X protocol interface Load" extmod "# Misc required extensions Load." v4l "# Video4Linux Load" xtt "; Add this line endsection 2) Get the font file SIMSUN.TTTF new to create: / usr / x11r6 / lib / x11 / fonts / trueType, and then copy the partition mount in Windows and copy SIMSUM.TTF to the directory.

3) Generate font list CD / USR / X11R6 / lib / x11 / fonts / trueType # TTMKFDIR> FONTS.DIR # vi fonts.dir modifies the font list file to make it simnsun.ttf -misc-sIMSun-Medium-r -NORMAL - 0-0-0-0-P-0-ASCII-0 SIMSUN.TTTTF -MISC-SIMSUN-Medium-R-NORMAL - 0-0-0-0-P-0-FCD8859-15 SIMSUN . TTF -MISC-SIMSUN-Medium-R-Normal - 0-0-0-0-P-0-ISO8859-1 SIMSUN.TTTF -MISC-SIMSUN-Medium-R-Normal - 0-0-0- 0-P-0-GB2312.1980-0 SIMSUN.TTTF -MISC-SIMSUN-Medium-R-NORMAL - 0-0-0-P-0-Koi8-R #CP Fonts.dir Fonts.Scale 4 ) Modifying the font definition of GTK # vi /etc/gtk/gtkrc.zh_cn The modified content is as follows: style "gtk-default-zh-cn" {fontset = "-Misc-simsun-medium-r-Normal - 14- * - * - * - * - * - * - * - * "} class" gtkwidget "style" gtk-default-zh-cn "2. Install Chinese input method ChinaPut 3.0.1 1) Download the following packages first: chinput -3.0.1-1.I386.RPM PTH-1.3.7-3.I386.rpm unicon2-im.tar.gz 2) Then install: # rpm -ivh pth-1.3.7-3.i386.rpm # rpm -IVH chinput-3.0.1-1.i386.rpm --Nodeps # cp unicon2-im.tar.gz / usr / lib # cd / usr / lib # TAR VFXZ UNICON2-IM.TAR.GZ # RM Unicon2-IM .tar.gz # ln -s libstdc - 2-libc6.1-1-2.9.0.so libstdc - libc6.1-2.so.3 3) Modify some configuration # cd / usr / LIB / ZWINPRO # vi chinput.ad Modify the following places ... chinput.gblocale = zh_cn.gb2312 chinput.big5locale = zh_cn.gb2312 ... chinput.gbfont = -Misc-SIMSUN-Medium-r-Normal - 14 - * - * - * - * - * - - GB2312.1980-0 chinput.big5font = -Misc-simsun-medium-r-NORMAL - 14 - * - * - * - * - * - GB2312.1980-0. .. (Note: Space can not appear in this file, only use Tab instead) 4) Modify ~ / .bashrc file, add the following lines: export lc_all = zh_cn.gb2312 export lang = zh_cn.gb2312 export xmodifiers = @ Im = chinput 3. After the GNOME is restarted, you can display Chinese when you execute StartX, you can display Chinese in GNOME. Then, you can complete the Chinese environment and input method installation by adding ChINPUT to the launch running in Program-> STARTUP Program.

4. Hanhua KDE If it is a KDE system, turn on Preferences-> Personalization-> Country & Language, select Chinese, open Look & Feel-> Fonts, select the corresponding font, and change the character set to GB2312.1980-0. Finally, open the autostart directory on the desktop, create a new application (chinput) connection, and you can use Chinese input method after each startup. Chapter 5: Network Apply 5.1 Common Network Commands are provided in Red Hat Linux 7.1 system Tools related to the network, master these tools are important: Class: Setting tool 1.netconf: NetConf is part of the LinuxConf provided by Red Hat Linux, primarily for settings related to the network. It can run under consLle (text menu) or run in X-WINDOW (graphical interface). In front, we introduced some of NetConf's applications, and its use is relatively simple, as long as you know the English above, so there is no more to say it here. BTW, if you set up x-window, use NetConf with the graphical interface, it will be more beautiful. 2. Ifconfig ifconfig is the most commonly used tool for displaying and setting up network devices. Where "if" is an abbreviation of "interface". It can be used to device network card status, or display the current settings. Below we will simply explain the common command combination: 1) Set the IP address of the first block to 192.168.0.1: ifconfig eth0 192.168.0.1 (Format: ifconfig network device name IP address) 2) Temporarily close or enable NIC: Close The first network card: ifconfig eth0 Down enables the first network card: ifconfig eth0 up 3) Set the subnet mask of the first network card to 255.255.255.0: ifconfig eth0 Netmask 255.255.255.0 (Format: ifconfig network device name Netmask Net mask) We can also set IP addresses and subnet masks at the same time: ifconfig eth0 192.168.0.1 Netmask 255.255.255.0 4) Set the broadcast address of the first network card to 192.168.0.255: ifconfig eth0 -Broadcast 192.168.0.255 5) Set the first block to the non-receiving data packet: ifconifg eth0 allMulti If you want to receive it, use the command: ifconfig eth0 -allmulti 6) View the status of the first network card: ifconfig eth0 If you want to see all NIC status If you use the ifconfig command without parameters directly.

The status information of ifconfig output is very useful. Here, we will briefly describe: There are several status comparison: Ø UP / DOWN: NIC is started, if it is Down, then it is certainly unused; Ø RX Packet The number of ErrorS package If you have a problem when you receive the network card; Ø The number of ErrorS packets in tx packets If you have a problem when you send it, you have a problem when sending; 3.Route Route command is used to view and set up Linux systems Routing information to implement communication with other networks. To achieve network communication between two different subnets, you need a gateway that connects two network routers or at the same time in two networks. In the Linux system, we usually set the route to address the following questions: This Linux machine has a gateway in a local area network, which allows your machine to access the Internet, then we need to set the IP address of this machine to The default route for the Linux machine. 1) Add a default route: Route Add 0.0.0.0 GW Gateway Address 2) Delete a default route: Route del 0.0.0.0 GW Gateway Address 3) Show current routing table ROUTE second Class: Diagnostic Tool 1.ping ping is a The most commonly used detection can be able to establish a network communication connection with the remote machine. It is implemented by Internet Control Packet Protocol ICMP. Some hosts are now filtered to ICMP. In this particular case, it is possible to make some host ping not pass, but can establish a network connection. This is a special case, which is described here. Similarly, all optional parameters of the ping command are not listed in the example, but through example, some commonly used combinations are needed, and they need to know more detailed, and can be obtained from the online training for www.linuxaid.com.cn website. . 1) Detection is normal: ping 192.168.0.1 ping www.linuxaid.com.cn That is, we can specify the machine with an IP address or domain name. 2) Specifying the number of ping responses is 4: Under Linux, if you do not specify the number of responses, the ping command will continue to send ICMP information to the remote machine. We can define the -c parameter: ping -c 4 192.168.0.1 3) Ping through a specific network card: Sometimes we need to detect a block (multiple blocks in the system) can ping the farm machine. We need to indicate when executing the ping command: ping -i eth0 192.168.0.1 2.traceroute If you don't ping universal machine, I want to know where it is, or you want to know your information to the remote machine. Which routers can use the traceroute command. As the name suggests: Trace is tracking, Route is routed, that is, tracking routes.

Using this command is very simple: Traceroute Remote Host IP Address or Domain Name This command is similar: 1 Rouler (gateway) IP address access required time 1 Access required time 2 Access required time 3 2 Rouler (gateway) IP address Accessing time 1 Accessing time 2 Accessing time 3 ......... 1) The most advanced number representative "After the first few"; 2) The IP address of the router (gateway) is the IP address of "The station"; 3) Accessing time 1, 2, 3 refers to the time required to access this router (gateway). 3.NetStat In the Linux system, it provides a tool that views a powerful viewing network status: NetStat. It allows you to know the network of Linux systems. 1) Statistics each network device transmission, receive the data package: Use the command: netstat -i this command will output a table, including: ifce: Network interface name MTU: Maximum Transmission Unit RX-OK: How much is successful Package RX-ERR: How many error packages are received in the received package RX-DRP: How many packages are lost when receiving, how many collision packs TX-OK have received TX-ERR : How many error packages in the sending package TX-DRP: TX-OVR: TX-OVR: TX-OVR: Total a total of collision packs 2) Display network statistics use command: NetStat -s uses this command, Communication information in the form of IP, ICMP, TCP, UDP, TcPext will be statistically statistically in the form of a summary. 3) Display the network connection of the TCP transfer protocol: Use the command: NetStat -t output is also a table, including: local address: local address, format is an IP address: port number Foreign Address: Remote address, format Also IP address: port number state: connection status, including listen, established, time_wait, etc. 4) Only network connection using UDP: Use the command: NetStat -t output format is the same. 5) Display the routing table: Use the command: NetStat -r The output of this command is the same as the Route command. 5.2 Network Profile In Red Hat Linux 7.1, there are some files for storing network configuration: 1. (Tetc/Hosts) is stored in this file, a list of IP addresses and hostnames, if you point out some in this list The IP address of the station is not necessary to perform DNS analysis when accessing the host. 2./etc/host.conf This file is used to specify the order of the domain name resolution method, such as: ORDER HOSTS, BIND which description, first parse by / etc / hosts file, if there is no corresponding host name and IP address in this file The correspondence is parsed by the domain name server BIND. 3./etc/resolv.conf stores the IP address of the domain name server in this file. 4./etc/protocols Red Hat Linux 7.1 The system uses this file to identify this host, and the user should not modify the file by the mapping between the protocol and the protocol number. 5./etc/services This user is used to define an existing network service, and users do not need to modify it, which is usually maintained by programs that install the network service.

This file includes a network service name, network port number, and useful protocol type, where there is a slash between the network port number and the protocol type used, and some service alias can be added to the final setting of the line. 5./etc/xinetd.d Directory There is a super service outd in the Linux system, most of the network services are started by it, such as Chargen, Echo, Finger, Talk, Telnet, Wu-ftpd, etc. The version between 7.0 It is configured in /etc/inetd.conf, after Red Hat 7.0, it changes to a xinetd.d directory. In the xinetd.d directory, each service has a corresponding profile. We use Telnet as an example to explain the meaning of each configuration line: Service telnet {socket_type = stream wait = no user = root server = / usr / sbin /in.telnetd log_on_failure = Userid disable = yes} The first line describes the configuration to set the Telnet service. The second line shows that the Socket connection type is stream, which is the third line of TCP. It means that the startup completion of the fourth line is referring to the fifth line of the root user started the service process. Means that the service process is / usr / sbin / In.Telnetd six lines, it is used to do some error logs, refers to the disabled Telnet, if an open is required to change the configuration to: disable = no modified the XINETD configuration, you need to restart xinetd to take effect, There are two ways to implement: 1) Perform the following command: /etc/rc.d/init.d/xinetd Restart 2) Perform the following command: KILLALL-HUP XINETD 5.3 Network Service Access Limits Enhanced Network in Red Hat Linux 7.1 Safety prevention, if you are installed, the security level is not at the lowest level, then all access outside the unit may be rejected. This is because some default IPChains settings are made in Red Hat 7.1, which is a Linux built-in firewall mechanism that can use some rules to allow or disable access. Its rules are stored in the / etc / sysconfig / ipchains file, if you want it to temporarily do not take effect, then you can run /etc/rc.d/init.d/ipchains stop, then all rules are canceled, all Network access will be allowed. You can run /etc/rc.d/init.d/ipchains status to know the restrictions on network access. With regard to this knowledge, this article is limited to the space unable to introduce, interested readers can refer to the "Linux firewall" book. 5.4 Web Server is most suitable for server-only Apache, Red Hat Linux 7.1 integrates Apache 1.3.19 in Red Hat Linux 7.1, and you will automatically complete the installation of Apache servers as long as you select a web server during installation. By default, WWW services have been launched.

If you don't have a web server package when you install, there is no relationship, you only need to perform the following command: 1) put the Red Hat Linux 7.1 Install the first place in the CD drive, then execute the following command: # mount / MNT / CDROM 2) Go to Apache Installation File Where: # cd / mnt / cdrom / redhat / rpms 3) Complete the installation using RPM: # rpm -ivh apache-1.3.19-5.i386.rpm now, you have Have a Linux-based web server, its configuration file is in the / etc / httpd / conf directory, you can make a corresponding modification as needed, after modifying: /etc/rc.d/init.d/httpd Restart I.e. The main directory of the web service is in the / var / www / html directory, you can update your web page to here. And if each user wants to have a home page,: 1) First build a public_html directory in your user's home directory: # cd # mkdir public_html 2) Then change the permissions of your user's home directory to Everyone can read # chmod 755 User Home Catalog 3) This allows you to use LocalHost / ~ User Name / "to access the homepage of each user. 5.5 FTP Server Integrates WU-FTP 2.6.1 as an FTP server in Red Hat Linux 7.1, as long as you have an FTP package, then your Linux server is an FTP server, if there is no installation at the time There is no relationship, just like installing Apache: 1) put the Red Hat Linux 7.1 Install the first place to the CD drive, then execute the following command: # mount / mnt / cdrom 2) Go to the WU-FTP installation file where the directory is located: # CD / MNT / CDROM / RedHat / RPMS 3) Complete the installation using RPM: # rpm -ivh wu-ftp-2.6.1-16.i386.rpm Since the FTP service is created by the Xinetd Super Server, therefore on the FTP server Configure the wu-ftpd file in the /etc/xinetd.d directory: Service ftp {socket_type = stream wait = no user = root server = / usr / sbin / in.ftpd server_args = -l -a log_on_success = DURATION Userid log_on_failure = Userid nice = 10 disable = no} Next, we introduce some management methods for the FTP server: 1. There are two ways to temporarily turn off the FTP service to make FTP service pause: 1) Execute them as root: # ftpshut now A Shutmsg file will be generated in the / etc directory, and the FTP server will not be able to use until you delete this file. 2) Modify the configuration file /etc/xinetd.d/wu-ftpd, change disable = no to disable = yes, then restart Xinetd.

2. There are two ways to use FTP services from using FTP services. You can prohibit a user from using FTP servers: 1) Write this user account name in / etc / ftpuser 2) Write a line configuration in / etc / ftpaccess: DENY-UID The user name is also disabled by a group of users from using the Deny-GID group name 3. There are many ways to log in to the FTP server, but I think the simplest and effective way is to write anonymous. Profile: / etc / ftpuser is already. 5.6 File Server We can also use the Red Hat Linux 7.1 Samba for the Windows Hosts in the LAN for the WINDOWS host. If the SMB server package is selected when installing the system, then the Samba service has ready after installation. However, in order to facilitate configuration, it is recommended to install SWAT, which provides a configuration tool for a web interface. Its installation package is the second CD /RedHat/rpms/samba-swat-2.0.7-36.i386.rpm. After installation, it will create a new SWAT file in the xinetd.d directory, its content is: service swat {port = 901 Socket_type = stream wait = no_from = 127.0.0.1 server = / usr / sbin / swat log_on_failure = userid disable = YES} We see the value of disable is YES, that is, SWAT is now not enabled, so we need to change it to disable = no, then restart XINTED. In addition, because there is a sentence here: "ONLY_FROM = 127.0.0.1 Description can only use SWAT in this unit, and if you want to configure it in Windows, please email or delete this sentence.

Below, we use the HOMES directory that you can access as an example, indicating that the SWAT setting method: 1) Open the IE browser, enter Linux hostname or IP and ": 901" on the address bar, for example: http: //192.168.0.1:901 2) If the connection is normal, a login prompt window will enter the username and password, here to use root as the username, enter the password of the root user, then click OK; 3) If Input error, the Samba configuration interface appears: Swat's Home; We can see in the SWAT interface, the top has 7 icons, namely: Home, Global Settings, Shars, Printers, Status, View (View), Password (Password) 4) First, let's click the GlobalS icon, which will appear on the global setting page, where we set the following: Ø BaseOption à Workgroup: Some input workgroup names (such as Working Group in Netbios) Ø BaseOption à Netbios Name: Host Name Ø securityOption à security: Select the security level, in some "share" Ø securityOption à hosts allow: Allowed host, usually write Your network number, such as 192.168.0. Ø SecurityOption à hosts deny: If you don't let a machine use, you are writing to the IP address modification, click the "Commit Changes" button (some of the 7 icons ),Save Settings. 5), then click the Shars icon, shared settings: Step 1: Enter the second step in the shared name you want to set in the right text box of the Create Share button: Click the "Create Share" button; Step 3: Confirm " The value of BaseOptions à Path is the directory you want to share, such as / home / SMB / Test (note that this must be an existing directory); Step 4: Set the value of "securityOptions à Writeable" to Yes so that the directory share To be writable; fifth step: Set the value of "securityOptions à guest ok" to YES, so that the directory does not need password access; sixth step: set the corresponding host IP in "SecurityOptionsàhosts Allow, Hosts Deny"; seventh step : Set "BrowseOptionsàBroWSeable" to YES, make it easy to use the final, click the "Commit" button, save the settings. Now, we can access this Samba server through the network neighbor on Windows 9x, and have a readable, A writable shared directory.

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

New Post(0)