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

Several shell programming tips

1. system environment variables after the user logs on to the system:$ HOME user's own directory$ PATH: the directory to be searched during Command Execution$ TZ Time Zone$ MAILCHECK the number of seconds to check whether a new letter exists$ PS1

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

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

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' |

Script used to test the connectivity of the host in the specified segment

The question is as follows :#! /Bin/bash# Thescript 'snameis: ********** usetotestthehost *********# Theauthoris: Ro# Theversionis: Ro-4-10LetPIP = $1NetIP = '2017. 192. 1 .'If [$1-gt254]; thenEcho "thefistnumbershocould Elif [$2-gt254]; thenEcho

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

Monitor simple scripts run by Squid

#! /Bin/sh While sleep 30 Do SquidNum = 'ps-ef | grep squid | grep-v grep | wc-l' # HttpNum = 'netstat-an | grep 0.0.0.0: 80 | grep-v grep | wc-l' #80 Status If [$ SquidNum! = 3]; then /Etc/rc3.duid start Adddate = 'date + % Y-% m-% d' ""

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

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 (

Set iptables rules for Centos Web server security

Recently, due to the problem of a centos website server, you have been constantly searching for centos security information. Below is a common iptables rule: IPT = "/sbin/iptables"$ Ipt-delete-chain$ Ipt-flush$ Ipp-input DROP #1$ Ipt-p forward

Battle against Centos system password cracking

Centos system password cracking GRUB: On the boot loader menu, type [e] to enter the editing mode. You will face a list of pilot projects. Find the line with the output similar to the following: kernel/vmlinuz-2.4.18-0.4 ro root =/dev/hda2 press 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

Six tricks to easily reinforce your CentOS System

Redhat is currently the most popular type of Linux in enterprises, and more hackers are attacking Redhat. How should we reinforce the security of such servers? I. account Security 1.1: run the command # cat/etc/passwd # cat/etc/shadow to check 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

Prevents DDOS attacks in CentOS.

Squid mainly uses its port ing function to convert port 80, in fact, for general DDOS attacks, you can modify the parameters in/proc/sys/net/ipv4/tcp_max_syn_backlog. The default parameters are generally small and set to more than 8000, general DDOS

Total Pages: 1330 1 .... 1102 1103 1104 1105 1106 .... 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.