-
23
-
11
-
2017
Kategorisi : Mysql
#!/bin/bash
PATH=/usr/sbin:/usr/bin:/sbin:/bin
if [[ ! “$(/usr/sbin/service mysql status)” =~ “start/running” ]]
then
echo ” The MySQL service on the server has been stopped. It has now been restarted.” | mail -s ” MySQL has been restarted” 111@111.com
sudo service mysql start
fi
-
27
-
09
-
2017
Kategorisi : Mysql
gunzip < sql.gz | mysql -u -p –default-character-set=utf8 dbname
-
29
-
06
-
2017
Kategorisi : Linux,Plesk
find /var/qmail/mailnames/$DOMAIN/$MAILBOX/Maildir/new/ -type f -exec rm -rf {} \;
rm -rf /var/qmail/mailnames/$DOMAIN/$MAILBOX/Maildir/cur/
rm -rf /var/qmail/mailnames/$DOMAIN/$MAILBOX/Maildir/new/
-
20
-
06
-
2016
Kategorisi : Wordpress
update w_postmeta set meta_value = meta_value * 1.25 where meta_key=’_price’
-
30
-
05
-
2016
Kategorisi : Apache,Linux
# Beginn Protect xmlrpc
RedirectMatch 403 /xmlrpc.php
# Ende Protect xmlrpc.php
-
26
-
05
-
2016
Kategorisi : Apache,Debian,Linux,Ubuntu
Bağlantı limiti koymak istediğimiz port :
iptables -A INPUT -p tcp –syn –dport $port -m connlimit –connlimit-above N -j REJECT –reject-with tcp-reset
Apache 80 için :
iptables -A INPUT -p tcp –syn –dport 80 -m connlimit –connlimit-above 20 -j REJECT –reject-with tcp-reset
SSH 22 için :
iptables -A INPUT -p tcp –syn –dport 22 -m connlimit –connlimit-above 3 -j REJECT
iptables-save > /etc/iptables.up.rules
nano /etc/network/if-pre-up.d/iptables
ile dosyayı açıp içine yazıyoruz :
#!/bin/bash
/sbin/iptables-restore < /etc/iptables.up.rules
İzinler :
chmod +x /etc/network/if-pre-up.d/iptables
-
12
-
05
-
2016
Kategorisi : Linux
echo insecure >> ~/.curlrc
-
29
-
04
-
2016
Kategorisi : Linux
ls -c -ltd — *aranankelime*