Centos shell General Automatic Log cleanup script

1. This article is a simplified script for automatic system deployment. The main function is to clear logs from all directories. 2. Based on the given log directory, the deletion time is combined with crontab to clear logs. After cleaning is

Accurately clear the Squid cache using SHELL scripts

This script was modified on the cache cleanup script of Zhang banquet, mainly to add the if option, and select the address of the cached file based on the $1 parameter type (because $1 is not fixed, sometimes it is a specific jpg type, sometimes it

Shell uses the TTL return value to determine the host operating system in the network segment

TTL refers to the lifecycle of a network-layer package. You can use the echo TTL of ping to determine the operating system of a machine. (Although the network parameters of some systems can be modified, this value is rarely modified) The following

Shc can be used to encrypt shell scripts in binary format.

Shc can be used to encrypt shell scripts in binary format. The following describes how to install and use it: Installation: Taking shc-3.8.7.tgz as an Example Tar-vxf shc-3.8.7.tgzCd shc-3.8.7Make testMake stringsMake expirationMake installMake

Process control, function, and script debugging in Shell

Introduce Process Control in Shell, such as judgment statements... If statement: First, I want to know a few things: [-F "somefile"]: determines whether it is a file. [-X "/bin/ls"]: determines whether/bin/ls exists and has the executable permission.

Automatic DNS shell deployment

I have recently studied the DNS Master/Slave service and have also made reference to many articles. Here I will record it to make it easier for you to avoid detours. The DNS service can be a more difficult part of the Linux service, especially the

Difference between continue and break in shell

The break command can contain one parameter. A break loop without a parameter can only exit the innermost loop, while break N can exit the N-layer loop.The continue command can also contain a parameter. A continue command without a parameter only

Mysql master-slave replication monitoring shell script

####### This script is used in the production environment on the basis of mysql Master/Slave ######## Vi mysqlm-s.sh#! /Bin/bash Ip = 'ifconfig eth0 | sed-n 2p | awk '{print $2}' | awk-F: '{print $2 }'' Port = 'netstat-anl | grep 3306 | sed-n '1p' |

One script for Mysql backup

DBAs are mainly responsible for database backup and recovery. It is important to back up the database effectively and restore the database in time when the database crashes, if you back up the database manually on Linux, it will cause a lot of

One-click installation of the LAMP environment using Shell scripts

LAMP refers to the web servers built in Linux (operating system), Apache (HTTP server), MySQL (database software), and PHP. This website architecture is currently a popular and common Web architecture. It has advantages such as LAMP cross-platform

Shell deployment Game Database script

Considering the batch launch of games, I wrote a game mysql deployment script. Because the system environment is the same, mysql is not installed in the script, but compiled and used directly by mysql. #! /Bin/bash #2013/11/20 # Email: songShouJiong@

N methods for shell to determine a variable as a number

Method 1: Use expr to calculate the sum of the variable and an integer. If normal execution is performed, the variable is an integer. Otherwise, an error occurs. $? The value is not 0. Expr $ args + 0 &>/dev/null Method 2: print the variable with

Shell batch imports domestic ip segments to prevent foreign ip addresses from accessing the server

The customer does not want to allow foreign ip addresses to access the server. The data center was supposed to be routed at the upper end of the server room, but those people did not miss you !!!~~~~ In this case, you can only use iptables to solve

Centos uses denyhosts to prevent ssh attacks

Authentication Failures:Root (218.247.185.218): 575 Time (s)Unknown (218.247.185.218): 224 Time (s)Unknown (218.247.185.222): 6 Time (s)Unknown (202.101.72.35): 5 Time (s)Unknown (202.101.72.36): 5 Time (s)Unknown (202.101.72.37): 5 Time (s)Unknown (

Centos5.5 minimal optimization after installation

After purchasing a server (currently the mainstream configurations are dual-core and quad-core), the system will be installed in the next step. We recommend that you use 64-bit Centos5.5 here. When installing the system, we should minimize the

Apache Site Security Configuration

Apache is the most popular web server today. apache's website security can be solved through authentication, source control, and encrypted access. First, let's install http. As for the rpm installation Editor, we will not talk about it here. The

Use Google Authenticator in CentOS to enhance SSH login security

Environment:CentOS 6.3 x86_64 Basic component installation: yum -y install wget gcc make pam-devel libpng-devel 1. Install qrencodeOn Linux, a command line tool named QrenCode can easily generate a QR code. The google authenticator command

Apache anti-DDOS module mod_evasive

From time to time, some people in the blog used it for stress testing, so they were prepared to configure iptables to limit the concurrency of each IP address. However, only when iptables is configured can we find that because the Linux kernel

Lib32wati.exe series analysis of the newest Worm Virus

Lib32wati.exe was first detected between October 16 and October 16,. When detected in October, anti-virus software such as rising star and trend software still cannot kill this type of virus, only a few antivirus software products around the world

Discuz! CSRF AttacK Defense in X2.5/X3/X3.1 can be bypassed

I accidentally discovered this when I wrote the plug-in... attackers can bypass the CSRF attack that comes with Discuz. when determining a form, use this function: submitcheck ('submit ', true). The second parameter should be the option of whether

Total Pages: 1330 1 .... 1203 1204 1205 1206 1207 .... 1330 Go to: GO

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.