Kategori : Debian ...

06
02
2018

Monit: Monitor BIND 9 (named) Name Server and Auto Restart

Kategorisi : Debian,Linux

apt-get install monit -y

vi /etc/monit/monitrc

## bind
check process named with pidfile /var/lib/named/var/run/bind/run/named.pid
 start program = "/etc/init.d/bind9 start"
 stop program = "/etc/init.d/bind9 stop"
 if failed host 127.0.0.1 port 53 type tcp protocol dns then restart
 if failed host 127.0.0.1 port 53 type udp protocol dns then restart
 if 5 restarts within 5 cycles then timeout

26
05
2016

Maksimum Bağlantı Sayısını Sınırlandırmak Apache, Ssh

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


19
12
2014

Centos’ta oluşturulmuş lvm2 bir diski Debian’da mount etmek

Kategorisi : Centos,Debian,Linux

apt-get install lvm2
modprobe dm-mod
vgscan
vgchange -ay VolGroup00
lvs
mkdir /yedek
mount /dev/VolGroup00/LogVol00 /yedek -o ro,user


24
10
2014

Kullanıcıyı apache www-data grubuna eklemek – Debian

Kategorisi : Debian,Linux
chown -R www-data:www-data mysite/ 
usermod -a -G www-data user

dosya yazma izinlerini verelim :

chmod 770 -R /var/www/mysite

01
10
2014

Shellshock or Bash Bug – Güvenlik Açığı

Kategorisi : Centos,Debian,Linux,Ubuntu

env 'VAR=() ; echo Bash is vulnerable!' 'FUNCTION()=() ; echo Bash is vulnerable!' bash -c "echo Bash Test"

komutu ile açığı test edebilirsiniz. Eğer açık varsa : Bash is vulnerable; yoksa : Bash Test
yazacaktır.

Kapatmak için :

Debian/Ubuntu kullanıcıları:  apt-get update && sudo apt-get install –only-upgrade bash
Centos : yum update bash


06
09
2014

Phantomjs ve casperjs kurulumları

Kategorisi : Debian,Linux

Debian üzerinde :

cd ~
export PHANTOM_JS="phantomjs-1.9.2-linux-x86_64"
wget https://phantomjs.googlecode.com/files/$PHANTOM_JS.tar.bz2
sudo mv $PHANTOM_JS.tar.bz2 /usr/local/share/
cd /usr/local/share/
tar xvjf phantomjs-1.9.2-linux-x86_64.tar.bz2
ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/share/phantomjs
ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin/phantomjs
ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/bin/phantomjs
phantomjs --version
git clone git://github.com/n1k0/casperjs.git
$ cd casperjs
$ git checkout tags/1.0.0-RC4
$ ln -sf `pwd`/bin/casperjs /usr/bin/casperjs

 
 


14
07
2014

Yalnızca seçilen klasörleri tar biçiminde sıkıştırmak – Linux

Kategorisi : Centos,Debian,Linux,Ubuntu
Yalnızca seçilen klasörleri tar biçiminde sıkıştırmak için :

tar -czvf yedekle.tar klasör1 klasör2 klasör3

03
07
2014

sqlite – SQLSTATE[HY000]: General error: 14 unable to open database file hatası ve çözümü

Kategorisi : Centos,Debian,Linux,Php,Ubuntu

SQLSTATE[HY000]: General error: 14 unable to open database file hatasının çözümü için :

sqlite dosyamız ve onun bir üst klasörünün Linux kullanıcısının :  www-data ya da apache olması gerekiyor. İki klasör eşleştiğinde çalıştığını gördüm. Diğer durumlarda select yapabilirken, insert ve update komutlarını gerçekleştiremedi.


25
06
2014

Linux açılışına servis eklemek, listelemek, kaldırmak

Kategorisi : Centos,Debian,Linux,Ubuntu
Eklemek için :
Fedora 
# chkconfig httpd --add
Fedora 
# chkconfig  httpd  on --level 2,3,5
Debian/Ubuntu 
# update-rc.d apache2 defaults
Debian/Ubuntu 
# update-rc.d apache2 start 20 2 3 4 5 . stop 80 0 1 6 .

Listeleme : 
Fedora 
# chkconfig --list httpd
Silme :
Fedora 
# chkconfig httpd off
Fedora 
# chkconfig httpd --del
Debian/Ubuntu 
# update-rc.d -f apache2 remove

04
02
2014

cron için dosyayı indirmeden wget – spider

Kategorisi : Centos,Debian,Kloxo,Linux,Php,Ubuntu

Cron ile php dosyasını çalıştırmak ama dosyayı kaydetmek istemiyorsak :

wget -q –spider http://www.ornek.com/cron.php

ya da

wget -O- http://www.ornek.com/cron.php >> /dev/null



photo

Php, ajax, jquery, mootools web programlama. Linux, apache, lamp sunucu yönetimi. Cpanel, plesk, lxadmin panel kurulumlari.

28 / 03 / 2024, 14:39:03
Web yazilim, grafik
barbetto.com

Tunalioglu.org - 2015