- 01
- 08
- 2019
apachetop kullanımı
Kategorisi : Uncategorizedapachetop $(ls -Rt /var/www/vhosts/*/logs/access_ssl_log | sed ‘s/^/-f ‘/ | head -15)
komutunu girdikten sonra sırasıyla (f,a,u) tuşlarına basarak sonuçlar arasında filtreleme yapabiliyoruz.
apachetop $(ls -Rt /var/www/vhosts/*/logs/access_ssl_log | sed ‘s/^/-f ‘/ | head -15)
komutunu girdikten sonra sırasıyla (f,a,u) tuşlarına basarak sonuçlar arasında filtreleme yapabiliyoruz.
sudo apt install python-pcapy
RedHat/Fedora için:
sudo dnf install pcapy
github linki
git clone https://github.com/stamparm/maltrail.git
Gerekli güncellemeler için :
cd maltrail; sudo python sensor.py
Sunucuyu başlatalım !
sudo python server.py
Kurduğumuz arayüze gidelim.
http://127.0.0.1:8338;
Edit /etc/postfix/main.cf
Add for example: mime_header_checks = regexp:/etc/postfix/block_unwanted_attachments
save “main.cf”
Create the file “/etc/postfix/block_unwanted_attachments” with the content:
/name=[^>]*.(bat|exe|ace|iso|arj|jar)/ REJECT
service postfix restart
cd ext/
git clone https://github.com/php/pecl-database-mysql mysql –recursive
phpize
./configure
make
make install
ile derledikten sonra, kullandığımız php.ini dosyasına aşağıdaki satırı ekliyoruz.
extension = /kurduğumuz klasör/mysql.so
apache servisini baştan başlatınca çalışıyor.
service apache2 restart
for i in $(find . -maxdepth 1 -type d) ; do
echo -n $i”: ” ;
(find $i -type f | wc -l) ;
done
SETTINGS.PY AYARLARI
#in settings.py add static dir
STATIC_ROOT = os.path.join(BASE_DIR, ‘static’)
#collect static to dir
python3 manage.py collectstatic
————————————-
DEPENDENCIES KURULUM
sudo apt-get -y install apache2 libapache2-mod-wsgi-py3 python3-django
sudo a2enmod wsgi
sudo service apache2 restart
sudo a2dissite 000-default
sudo service apache2 restart
——————————————
VIRTUALHOST AYARI
<VirtualHost *:80>
ServerName mysite
WSGIDaemonProcess ubuntu user=ubuntu group=ubuntu threads=5 python-path=”/var/www/html/mysite/mysite”
WSGIScriptAlias / /var/www/html/mysite/mysite/wsgi.py
Alias /static/ /var/www/html/mysite/static/
<Directory /var/www/html/mysite/static>
Require all granted
</Directory>
<Directory /var/www/html/mysite/mysite/>
WSGIProcessGroup ubuntu
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
Require all granted
</Directory>
</VirtualHost>
——————————————
WSGI.PY AYARLARI
import os,sys
sys.path.append(‘/var/www/html’)
sys.path.append(‘/var/www/html/mysite’)
os.environ.setdefault(“DJANGO_SETTINGS_MODULE”, “mysite.settings”)
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
Self signed sertifika varsa; bu parametreyi ekleyin.
$phpmailer->SMTPOptions = array(
‘ssl’ => array(
‘verify_peer’ => false,
‘verify_peer_name’ => false,
‘allow_self_signed’ => true
)
);
Bir linux klasöründeki tüm dosyaların içini boşaltmak için :
find . -type f -exec sh -c ‘> {}’ \;
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
#!/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
Php, ajax, jquery, mootools web programlama. Linux, apache, lamp sunucu yönetimi. Cpanel, plesk, lxadmin panel kurulumlari.
16 / 12 / 2019, 08:48:01
Web yazilim, grafik
barbetto.com