centos7 shell脚本一键升级内核
#!/bin/bash
#一键升级centos7内核
# Check if user is root
if [ $(id -u) != "0" ]; then
echo "Error: You must be root to run this script, please use root to initialization OS."
exit 1
...
#!/bin/bash
#一键升级centos7内核
# Check if user is root
if [ $(id -u) != "0" ]; then
echo "Error: You must be root to run this script, please use root to initialization OS."
exit 1
...
/interface vrrp add name=vrrp1 arp=enabled authentication=none disabled=no interface=wan interval=1 mtu=1500 preemption-mode=yes priority=100 vrid=1 add name=vrrp2 arp=enabled authentication=none disabled=no interface=wan interval...
#!/bin/bash today=$(date +%Y%m%d_%H%M%S) file=$today.sql.gz user=rocdk890 passwd=rocdk890 ldir=/data/sqlbak/ rdir=/ ip=47.92.x.x l...
#!/bin/bash
# Author rocdk890
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin:~/bin
export PATH
# Check if user is root
if [ $(id -u) != "0" ]; then
echo "Error: You ...
#!/bin/bash
. /etc/profile
pid=`ps aux | grep tomcat | grep -v grep | grep -v retomcat | awk '{print $2}'`
path="/usr/local/tomcat"
if [ -n...
#! /bin/sh # update glibc to 2.17 for CentOS 6 wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.1...
#!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export...
#!/bin/sh PATH=/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin:~/bin export PATH # Check the network status NET_NUM=`ping -c 4 www.baidu.com |awk '/pac...
#!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin:~/bin export PATH # Check if user is root if [ $(id -u) != "0"...
#!/bin/bash
LOCK_NAME="/tmp/my.lock"
if ( set -o noclobber; echo "$$" > "$LOCK_NAME") 2> /dev/null;
then
trap 'rm -f "$LOCK_NAME"; exit $?' INT TE...
#!/bin/bash
#install haproxy
#20160224 by rocdk890
#variables
dir=/usr/local
ha_dir=${dir}/haproxy
ha_cfg=${ha_dir}/conf/haproxy.cfg
ha_init=/etc/init.d/haproxy
ker...
#!/bin/bash
# ID 201510192126
# Author Ricky
# E-mail 564001002@qq.com
# CentOS 6 系统初始优化脚本
# version 1.1.0
# 检查是否为root用户,脚本必须在root权限下运行 #
if [[ "$(whoami)" != "root" ]]; then
echo "please run this script as root !" >&2
exit 1
fi
echo -e "\033[31m the script only Support CentOS_6 x86_64 \033[0m"
echo -e "\033[31m system initialization script, Please Seriously. press ctrl+C to cancel \033[0m"
# 按Y继续默认N,其他按键全部退出...
今天发现了个不错的东西,Linux之劫持rm命令实现安全删除和屏蔽删除/、/*,发给群里居然还有人因为不会用而说不好,让我很是不爽,下面分享给大家,怎么使用请自己摸索,简单的东西就不想当保姆教了.
下载地址:
wget http://www.dwhd.org/script/securityremove.sh
或者
wget http://download.slogra.com/soft_shell/securityremove.sh
securityremove脚本内容:
#!/bin/bash ######################################################################### # File Name: securityremove.sh # Author: LookBack # Email: admin#dwhd.org # Version: # Created Time: 2015年08月16日 星期日 01时47分37秒 ######################################################################### wget -q http://www.dwhd.org/script/securityremove -O /bin/securityremove chmod 755 /bin/securityremove...