YourSite - Slogan Here!

Cara menjalankan ntpdate under virtual machine Proxmox

Some of OpenVZ containers, on servers that I manage, had problems with wrong date being displayed. Well, no big deal, I can just issue good old ntpdate command. Or not.
ntpdate ri.ntp.carnet.hr
ntpdate[22082]: Can’t adjust the time of day: Operation not permitted
Solution:
On HW host:
/usr/sbin/vzctl stop  <ctid>
/usr/sbin/vzctl set <ctid>  –capability sys_time:on  –save
/usr/sbin/vzctl start  <ctid>
Check if everything […]

Comments Off

Change local time

Change local time Centos on Proxmox
mv /etc/localtime /etc/localtime.bak
ln -s /usr/share/zoneinfo/Asia/Jakarta /etc/localtime

Comments Off

Upgrade Clamav from Portupgrade

Install portupgrade if you didn’t already. Skip this part if you have it on your system.

# portsnap fetch

# portsnap update

# cd /usr/ports/ports-mgmt/portupgrade

# make install clean

Here comes the regular upgrading part. First we need to update our ports tree everytime we decide to upgrade ClamAV package. Then we create or update (+fix) the system […]

Upgrade FreeBSD to FreeBSD 9.0-RELEASE

Step 1: The upgrade
Let’s get right to it. Here’s the first step in the upgrade process:
freebsd-update upgrade -r 9.0-RELEASE
Once all files have been fetched, you will be asked a number of questions about merging config-files. They all seemed reasonable to me, so I just answered ‘y’ to all of them, but it […]

FreeBSD Patch

Untuk melakukan patching di OS FreeBSD cukup mengetikkan :
freebsd-update fetch
freebsd-update install
Cheers

CVSUP Syntax

*default host=cvsup.id.FreeBSD.org
*default base=/usr
*default prefix=/usr
*default release=cvs tag=.
*default delete use-rel-suffix

Untuk menghapus ^M pada script PHP

Esc
:%s/^M//g
Note : ^M = Ctrl + vm

Cara Compile Kernet FreeBSD 64bit

#cd /usr/src/sys/amd64/conf
#cp SMP MySMP
#cp GENERIC MyGENERIC
#vi MySMP
ubah GENERIC menjadi MyGENERIC
save
#vi MyGENERIC
tambahkan text dibawah
options         IPFIREWALL
options         IPFIREWALL_VERBOSE
options         IPFIREWALL_VERBOSE_LIMIT=10
options         IPDIVERT
save
#cd /usr/src/
#make buildkernel KERNCONF=MySMP
#make installkernel KERNCONF=MySMP
#cd /etc
#vi rc.conf
tambahkan :
firewall_enable=”YES”
firewall_script=”/etc/ipfw.rules”
save
#vi /etc/ipfw.rules
tambahkan :
#!/bin/sh
fwcmd=”/sbin/ipfw”
$fwcmd -f flush
$fwcmd add allow ip from any to any via lo0
Tambahkan rules ipfw sesuai kebutuhan
save
reboot

Untuk menghapus file yang jumlahnya banyak di *nix

for i in *; do echo $i; rm -f $i; done
Kalo mau lebih cepat pakai ini
time perl -e ‘for(<*>){((stat)[9]<(unlink))}’
Kalo untuk menghapus Content SPAM
find /PATH/ -type f -exec grep -qiF MAILER-DAEMON \{\} \; -print
find /PATH/ -type f -exec grep -qiF MAILER-DAEMON \{\} \; -delete

How do I change mysql root password?

If you are setting a root password first time, use any one of the following command syntax:
mysqladmin password “NEW-PASSWORD“
OR
mysqladmin -u root password “NEW-PASSWORD“
OR
mysqladmin -u root -h localhost password “NEW-PASSWORD“