iptables -A INPUT -s 95.108.128.0/17 -j DROP

iptables -A INPUT -s 178.154.128.0/17 -j DROP

iptables -A INPUT -s 37.140.141.0/24 -j DROP

iptables -A INPUT -s 5.45.192.0/18 -j DROP

iptables -A INPUT -s 37.140.128.0/18 -j DROP

iptables -A INPUT -s 157.55.39.0/24 -j DROP

iptables -A INPUT -s 5.255.192.0/18 -j DROP

iptables -A INPUT -s 93.158.172.0/23 -j DROP

iptables -A INPUT -s 141.8.128.0/18 -j DROP

/sbin/service iptables save cat /etc/sysconfig/iptables

centos7+ ?

iptables-save

block yandex bot ip ranges

yandex botu geliyor siteyi indexlemek icin 1 geliyo 10000 tane baglanti aciyor
luzumsuz sunucu ustunde yuk
bende blokladim yandex blok larini
gelemiyor artik

# Generated by iptables-save v1.4.7 on Sat May  2 05:05:07 2015
*filter
:INPUT ACCEPT [122:8629]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [110:82633]
-A INPUT -s 178.154.160.0/22 -j DROP 
-A INPUT -s 178.154.164.0/23 -j DROP 
-A INPUT -s 178.154.128.0/17 -j DROP 
-A INPUT -s 5.255.253.0/24 -j DROP 
-A INPUT -s 37.140.141.0/24 -j DROP 
-A INPUT -s 5.45.254.0/24 -j DROP 
COMMIT
# Completed on Sat May  2 05:05:07 2015
/etc/sysconfig/iptables (END) 

1- /sbin/iptables -A INPUT -s 5.45.254.0/24 -j DROP
2- /sbin/service iptables save
3- less /etc/sysconfig/iptables

——-
ek
——-

Yandex Bot IP Addresses

37.9.115.0/24, 37.140.165.0/24, 77.88.22.0/25, 77.88.29.0/24, 77.88.31.0/24, 77.88.59.0/24, 84.201.146.0/24, 84.201.148.0/24, 84.201.149.0/24, 87.250.243.0/24, 87.250.253.0/24, 93.158.147.0/24, 93.158.148.0/24, 93.158.151.0/24, 93.158.153.0/32, 95.108.128.0/24, 95.108.138.0/24, 95.108.150.0/23, 95.108.158.0/24, 95.108.156.0/24, 95.108.188.128/25, 95.108.234.0/24, 95.108.248.0/24, 100.43.80.0/24, 130.193.62.0/24, 141.8.153.0/24, 178.154.165.0/24, 178.154.166.128/25, 178.154.173.29, 178.154.200.158, 178.154.202.0/24, 178.154.205.0/24, 178.154.239.0/24, 178.154.243.0/24, 37.9.84.253, 199.21.99.99, 178.154.162.29, 178.154.203.251, 178.154.211.250, 95.108.246.252, 5.45.254.0/24, 5.255.253.0/24, 37.140.141.0/24, 37.140.188.0/24, 100.43.81.0/24, 100.43.85.0/24, 100.43.91.0/24, 199.21.99.0/24

——-
ek2\
——-

http://bgp.he.net/AS13238#_prefixes

——–
UPDATE
——–

Install Plex Media Server on Debian

Install curl

sudo apt-get install curl -y

Now add source repositories, there are three separate lines here

sudo curl http://shell.ninthgate.se/packages/shell-ninthgate-se-keyring.key | sudo apt-key add –
echo “deb http://www.deb-multimedia.org wheezy main non-free” | sudo tee -a /etc/apt/sources.list.d/deb-multimedia.list
echo “deb http://shell.ninthgate.se/packages/debian wheezy main” | sudo tee -a /etc/apt/sources.list.d/plex.list

Make sure it runs

sudo apt-get update && sudo apt-get install deb-multimedia-keyring

Update and install the plex media server

sudo apt-get update && sudo apt-get install plexmediaserver -y

See if you can connect at http://ip.address:32400/manage/index.html

Plex media server will autoboot 🙂

If you are getting permission issues it is because Plex runs as its own user, you can change the user Plex Media Server runs as to fix the permission issues you get from CouchPotato, SickRage, Sonarr, Headphones and others.

sudo nano /etc/default/plexmediaserver

Find this line

PLEX_MEDIA_SERVER_USER = plex

Change plex to your regular user

PLEX_MEDIA_SERVER_USER = username

Ctrl+X, Y and Enter to save the configuration

Restart the Plex Media Server service

sudo service plexmediaserver restart

Configure Plex Media Server

Open up your Plex web interface at http://ip.address:32400/web

NOTE: Plex media server must be configured form localhost.
consider connecting over ssh proxy..

Because they need to check quota info before booting when the server node rebooted in an inproper way.

it takes ages to calculate quota and boot containers in big servers with lot’s of ram and lot’s of containers.

more info here:

http://forum.openvz.org/index.php?t=msg&goto=30102&

so basically

to fasten things up

if you are trying to boot your containers when you come back from a power failure:

vzquota off $VEID
vzctl start $VEID
vzquota on $VEID

yes I know, ploop is the answer, or is it?

I’m gonna check it later…

asagidaki scripti kopyala
yapistir
calistir.

apt-get update
apt-get install software-properties-common -y
add-apt-repository ppa:x2go/stable -y
apt-get update
apt-get install dbus xubuntu-desktop gksu leafpad synaptic x2goserver x2goserver-xsession htop vnstat fail2ban ssh mtr-tiny -y
apt-get install xubuntu-community-wallpapers -y

apt-get install -f -y
apt-get autoremove -y
apt-get upgrade -y
apt-get clean -y

echo DONE....

1- once virtual mac yarat panelden sunucuya verecegim ip icin
2- proxmox uzerinde bridged olarak network tanimladiktan sonra kvm makina icin virtual maci mac olarak ver makinaya eth0ina
3- centos kurulumunu yap
4- network ayarlari su sekilde olacak

/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
TYPE=Ethernet
UUID=9fc997a3-5feb-4d72-925b-6fad4e991af8
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=171.23.10.199
PREFIX=32
GATEWAY=176.31.104.254
DNS1=8.8.8.8
DNS2=8.8.4.4
DOMAIN=ayoy.net
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=yes
NAME="System eth0"
HWADDR=02:00:00:d4:61:99
IPV6_AUTOCONF=no
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=yes
NETMASK=255.255.255.255
USERCTL=no

NOT: gateway ana proxmox nodun gatewayi olacak
route -n ile ana makinada bakip bulabilirsin

broadcast 255.255.255.255 olacak

5- bi dosya daha elle ekleyecegiz sisteme

nano /etc/sysconfig/network-scripts/route-eth0

176.31.104.254 dev eth0
default via 176.31.104.254 dev eth0

buda gateway icin gerekiyor
baska turlu disari cikmiyor ip

6- service network restart

olduda bitti masallah!

NginX Install process Debian 

	apt-get update && apt-get upgrade -y 
	apt-get install -y nginx-full
	service nginx restart

# php5-fpm Install 
	apt-get install -y php5-fpm
	apt-get install -y  php5-mysql php5-curl php5-gd php5-mcrypt
	apt-get autoremove -y  
        mkdir /var/run/php5-fpm/   
        echo "cgi.fix_pathinfo=0" >>/etc/php5/fpm/php.ini
	/etc/init.d/php5-fpm restart
    
    nano /etc/nginx/sites-available/default
    ---------------

server {
	listen   80; ## listen for ipv4; this line is default and implied
	listen   [::]:80 default_server ipv6only=on; ## listen for ipv6
	
	root /usr/share/nginx/www;
	index index.php index.html index.htm;
	server_name localhost;

	location / {
		try_files $uri $uri/ /index.html;
		autoindex on;
                autoindex_exact_size off;

	           }

	location ~ \.php$ 
	{
             fastcgi_split_path_info ^(.+\.php)(/.+)$;
		fastcgi_pass unix:/var/run/php5-fpm.sock;
		fastcgi_index index.php;
		include fastcgi_params;
	  }
error_page 404 /index.php;

}

-------------------
#  add example.com
	mkdir -p  /usr/share/nginx/www/example.com
	nano /etc/nginx/sites-available/example.com

----------------


server {
	listen   80; ## listen for ipv4;
	#listen   [::]:80 default_server ipv6only=on;
	root /usr/share/nginx/www/downloadbramjy.com;
	index index.php index.html index.htm;
	server_name  alkoonsoft.com *.alkoonsoft.com www.alkoonsoft.com;

	location / {
		try_files $uri $uri/ /index.php;
	           }

if ($request_uri ~* "/(wp-admin/|wp-login.php)")
{
   
}

	location ~ \.php$ 
	{
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
		fastcgi_pass unix:/var/run/php5-fpm.sock;
		fastcgi_index index.php;
		include fastcgi_params;
	  }

location ~*  \.(jpg|jpeg|png|gif|ico|css|js)$ {
        expires 365d;
    }
location ~*  \.(pdf)$ {
        expires 30d;
    }

error_page 404 /index.php;

}


# HTTPS server
#
#server {
#	listen 443;
#	server_name localhost;
#
#	root html;
#	index index.html index.htm;
#
#	ssl on;
#	ssl_certificate cert.pem;
#	ssl_certificate_key cert.key;
#
#	ssl_session_timeout 5m;
#
#	ssl_protocols SSLv3 TLSv1;
#	ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
#	ssl_prefer_server_ciphers on;
#
#	location / {
#		try_files $uri $uri/ =404;
#	}
#}

-----------------

ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/

# Install  Mysql  
	apt-get install -y mysql-server
    apt-get --reinstall install -y bsdutils
	mysql_install_db
    /etc/init.d/mysql restart

# Install  WordPress 
    cd /usr/share/nginx/www/example.com
wget  -O latest.tar.gz http://wordpress.org/latest.tar.gz
 tar zxf latest-ar.tar.gz
 mv wordpress/* /usr/share/nginx/www/example.com   
    rmdir wordpress
    mv wp-config-sample.php wp-config.php

     # Fix  WP upload issue                                                                               
    chown -R www-data:www-data /usr/share/nginx/www
    chmod -R g+rwx /usr/share/nginx/www  

mysql -u root -p
CREATE DATABASE IF NOT EXISTS example
USE  example
CREATE USER 'example'@'localhost' IDENTIFIED BY 'PASS';
GRANT ALL PRIVILEGES ON example. * TO 'example'@'localhost';

proxmox vm4 makinasinda fsck yapmak gerekti

rescue mode actigimda aptal md* bir turlu baslayamadi

sac bas yolmamayim bir dahaki sefere

bu makina 4 disk 3 md uzeri lvmraid 10

o yuzden yontem soyle

1- rescue mode ac
2- aptal raid1 md ler calismiyorsa sunu yap
mdadm --examine --verbose --scan 
3-ekrandaki bilgilere gore raid arraylerini assemble et
# sudo mdadm --assemble /dev/md3 /dev/sdb2 /dev/sda2
mdadm: /dev/md3 has been started with 2 drives.
# sudo mdadm --assemble /dev/md4 /dev/sdd2 /dev/sdc2
mdadm: /dev/md4 has been started with 2 drives.
# sudo mdadm --assemble /dev/md5 /dev/sdd1 /dev/sdc1 /dev/sdb1 /dev/sda1
mdadm: /dev/md5 has been started with 4 drives.
3- cat /proc/mdstat deyip duruma goz at
4- lvm yi aktif eyle
lvm vgchange -a y
5- fsck lerini hedele
fsck /dev/pve/data
fsck /dev/pve/root

kolay gelsin

#!/bin/sh
###		 ###
# filename reunrar #
###		 ###
if [ -n "$1" ]; then
find $1 -iname *.rar | while read f
        do
                file=`basename "$f"`
                dir=`dirname "$f"`

                if [[ $file =~ .*part0*1\.rar$ ]]; then

                        echo "$file to $dir"
                        nice -n 19 unrar e -o- -inul "$f" "$dir"

                elif ! [[ $file =~ .*part[0-9]+\.rar$ ]]; then

                        echo "$file to $dir"
                        nice -n 19 unrar e -o- -inul "$f" "$dir"
                fi
        done
else
echo "reunrar [FILES DIR]"
fi

veya

#!/bin/bash

if [ $# -ne 1 ]
then
  echo "U forgot to enter directory where i should work!"
  exit
fi

while 
mesg="\n==============================================\n
  1.. Check .sfv files.\n
  2.. Unrar all files.\n
  3.. Delete rar and sfv files.\n
  4.. Exit
  \n==============================================\n
Select: \c"
do
  echo -e $mesg
  read selection
  case $selection in
  1)
    cd $1
    cfv -r ;;
  2)
    for f in `find $1 -wholename *.r01`
    do
      echo "Unpacking in directory: "`dirname $f`
      rar e -inul $f `dirname $f`
    done ;;
  3)
    for g in `find $1 -wholename *.r01`
    do 
      cd `dirname $g`
      echo "Deleting in directory: "`dirname $g`
      rm *.r?? *.url *.sfv imdb.nfo
      rm -r Sample/
    done ;;
  4) 
    exit;;
  esac
done

kisaca

rar e -r -inul *.rar

Install FFmpeg

First of all download and install RPMForge repository using the following commands:

user@myVPS:~# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.$(arch).rpm

user@myVPS:~# rpm -Uvh rpmforge-release-0.5.3-1.el6.rf.$(arch).rpm

Now you can install FFmpeg and some additional packages using yum.

user@myVPS:~# yum -y install ffmpeg ffmpeg-devel libogg libvorbis lame flvtool2 mencoder

Install ffmpeg-php

To download and extract the ffmpeg-php tarball, run:

user@myVPS:~# wget https://centos.googlecode.com/files/ffmpeg-php-0.6.0.tbz2

user@myVPS:~# tar -xjf ffmpeg-php-0.6.0.tbz2
user@myVPS:~# cd ffmpeg-php-0.6.0

Run ‘phpize’ to create the necessary build scripts

user@myVPS:~# phpize

If you get an error message “phpize: command not found”, It means that phpize is not in the system PATH. In our case, using PHP FPM version 5.6 the full path to the phpize is ‘/usr/local/php56/bin/phpize’, so we need to run:

user@myVPS:~# /usr/local/php56/bin/phpize

Run “configure” to set the installation options, in our case the command is as follows:

user@myVPS:~# ./configure –with-php-config=/usr/local/php56/bin/php-config

You can find the locations of phpize and php-config binaries using the find command:

user@myVPS:~# find /usr/local/ -type f -name

user@myVPS:~# phpize find /usr/local/ -type f -name php-config

Run make to start the compilation:

user@myVPS:~# make

If you get an error message like make: *** [ffmpeg_movie.lo] Error 1 open the ffmpeg_movie.c file and make the following changes:

user@myVPS:~# vim ffmpeg_movie.c

Change list_entry *le; to zend_rsrc_list_entry *le;
Change list_entry new_le; to zend_rsrc_list_entry new_le;
Change hashkey_length+1, (void *)&new_le, sizeof(list_entry), to hashkey_length+1, (void *)&new_le,sizeof(zend_rsrc_list_entry),

and restart the compilation:

user@myVPS:~# make

to install the binaries run:

user@myVPS:~# make install

Once the installation is complete, open the php.ini file

user@myVPS:~# vim /usr/local/php56/lib/php.ini

change the extension_dir to point to the extension directory, in our case :

extension_dir =”/usr/local/php56/lib/php/extensions/no-debug-non-zts-20131226/”

and append the following line to enable the ffmpeg extension

extension=”ffmpeg.so”

Finally restart php-fpm for changes to take effect.

user@myVPS:~# service php-fpm56 restart

If you’re running PHP as an Apache module, then restart apache with the command below:

user@myVPS:~# service httpd restart

That’s it. You have successfully installed the ffmpeg-php extension.

NOT!
EGER PIX_FMT_RGBA32/PIX_FMT_RGB32

ALIRSAN

nano ffmpeg_frame.c

DEDIKTEN SONRA

RGBA32 OLAN SATIRLARI RGB32
YAP