/article-2871-1.html
6. Prevent rsyslog loss caused by too much log output
echo"$SystemLogRateLimitInterval 60" >> /etc/rsyslog.conf
echo"$SystemLogRateLimitBurst 3000" >> /etc/rsyslog.conf
7. Delete massive directory commands:
find ./ -type f | xargs -I {} rm -F {} (enter the directory to be deleted)
rsync --delete-before -a -H -v --progress --stats /tmp/ ./(Replace the directory to be deleted with an empty directory)
8. Route Tracking command:
mtr 10.10.10.1
9. Ssh disconnection so
------------------------------------------------------
2) permissions for uploaded files:
------------------------------------------------------
Lftp 192.168.1.10:/test> put/root/install. log ./
27001 bytes transferred
Lftp 192.168.1.10:/test> ls
-RW ------- 1 14 50 27001 Sep 15 install. Log
------------------------------------------------------
Pay attention to the permission 600, which is the ma
1. What is SELinuxSELinux, kernel-level enhanced firewallIncluding:File Security ContextProcess Security Context2. How to manage SELinux levelsSELinux turned on or off)Vim/etc/sysconfig/selinuxselinux=disabled # #关闭状态Selinux=enforcing # #强制状态Selinux=permissive # #警告状态Getenforce # #查看状态When SELinux is turned onSetenforce 0|1 # #更改selinux运行级别#1 Enforcement Mode#0View security ContextPs-zLs-zIf in mandatory mode, if the whole context is not unified, LFTP
type [[email protected] htdocs]# Setenforce 1 #开启Browser Access again, you can browse the page normally650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6D/3E/wKiom1Ve2KCScMD4AAAYnhzKQlU588.jpg "height="/>3, Service Sebool valueTake VSFTPD service as an example, VSFTPD is also installed w
mirror must use the loop option.-----------------------------------------------------------------RPM-IVH vsftpd-2.2.2-11.el6_4.1.x86_64.rpmRPM-IVH ftp-0.17-54.el6.x86_64.rpmRPM-IVH lftp-4.0.9-1.el6.x86_64.rpmRpm-qa vsftpdRPM-QA FTPRpm-qa lftpService VSFTPD Restart################################################################Verify:FTP 192.168.1.249Enter User name: FTPPrompt for password: enterLsBye exiting FTP operation#############################
Linux Setup Agent onlineSetting up a proxy in Linux only needs to set a user variable, there are several proxy methods:
Agent Mode
variable name
http_proxy
https_proxy
ftp_proxy
do not use proxy IP
No_proxy
1. Immediate effect[Email protected] ~]# export http_proxy=itxxx:123456@110.199.131.137: 909Agent Mode = User name : password @ proxy address : Port#http_proxy: Using the HTTP proxy method#itx
/resolv.conf filePeerdns=no indicates that DNS is still set manually and not automatically acquired when IP is automatically obtained through DHCP. Equivalent to the following command:Nmclicon mod "system eth0" Ipv4.ignore-auto-dns YesTest networkTest network connectivity at the command lineDisplay host NameHostnameTest network connectivityPingmtrDisplay the correct routing tableIprouteDetermine the name server to use:NslookupHostDigTrace Route:TracerouteTracepathNetwork Client ToolsLFTP, FTP, L
Quit #或bye eof}uploadfiles () {FTP-IVN EOF Open $IP $PORT user $USER $PWD bin #passive Optional CD $REMOTE _dir LCD $LOC _dir mput $DEST _file S #多个文件的上传 #put $LOC _file_name $DEST _file_name #单个文件的上传 close quiteof}Way two: Sftp waySFTP is an interactive file transfer program that runs and uses the same way as FTP commands, but the SFTP command uses SSH encryption for all information transmitted, and it also supports features such as public key authentication and compression for better security
];thenCommandFiCase: Determine if the LFTP is installed if not installedVI install_lftp.sh#!/bin/bashRpm-qa |grep lftp 1>/dev/nullIf [$?-ne 0];thenYum-y Install lftp >/dev/null echo "lftp installed."Fi2) if dual branchGrammar:if [Condition];thenCommand 1ElseCommand 2FiUse a two-branch single-branch case script to overw
First, install LFTP environment
Because we need to use the LFTP environment when uploading FTP files, we can't make sure all the systems are installed, so we'd better reinstall them first.
The code is as follows
Copy Code
#CentOS Yum Install lftp
#Debian Apt-get Install
compile, compile the source files into binary filesThe first two steps of the process can be performed by any user, and the next step is a real copy file that requires root accessNormal users can use the sudo command to temporarily have root privileges$ make install copy source package file$ prefix/bin/apachectl StartNote: all of the above steps must be guaranteed in the directory after decompression
Specific casesDeploy HTTPD services on CENTOS6 and CENTOS7 respectively, using source pac
FTP principle and vsftpd service configuration FTP uses TCP protocol as the underlying transmission protocol FTP has two working modes. Traditional FTP supports Active Mode. First, the client connects to port 21 of the server and then the server returns the client will use a random port greater than 1023. Next, the server will initiate a connection from Port 20 to the random port used by the client. The so-called active means that the server will actively initiate the connection. The active mode
, it connects to server 1521 through port 1026th and then transmits data between two ports.5.FTP Transfer ModeBinary mode: Picture and execute File compressed fileText patterns: CGI scripts and plain HTML filesCurrently the server above and the FTP client software can automatically identify the file type and select the appropriate transmission mode6.FTP Account TypeAnonymous User: FTP or AnonymousLocal User: System user account for Linux server nativeVirtual User: Account information is stored i
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.