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

August 13, 2012

Webmail User ‘useraccount’ is over quota

Filed under: cPanel/WHM — dh @ 3:06 am

Webmail User ‘useraccount’ is over quota
But useraccount is not over quota

Go to
/var/cpanel/overquota/
ll

delete cpanel username from list

July 9, 2012

Check Motherboard Type

Filed under: Server — dh @ 12:01 pm

/usr/sbin/dmidecode

July 1, 2012

Error ip_conntrack: table full, dropping packet

Filed under: Apache,Server — Tags: , — dh @ 1:57 pm

Error ip_conntrack: table full, dropping packet terjadi karena banyaknya kunjungan ke server dan menyebabkan database iptable menjadi penuh

solusi:

1. naikkan kapasitas iptable

echo 131072 > /proc/sys/net/ipv4/ip_conntrack_max

2. flush kosongkan iptable

iptables -P
iptables -F

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

April 5, 2012

‘./eximstats/sends’ is marked as crashed

Filed under: MySql,Server — dh @ 9:14 am

MySql Error

[ERROR] /usr/sbin/mysqld: Table './eximstats/sends' is marked as crashed and last (automatic?) repair failed

Repair from command line ssh
myisamchk -r /var/lib/mysql/eximstats/sends.MYI

March 26, 2012

Disable PHP Execition

Filed under: Apache — dh @ 6:03 am

open .htaccess and add


Order Deny,Allow
Deny from all

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

MySql Configuration

Filed under: MySql — dh @ 8:40 am

[mysqld]
safe-show-database
skip-locking

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
skip-networking

##used in replication to give each master and slave a unique identity
server-id=1

##amount of seconds during inactivity that MySQL will wait before it will close a connection on a non-interactive connection.
wait_timeout=5

##amount of seconds during inactivity that MySQL will wait before it will close a connection on interactive connection, interactive is mysql shell sessions
interactive_timeout=28800

##The number of seconds that the mysqld server waits for a connect packet before responding with Bad handshake
connect_timeout=5

##If more than this many successive connection requests from a host are interrupted without a successful connection, the server blocks that host from further connections
max_connect_errors=10

#The maximum number of simultaneous connections permitted to any given MySQL user account
max_user_connections=15

##This value indicates how many maximum concurrent connections mysql server can handle. If mysql reaches to it maximum (max) limit then you can see errors like "too many connections".
max_connections=200

##key_buffer_size is the size of the buffer used for index blocks. The key buffer is also known as the key cache.
key_buffer_size=128M

#The minimum size of the buffer that is used for plain index scans, range index scans, and joins that do not use indexes and thus perform full table scans.
join_buffer_size=1M

##Each session that needs to do a sort allocates a buffer of this size
sort_buffer_size=2M

##Each thread that does a sequential scan allocates a buffer of this size (in bytes) for each table it scans.
read_buffer_size=131072

#The maximum size of one packet or any generated/intermediate string.
max_allowed_packet=2M

##The number of open tables for all threads
table_open_cache=2048

##which sets the number of threads to hold open in memory to service new connections
thread_cache_size=16

##enables applications to give the threads system a hint about the desired number of threads that should be run at the same time.
thread_concurrency=10

##Cache all cacheable query results except for those that begin with SELECT SQL_NO_CACHE.
query_cache_type=1

##Do not cache results that are larger than this number of bytes
query_cache_limit=1M

##The amount of memory allocated for caching query results
query_cache_size=128M

##The number of open tables for all threads
table_cache=5120

tmp_table_size=32M
max_heap_table_size=64M

innodb_buffer_pool_size=64M
innodb_additional_mem_pool_size=8M
innodb_log_file_size=8M

##If a query takes longer than this many seconds, the server increments the Slow_queries status variable
long_query_time=1

##to enable or disable the slow query log
slow_query_log=1
slow-query-log=1
slow_query_log_file=/var/log/mysql/mysql-slow.log

« Newer PostsOlder Posts »

Powered by WordPress