Commit e0b9466b authored by Vitaly Lipatov's avatar Vitaly Lipatov

update scripts

parent f9019a81
#!/bin/sh
# Online checking and repair
mysqlcheck -u root -r -A -p
#!/bin/sh
DBNAME=$1
HOST=clients.eterhost.ru
mysql_copy_database.py -i \
--source-host=localhost \
--source-user=root \
--source-password= \
--source-database=$DBNAME \
--destination-host=$HOST \
--destination-user=root \
--destination-password=
#!/bin/sh
DBNAME=$1
HOST=host03.eterhost.ru
mysql_copy_database.py -i \
--source-host=localhost \
--source-user=root \
--source-password= \
--source-database=$DBNAME \
--destination-host=$HOST \
--destination-user=root \
--destination-password=
#!/bin/sh
if [ "$1" = "-d" ] ; then
shift
iptables -D -s $1 -j DROP
exit
fi
# -A
# -I 1 - первым
iptables -I INPUT 1 -s $1 -j DROP
iptables -A INPUT -s $1 -j DROP
echo $1 >> $0.log
#!/bin/sh
DEVICE=/dev/sdb
#DEVICE=file
for BS in 4096 8192 16384 ; do
for SKIP in 0 1 2 3 4; do
echo
echo BS=$BS, SKIP=$SKIP
dd if=/dev/zero of=${DEVICE} bs=${BS} seek=${SKIP} count=102k oflag=sync,dsync
done
done
#!/bin/bash
template=altlinux-httpd-server
export VEID=$1
export NAME=$2
create() {
vzctl create $VEID --ostemplate=$template
}
setname() {
vzctl set $VEID --hostname $NAME --onboot yes --nameserver 87.249.47.43 --searchdomain eterhost.ru --save
}
setmem() {
vzctl set $VEID --shmpages 512000:512000 --tcprcvbuf unlimited --kmemsize 5560000:5560000 --numproc 512 --save
}
create
setname
setmem
\ No newline at end of file
#!/bin/bash
export VEID=$1
export NAME=$2
#VEIPE=$(($VEID-300))
export EXTIP=87.249.47.44
export VEIP=192.168.0.$VEID
vzctl create $VEID --ostemplate=altlinux-httpd-server
vzctl set $VEID --hostname $NAME --onboot yes --nameserver 87.249.47.43 --save
vzctl set $VEID --ipadd $VEIP --save
vzctl set $VEID --searchdomain etersoft.ru --save
vzctl set $VEID --shmpages 512000:512000 --tcprcvbuf 1024000:1024000 --kmemsize 5560000:5560000 --numproc 512 --save
iptables -t nat -A POSTROUTING -s $VEIP -o eth0 -j SNAT --to-source $EXTIP
iptables -t nat -A PREROUTING -d $EXTIP -i eth0 -p tcp -m tcp --dport "$VEID"22 -j DNAT --to-destination $VEIP:22
#!/bin/sh
chmod o+x /var/lib/vz/
chmod uo+x /var/lib/vz/root/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment