dapurhosting.com Blog for Tech

August 16, 2012

Install Bonnie++

Filed under: Server — Tags: , — dh @ 5:29 pm

Download the latest atrpms-repo rpm from http://dl.atrpms.net/el6-x86_64/atrpms/stable/

Install atrpms-repo rpm:

rpm -Uvh atrpms-repo*rpm

Install bonnie++ rpm package:

yum install bonnie++

Source: http://pkgs.org/centos-6-rhel-6/atrpms-x86_64/bonnie++-1.03e-6.el6.x86_64.rpm.html#howto

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

March 23, 2012

Tuning MySQL Performance with MySQLTuner

Filed under: MySql — Tags: , , — dh @ 8:56 am

You can download the MySQLTuner script as follows:

wget http://mysqltuner.com/mysqltuner.pl

In order to run it, we must make it executable:

chmod +x mysqltuner.pl

Afterwards, we can run it. You need your MySQL root password for it:

./mysqltuner.pl

Powered by WordPress