Archive for February, 2009

Copy from http://yusshalimee.blogspot.com/

Skrip ini aku guna kat server aku.. backup mysql setiap hari. Hanya perlu ubah pada bahagian setting sahaja. chmod dan set cron untuk daily run

=========== mula ==============

#!/bin/bash

##### SETTING #####
MYUSER=”dbuser”
MYPWD=”password”
DB=”database”
DIR_PATH=”/var/mysql-backup”
FAIL=mybck_$(date +%d-%m-%Y)

###################

#check DIR_PATH
if [ ! -d $DIR_PATH ]
then
mkdir $DIR_PATH
fi

#Running MySQL dump
cd /tmp
mysqldump -c -x –add-drop-table –add-locks –database $DB -u $MYUSER -p$MYPWD > $FAIL.sql

#Compress result
if [ -e $DIR_PATH/mytoday_$(date +%d-)* ]
then
rm -f $DIR_PATH/mytoday_$(date +%d-)*
tar -jcf $DIR_PATH/$FAIL.tgz $FAIL.sql
rm -f $DIR_PATH/latest.tgz
ln -s $DIR_PATH/$FAIL.tgz $DIR_PATH/latest.tgz
else
tar -jcf $DIR_PATH/$FAIL.tgz $FAIL.sql
rm -f $DIR_PATH/latest.tgz
ln -s $DIR_PATH/$FAIL.tgz $DIR_PATH/latest.tgz
fi
rm -f $FAIL.sql

===================== tamat ====================

Vmware host server kernel problem

Posted: February 19, 2009 in Debian, Slackware

Copy from

http://yusshalimee.blogspot.com/

i’m facing a problem with vmware community server which stop responding on host server after a few hours running on clock update. To solve the problem we have to edit /etc/vmware/config
and add this :-

host.useFastClock = FALSE

save it then restart vmware

hope this help

Install Plesk on Debian OS manually

Posted: February 19, 2009 in Debian

I use plesk as my web hosting control panel

Step # 1: Verify current system

File /etc/debian_version stores current Debian version number :

$ cat /etc/debian_version

Output:
4.0

Find out kernel version
$ uname -mrs
Output:
Linux 2.6.18-6-686 i686

Step #2: Update package list

Use apt-get command:
# apt-get update

Step #3 : Update distribution

# apt-get dist-upgrade

Step #4 : Update /etc/apt/sources.list file

Open /etc/apt/sources.list file:
# pico /etc/apt/sources.list

deb http://autoinstall.plesk.com/debian/PSA_9.0.1 etch all

Next run update to cache packages list:

# aptitude update
Now you can install Plesk. For example to install base Plesk package use:

# aptitude install psa

or you can download this using aoutoinstaller

wget http://download1.parallels.com/Plesk/Plesk8.6/Debian4.0/parallels_installer_v3.3.2_build080710.09_os_Debian_4.0_i386

After installation gets complete you can get the plesk password from

cat /etc/psa/.psa.shadow.

debian date and time

Posted: February 19, 2009 in Debian

if you have problem using date and time in debian issued this command

tzconfig

enter : y

than choose: kuala_lumpur

than issued

date

you will get date and time for malaysia

slackware server

Posted: February 19, 2009 in Slackware

if somebody out there love to use slackware as server then this i recommended

Zenwalk server

ftp://ftp.sh.cvut.cz/MIRRORS/zenwalk/i486/zenwalk-core-5.2/ISO/zenwalk-core-5.2.iso

this is simple and light version of slackware but use lighttpd as a webserver

i use it as a samba server and my own web server.

i based on this LQ

(http://www.linuxquestions.org/questions/zenwalk-75/zenwalk-compared-to-slackware-483186/)

Zenwalk can be used as a server but it makes on hell of a desktop. Slackware can be used as a desktop but makes on hell of a server

Free memory in linux

Posted: February 19, 2009 in Debian, Slackware

using this will flush your cache in RAM

pico /usr/bin/memfree

#——————- cut here —————–

#!/bin/bash
sync &
echo 3 > /proc/sys/vm/drop_caches &

#——————- cut here —————–

chmod +x /usr/bin/memfree

using cron to flush server memory

crontab -u root -e

then put in your cron

*/30 * * * * /skrip/memfree >/dev/null 2>&1

debian repo

Posted: February 19, 2009 in Debian

This is guide debian repository using malaysian mirror

deb http://mirror.oscc.org.my/debian/ etch main contrib non-free

For backport use this repo

deb http://www.backports.org/debian etch-backports main

then issued this command

apt-get install debian-backports-keyring

then

pico /etc/apt/preferences

Package: *

Pin: release a=etch-backports

Pin-Priority: 200