Posts Tagged ‘ntp’

Mysql huge databases Server, cut n paste

———————–cut here —————————–

[mysqld]
local-infile=0
skip-locking
query_cache_limit=1M
query_cache_size=32M
query_cache_type=1
max_connections=500
interactive_timeout=100
wait_timeout=100
connect_timeout=10
thread_cache_size=128
key_buffer=16M
join_buffer=1M
max_allowed_packet=16M
table_cache=1024
record_buffer=1M
sort_buffer_size=2M
read_buffer_size=2M
max_connect_errors=10
# Try number of CPU’s*2 for thread_concurrency
thread_concurrency=2
myisam_sort_buffer_size=64M
server-id=1
skip-innodb
skip-bdb
log-slow-queries
skip_name_resolve

[safe_mysqld]
err-log=/var/log/mysqld.log
open_files_limit=8192

[mysqldump]
quick
max_allowed_packet=16M

[mysql]
no-auto-rehash
#safe-updates

[isamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M

[myisamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M

[mysqlhotcopy]
interactive-timeout

———————–cut here —————————–

Date in ubuntu

Posted: October 28, 2011 in Debian
Tags: , , , , , , , , ,

Selalu lupa….

1. Install ntp

root@webmail:~# aptitude install ntp

2. Get date from mst.sirim.my

ntpdate mst.sirim.my

3. Set script

root@webmail:~# pico /skrip/takwin

################ cut here ##################

#!/bin/bash
ntpdate mst.sirim.my

################ cut here ##################

4. Set Cron

root@webmail:~# crontab -u root -e

*/50 * * * * /skrip/takwin >/dev/null 2>&1

5. Run takwin

root@webmail:~# /skrip/takwin

28 Oct 19:52:27 ntpdate[1162]: step time server 202.190.26.30 offset 4.735816 sec