shell脚本自动加固ssh
#!/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" ]; then
echo "...
#!/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" ]; then
echo "...
Ciphers aes128-cbc,aes19...
#!/bin/sh
#Created by rocdk890
log_path="/var/log/" #日志记录的目录地址
log_file="svn.log" #默认日志文件名称
log_file_new=${log_path}${log_file}-$(date +%Y%m%d)...
这篇文章在原作者的代码基础上稍微进行了下修改,让其完全满足我们svn结构的,使其能够远程同步到另外一台服务器上.
svn服务器ip:10.168.227.xx
项目web服务器:10.27.2.xx
svn代码库:svn://10.168.227.xx/slogra/branches/dev_whdysp2017spring/
项目web服务器代码根目录:/data/www/vhosts
先来看svn钩子里的内容:
cd /home/svn/slogra/hooks/
vi post-commit
...
#!/bin/bash mysql_user="root" mysql_pass="password" my...
#!/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" ]; then
ech...
#!/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" ]; then
echo "Error: You must ...
#!/bin/bash PATH=/bin:/sbin:/us...
#!/bin/bash
file="iplist.txt"
for ip in `awk '/^[^#]/{print $1}' $file`; do
port=`awk -v I=$ip '{if(I==$1)print $2}' $file`
user=`awk -v I=$ip '{if(I==$1)print $3}' $fi...
[mysqld] innodb_buffer_pool_size=5M innodb_log_buffer_size=256K query_cache_size=0 max_connections=10 key_buffer_size=8 thread_cache_size=0 host_cache_size=0 innodb_ft_cache_size=1600000 innodb_ft_total_cache_size=32000000 # per thread or per operation settings thread_stack=131072 sort_buffer_size...