After Install Linux

zhaozj2021-02-16  72

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 very beautiful graphic: the left is a small red hat image, listed on the right, you can start the operating system, you 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 recognize the user, the username and password must be entered, and the system can be used until 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 output, the procedure cannot be modified; 2) Enter a new password; 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 instance of modifying the password: (in the black body word) $ passwd Changing Password for user1 (CURRENT) UNIX Password: • Enter the original password new unix password:? Enter the new password Retype New Unix Password:? 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 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 job on another virtual console on another virtual console on a 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. There is a special file in the Linux system, that is, device files. In the Linux system, each I / O setting is mapped into a file, which can be processed as normal files, which makes the operation of files and devices as much as possible. 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 is a document name." 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 the 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. ? Put forward: press B;? Backward: Press P key;? Specify location: Enter the 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 options:? A This option is often used when copying the directory, it keeps the link, file properties And recursively copy the directory, just like XCOPY / S in DOS? F If the target file or directory already exists, it will overwrite it, and not to make a prompt? I and the f optionally, it is overwriting, it will make the user Answer "Y" to confirm? P Use this option to copy the file when the file will reserve. R If the source is given is a directory, then the CP will recursively copy all the subdirectory and files in 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 will be listed in parameters Both full directory and subdirectory recursively delete? I interactively delete, each file gives a prompt to be careful when prompted 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 Some options are:? F If the action is to overwrite a destination file does not give any instructions • Interactual operation, if the operation is to overwrite a destination file, ask the user to overwrite the implementation 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 It is: LS [Option] [directory or file] common options:? A Display all subdirectory in the specified directory With files, including hidden files;? C Press file modification time sorting? L Use long format to display the details of the file, each file is a row of information, its content is: File Type and Permission Link Document Labor File Group File 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 usage:? Use text settings containing letters and operator expressions, its grammatical format is: chmod [who] [opt] [mode] file / directory name wherewHO indication 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? Digital setting method is simpler: chmod [mode] The key is the value of MODE, and many beginners will be confused, in fact, it is very simple, we will see RWX The binary number, if there is one represented, there is no 0, then RWX RX R- -, it can be represented as: 111 101 100 to convert each three-digit 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 5.1 Common Network Commands Provide a network-related tool in the Red Hat Linux 7.1 system, mastering these tools are very necessary: ​​Class: Setting tool 1.netconf: NetConf is part of the LinuxConf provided by Red Hat Linux, mainly Set the parameters 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 explain: There are several states to be more important:? UP / DOWN: NIC started, if it is Down, then it is certainly unable to use;? RX Packet The number of ErrorS package If you have any questions 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 you send it; 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, a gateway connected to two network routers or at the same time is located 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, but can establish network connections. 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 /red/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 in the global setting page, where we set the following:? BaseOption à Workgroup: Some input working group names (such as NetBIOS in NetBIOS)? BaseOption à NetBIOS Name: Host Name? SecurityOption à security: Select Security Level, select "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 write its 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.

In normal time, the system administrator can click on the "Status" button to switch to the status page for monitoring, on this page, you can: 1) Start (START SMBD button), stop Samba (STOP SMBD button) service And restart the service (RESTART SMBD button); 2) In addition, you can see the connection established with the Samba server, and you can press the "X" button to stop its access; 3) You can also Detecting a folder that is being accessed, an open file (Open files). Samba services can also be certified by users, integrating with the Window NT domain. In order to introduce some of the spaces, interested readers can refer to "actual combat Samba" book. Zt from Linuxfans.org Linuxcn

Save for private.

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

New Post(0)