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
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
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.
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
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.
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
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
####### 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' |
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
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
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@
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
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
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 (
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 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
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
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 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
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
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.