dapurhosting.com Blog for Tech

June 15, 2012

Mod_Deflate

Filed under: cPanel/WHM,Server — Tags: — dh @ 6:02 pm

Ke cPanel >> Apache Configuration >> Include Editor >> Post VirtualHost Include >> All Version Tambahkan kode ini


AddOutputFilterByType DEFLATE text/html text/plain text/xml


# Netscape 4.x has some problems…
BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine
# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
# the above regex won’t work. You can use the following
# workaround to get the desired effect:
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

# Don’t compress images
SetEnvIfNoCase Request_URI \
\.(?:exe|t?gz|zip|bz2|sit|rar)$ \
no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary


# Make sure proxies don’t deliver the wrong content
Header append Vary User-Agent env=!dont-vary

Test:
http://www.whatsmyip.org/http-compression-test/

Install Memcache

Filed under: Apache,Server — Tags: , — dh @ 8:12 am

cd /usr/local/src/
wget https://github.com/downloads/libevent/libevent/libevent-2.0.19-stable.tar.gz
tar xfz libevent*
cd libevent*
./configure
make
sudo make install

sudo ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib

cd /usr/local/src/
wget http://memcached.googlecode.com/files/memcached-1.4.13.tar.gz
tar xfz memcached*
cd memcached*
./configure
make
sudo make install

test memcached

memcached -d -u nobody -m 1024 127.0.0.1 -p 11211

Kalau error
ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib64/libevent-2.0.so.5

Install libmemcached
cd /usr/local/src/
wget http://launchpad.net/libmemcached/1.0/1.0.4/+download/libmemcached-1.0.4.tar.gz
tar -zxvf libmemcached-1.0.4.tar.gz
cd libmemcached-1.0.4
./configure
make && make install

Install memcached
pecl install memcached

pecl install memcached

http://forums.cpanel.net/f5/memcached-instalation-memcached-so-missing-257942.html

Powered by WordPress