Learn notes - Linux system management learning notes (1)

xiaoxiao2021-03-06  65

Copyright Notice: This article can be reproduced, please be sure to indicate the original source and author information in hyperlink when reprint. Original Source: http://www.aiview.com/notes/linux_note.htm Author: Zhang Yang Alex_doesAThotmail.com Last updated: 2004-7-14

table of Contents

Text reference resources

Little Picking of Linux System Management Command, this is the first part, and the rest of the note, please browse here.

text

Edit /etc/hosts.allow and /etc/hosts.deny, set access control of TCP kernel level. If you need to allow access to all services to all services, add your entry: All: All If you need to allow / disable 192.168.1.100 to your SSH service, add the following entries: SSH: 192.168.1.100 When two files When a conflict occurs, it is preferred in hosts.allow. Configure the iptables firewall, if there is no skilled skill, it is recommended to do on the local console of the host, do not remote configuration, because once a filter rule matches the current connection, it will take effect immediately, and terminate Current connections, even certain rules can result in even if it is not logged in even on the local host, such as the "iptables -P input -j drop" as a filter rule command to cause this situation, at this time, any remote or The host cannot be logged in to the host, you can work with the host, because the iptables save command has not been issued to save the rule settings. Inconfig Interface [[-net | -host] address [parameters]] ipconfig eth0 192.168.0.1 IPConfig Eth1 203.99.9.9 The promisc parameter is used to place this Ethernet in the "confusing" state, and -Promisc cancels this state. NetStat -R Display Routing NetStat -i Displays NetStat -i List Configuration Features NetStat -i List Configuration Features NetStat -a List All Interface NetStat -t Lists only UDP Connections / etc / Host .conf bind server core configuration file /etc/resolv.conf Bind server parsing configuration file DNS database contains three types of records: a Record to map hostnames to IP address CNAME records the alias of the host and its formal host The name is associated, pointing to a A record SOA record represents Start of Authority, where the normal information of the area belonging to the server belongs. For example, it contains all the default T t l values. If the host name is ".", The representative is an absolute host name, which is a complete specification host name containing domain names (such as: www.domain.com.), Otherwise it is a relative host name, representing the host name and a domain name Associated. Special name "@" in the SOA record represents its own domain name. The / etc / service file defines the conversion of the service name to the port number. DF -KL View Disk Use Gunzip -DV FileName.tar.z Used to packet * .tar.z's files into * .tar files, use tar -xvf filename.tar to decompress the decompression of the TAR file, where -v is used to display the decompression process tar -cvf newfile.tar directory Put the directory into a tar package /etc/init.d/xinetd rel, restart the xinetd service, after modifying the XINETD configuration file, no need to restart the host Load file. Other parameters: start, stop, restart, status ... This command requires root permission execution.

Su - root -c xinetd reload # executes the xinetd command as root, does not change the current shell or: su - root -c '(cmd1; cmd2)' bzip2 command is used to unwind '.bz2' file bzip2 -d * .tar.bz2 For ISO file, Linux can be read with mount commands, such as: MKDIR / MNT / ISO MOUNT -T ISO9660 -O LOOP DISC1.ISO / MNT / ISO LS / MNT / ISO makes a disc production into ISO Document (First Mount Good CD-ROM drive): CP / MNT / CDROM DISC1.ISO Decompression .zip file to new directory: unzip -d newdir file.zip How much is the disk block occupied by the file or directory, the current Linux version is under each disk Block default is 1K: DU / TMP DU /TMP/LOG.TXT View file directory The detailed number of bytes occupied: du -ab / tmp/Ab /tmp/log.txt command line download files via HTTP protocol: Wget Http://www.download.com/file.exe support: Wget -c URL also has many other parameters, setting Cache, HTTP user authentication and proxy authentication. The RCP command can be used to list all services in the system between the Linux host, view all services in each system startup level: chkconfig --List Change Service Startup Settings (will modify all system boot level settings): ChkConfig Srvname ON | OFF Start or stop a service: Service srvname Start | Stop View all service status: Service --Status-all system Syslogd service writes log file / var / log / message, general other application messages will also pass Syslogd records this file. But use the following command to monitor: tail -f / var / log / messages Reference Resources

Linux System Management Learning Notes (2) http://www.aiview.com/notes/linux_note_2.htm

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

New Post(0)