BolPoint.wordpress.com

November 8, 2011

Ubuntu Squid Video Cache Youtube Hit videocache

Filed under: Linux — bolpoint @ 4:39 pm

Bandwidth mesti boros kalo user pada seneng Streaming Video apalagi bandwidth kita pas-pasan.kali ini mau nyoba cache video dengan menggunakan squid 2.6 dengan OS Favorit debian etch! Yang kita butuhkan adalah :

1. Squid (Versi 2.6)

2. Python >=2.4

3. Python-urlgrabber

4. Python-iniparse

5. Apache (Versi 2)

Tahap Instalnya:

#apt-get install python python-urlgrabber

Download iniparse versi terbaru iniparse-0.3.1.tar dilink ini http://adf*.ly/3wdWe

#wget http://iniparse.googlecode.com/files/iniparse-0.2.4.tar.gz

Ekstrak file jika udah ter download

#tar zxvf iniparse-0.2.4.tar.gz

#cd cd iniparse-0.2.4

#python setup.py install

Download videocache terbaru di link ini http://adf*.ly/3wdik

#wget http://cachevideos.com/sites/default/files/pub/videocache/videocache-1.9.2.tar.gz

ekstrak file tersebut

#tar zxvf videocache-1.8.tar.gz

#cd cd videocache-1.8

Sebelum install rubah konfigurasi instaler videocahe

#vim setup.py -Edit- squid_user = ‘proxy’ squid_group = ‘proxy’ apache_conf_dir = ‘/etc/apache2/conf.d/’

#python setup.py install

#vim /etc/videocache.conf cache_host = 10.10.4.1 < ganti dengan ip squid proxy = http://10.10.4.1:3128/ < ganti dengan ip squid dan port squid anda base_dir = /var/www/videocache/

#Vim /etc/squid.conf -Edit-

Kopikan konfigurasi file tersebut di Squid

# –START videocache config for squid url_rewrite_program /usr/bin/python /usr/share/videocache/videocache.py url_rewrite_children 5 acl videocache_allow_url url_regex -i \.youtube\.com\/get_video\? acl videocache_allow_url url_regex -i \.googlevideo\.com\/videoplayback \.googlevideo\.com\/get_video\? acl videocache_allow_url url_regex -i \.google\.com\/videoplayback \.google\.com\/get_video\? acl videocache_allow_url url_regex -i \.google\.[a-z][a-z]\/videoplayback \.google\.[a-z][a-z]\/get_video\? acl videocache_allow_url url_regex -i proxy[a-z0-9\-][a-z0-9][a-z0-9][a-z0-9]?\.dailymotion\.com\/ acl videocache_allow_url url_regex -i vid\.akm\.dailymotion\.com\/ acl videocache_allow_url url_regex -i [a-z0-9][0-9a-z][0-9a-z]?[0-9a-z]?[0-9a-z]?\.xtube\.com\/(.*)flv acl videocache_allow_url url_regex -i bitcast\.vimeo\.com\/vimeo\/videos\/ acl videocache_allow_url url_regex -i va\.wrzuta\.pl\/wa[0-9][0-9][0-9][0-9]? acl videocache_allow_url url_regex -i \.files\.youporn\.com\/(.*)\/flv\/ acl videocache_allow_url url_regex -i \.msn\.com\.edgesuite\.net\/(.*)\.flv acl videocache_allow_url url_regex -i media[a-z0-9]?[a-z0-9]?[a-z0-9]?\.tube8\.com\/ acl videocache_allow_url url_regex -i \.mais\.uol\.com\.br\/(.*)\.flv acl videocache_allow_url url_regex -i \.video[a-z0-9]?[a-z0-9]?\.blip\.tv\/(.*)\.(flv|avi|mov|mp3|m4v|mp4|wmv|rm|ram) acl videocache_allow_url url_regex -i video\.break\.com\/(.*)\.(flv|mp4) acl videocache_allow_dom dstdomain v.mccont.com dl.redtube.com .cdn.dailymotion.com acl videocache_deny_url url_regex -i http:\/\/[a-z][a-z]\.youtube\.com http:\/\/www\.youtube\.com url_rewrite_access deny videocache_deny_url url_rewrite_access allow videocache_allow_url url_rewrite_access allow videocache_allow_dom redirector_bypass on

# –END– videocache config for squid

#Restart Apache dan SQuid !!!

Selamat anda sudah mencache youtube dan untuk mengunduh hail downloadtan langsung aja ke http://localhost/videocahe/

Jangan lupa tinggalkan comment

NB: untuk link download copy dan hilangkan tanda *

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: