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 lvm raid 10 fuck you ok!
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
linux recursive unrar
#!/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-php on CentOS 6 with DirectAdmin
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
NVIDIA LINUX NVIDIA X SERVER SETTINGS SAVE ERROR!
Problem:
You do not have adequate permission to open the existing X configuration file ‘/etc/X11/xorg.conf’ for writing. You must be ‘root’ to modify the file.
Solution:
gksudo nvidia-settings
Done 🙂
Nufusu en kalabalik 10 ulke
proxmox ext4 software raid mount ayarlari ve ZFS bonus
Ulan proxmox , kac yil oldu
lisansi uygun degil dedin, salladin ZFS yi simdi official destek veriyosun.
ulan serefsiz proxmox , biz ugrasirken neden kestirip attinda simdi hemen resmi destek verdin
ceph meph basimizin etini yedin, omrumuzu yedin,
ulan amk proxmoxu adam gibi versene destegi musteri ne istiyosa, ne kitibiyoz avusturyali alaman sulalesi imissin sen ya,
almiyacam ulan offical destek paketini senden, inat da inat
bak ayni seyi html5 novnc icinde yaptin, gak guk dedin sonra koyu verdin.
terbiyesiz, serefsiz,
neyse ben genede seviyom seni,
allahin avusturya gerzek mantiginida seviyorum,
open source olup
despot ben ne dersem o olurunuda, kestirip atmanida seviyorum.
operim seni proxmox
http://pve.proxmox.com/wiki/ZFS
bu zfs linki
Aha buda forumdan bir baska cevher,
diyorlarki
eger ext4 kullaniyorsan
su sekilde mount edersen disklerini
pek faydali olur.
ki ben ext3 bir sistemde denedim
acikcasi hic bir faydasini gormedim
ama bir dahaki sefere ext4 kurup deneriz.
http://forum.proxmox.com/threads/20899-Raid-10-8x-512gb-SSD-Low-performance
bu forum linki
buda mounting ayarlari:
/dev/pve/root / ext4 relatime,nodelalloc,barrier=0,errors=remount-ro 0 1
/dev/pve/data /var/lib/vz ext4 relatime,nodelalloc,barrier=0 0 1
/dev/md0 /boot ext4 relatime,nodelalloc,barrier=0 0 1
Off Topic!
deluge web ui, transmission web ui , passkey ziriltisi..
uzun zamandir bu web ui ler ile ugrasmamistim.
gercekten cok uzun zaman olmus.
en son baktigimda gayet yeteneksizdiler.
artik full featured, *tam tesekkullu* , torrent client olarak kullanilabilecek durumdalarmis.
once transmission web ui sini denedim
amaci yerine getiriyor
sonra deluge web ui sini denedim, deluge cliente onceden beri sevgim var nedense, bunu kullanmaya karar verdim.
birde passkey mevzusu var, eskiden private trackerlarda uis pass cookiesi girmen gerekiyordu, oysa simdi mesala torrentleechde direk indirdigin torrentin icine gomulu passkey
dolayisi ile islem cok basit , torrenti indir private trackerdan, web ui uzerinden ul et . oldu bitti.
TL mesela 3 ayri lokasyonda seed yapmana izin veriyormus, dokumantasyonuna bakarken okudum.
her neyse simdi basit bir sekilde web uileri kuralim ve calistiralim.
sistemimiz ubuntu x64
Transmission:
apt-get install transmission-daemon service transmission-daemon stop nano /etc/transmission-daemon/settings.json (change password & username, download location) service transmission-daemon start In browser visit your domain/IP:9091 - login Have fun..
Deluge:
sisteme deluge kullanicisi ekleyerek baslayacagiz: sudo adduser --disabled-password --system --home /var/lib/deluge --gecos "SamRo Deluge server" --group deluge sudo touch /var/log/deluged.log sudo touch /var/log/deluge-web.log sudo chown deluge:deluge /var/log/deluge* sudo apt-get update sudo apt-get install deluged deluge-webui nano deluged.conf ====================================================================== # deluged - Deluge daemon # # The daemon component of Deluge BitTorrent client. Deluge UI clients # connect to this daemon via DelugeRPC protocol. description "Deluge daemon" author "Deluge Team" start on filesystem and static-network-up stop on runlevel [016] respawn respawn limit 5 30 env uid=deluge env gid=deluge env umask=000 exec start-stop-daemon -S -c $uid:$gid -k $umask -x /usr/bin/deluged -- -d ====================================================================== nano deluge-web.conf ====================================================================== # deluge-web - Deluge Web UI # # The Web UI component of Deluge BitTorrent client, connects to deluged and # provides a web application interface for users. Default url: http://localhost:8112 description "Deluge Web UI" author "Deluge Team" start on started deluged stop on stopping deluged respawn respawn limit 5 30 env uid=deluge env gid=deluge env umask=027 exec start-stop-daemon -S -c $uid:$gid -k $umask -x /usr/bin/deluge-web ====================================================================== cp deluge* /etc/init/ service deluged start
Giris yap:
http://su.nu.cu.ip:8112
ilk password: deluge
Ayar eyle, slottur, capdir, ivirdir zivirdir
Gule Gule Kullan 🙂
yine yeniden password soran squid proxy
GUNCELLEME 12/ 28/ 2015 ubuntu 15.10 icin
apt-get update
apt-get install apache2-utils squid3 -y
htpasswd -c /etc/squid3/passwd kullaniciadi
wget -O /etc/squid3/squid.conf http://shukko.com/squid/squsqu.conf
nano /etc/squid3/squid.conf (ip adreslerini duzenle)
service squid3 restart && update-rc.d squid3 defaults