Membangun server & client Network Time Protocol (NTP) Maret 27, 2009
Posted by setijoagus in Linux, Network.Tags: ntp client, ntp server
add a comment
Network Time Protocol (NTP)
NTP adalah protocol yang didesign untuk synchronize clocks dari computer dan network ke Internet / Local Area Network
NTP (version 4) dapat maintain time dari public Internet dengan ketepatan 10 milliseconds (1/100 second)
dan jika menggunakan LAN accuracies 200 microseconds (1/5000 second)
======================================================
SERVER NTP : sinkronisasi dengan internet
======================================================
Fedora Core release 2 (Tettnang)
A. Periksa , jika package belum ada segera diinstall
# rpm -qa | grep ntp
chkfontpath-1.10.0-1
ntp-4.2.0-7
B. setup kunfigurasi
# cp /etc/ntp.conf /etc/ntp.conf.asli
# vi /etc/ntp.conf
driftfile /var/lib/ntp/drift
server clock.isc.org
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
restrict 127.0.0.1
restrict ::1
C. Test
i. jam sebelumnya
# date
Thu Mar 26 08:59:21 WIT 2009
ii. ambil jam di internet
# ntpdate clock.isc.org
Looking for host clock.isc.org and service ntp
host found : clock.isc.org
26 Mar 09:00:39 ntpdate[10015]: step time server 204.152.184.72 offset 46.540820 sec
iii. jam sekarang
# date
Thu Mar 26 09:00:55 WIT 2009
D. Agar sistem selalu menjalankan
# chkconfig ntpd on
# service ntpd start
Starting ntpd: [ OK ]
E. Perhatian
i. misal jam server diubah, sedangkan ntp server sudah start
# service ntpd start
Starting ntpd: [ OK ]
# date -s 09:00:00
Thu Mar 26 09:00:00 WIT 2009
ii. lakukkan sinkronisasi
# ntpdate pool.ntp.org
Looking for host pool.ntp.org and service ntp
host found : IP-162-29.saranadata.com
26 Mar 09:00:21 ntpdate[10182]: the NTP socket is in use, exiting
iii. periksa hasil server, ternyata tidak berubah
# date
Thu Mar 26 09:00:26 WIT 2009
iv. jika inigin sinkronisasi service ntp harus stop
# service ntpd stop
# ntpdate pool.ntp.org
Looking for host pool.ntp.org and service ntp
host found : mx3.lipi.go.id
26 Mar 09:22:11 ntpdate[10197]: step time server 202.155.61.28 offset 1289.923998 sec
# date
Thu Mar 26 09:22:14 WIT 2009
# service ntpd start
======================================================
SERVER NTP : sinkronisasi dengan LAN
======================================================
CentOS release 5.2 (Final)
A. Periksa , jika package belum ada segera diinstall
# rpm -qa | grep ntp
ntp-4.2.2p1-8.el5.centos.1
chkfontpath-1.10.1-1.1
B. setup kunfigurasi
# cp /etc/ntp.conf /etc/ntp.conf.asli
# vi /etc/ntp.conf
driftfile /var/lib/ntp/drift
server 172.20.140.11
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
restrict 127.0.0.1
restrict ::1
C. Test
i. jam sebelumnya
# date
Thu Mar 26 09:28:22 WIT 2009
ii. ambil jam di LAN
# ntpdate 172.20.140.11
26 Mar 09:57:08 ntpdate[654]: step time server 172.20.140.11 offset 1710.409301 sec
iii. jam sekarang
# date
Thu Mar 26 09:57:12 WIT 2009
D. Buat file, jika nggak ada & isinya, spt dibwah ini
# cat >> /etc/ntp/step-tickers << EOF
172.20.140.11
EOF
E. Agar sistem selalu menjalankan
# chkconfig ntpd on
# service ntpd start
Starting ntpd: [ OK ]
======================================================
CLIENT NTP : sinkronisasi dengan LAN
======================================================
Fedora Core release 4 (Stentz)
A. Periksa , jika package belum ada segera diinstall
# rpm -qa | grep ntp
ntp-4.2.0.a.20040617-8
chkfontpath-1.10.0-4
B. setup kunfigurasi
# mv /etc/ntp.conf /etc/ntp.conf.asli
# vi /etc/ntp.conf
restrict 127.0.0.1
server 172.20.140.33
driftfile /etc/ntp/drift
restrict 172.20.140.33 mask 255.255.0.0 nomodify notrap noquery
# vi /etc/ntp/step-tickers
172.20.140.33
C. Test
i. jam sebelumnya
# date
Thu Mar 26 09:28:22 WIT 2009
ii. ambil jam di LAN
# ntpdate 172.20.140.33
26 Mar 11:29:43 ntpdate[12661]: no server suitable for synchronization found
26 Mar 07:41:36 ntpdate[5728]: no server suitable for synchronization found
[tunggu beberapa waktu, jika firewall nggak ada, mestinya bisa]
# ntpdate 172.20.140.33
26 Mar 11:50:07 ntpdate[13033]: adjust time server 172.20.140.33 offset -0.151501 sec
iii. jam sekarang
# date
Thu Mar 26 11:50:12 WIT 2009
D. Buat file, jika nggak ada & isinya, spt dibwah ini
# cat >> /etc/ntp/step-tickers << EOF
172.20.140.33
EOF
D. Agar sistem selalu menjalankan
# chkconfig ntpd on
# service ntpd start
Starting ntpd: [ OK ]
E. Apakah time sudah sinkron ?, ditandai *
# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*172.20.140.33 172.20.140.11 3 u 10 64 377 0.341 551019. 148770.
rdate : server waktu Maret 26, 2009
Posted by setijoagus in Linux.Tags: rdate, server waktu
add a comment
Saya memiliki beberapa komputer linux client, saya berkeinginan agar
semuanya memiliki waktu yang sama, dimana nantinya semua komputer akan mengambil informasi waktu ke server (misal ip :172.20.140.32).
SISI SERVER
1. edit file /etc/xinetd.d/time
2. disable = yes menjadi disable = no
service time
{
type = INTERNAL
id = time-stream
socket_type = stream
protocol = tcp
user = root
wait = no
disable = no
}
3. restart service xinetd
# service xinetd restart
4. periksa dengan nmap
nmap 172.20.140.32
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
25/tcp open smtp
37/tcp open time
SISI CLIENT
5. butuh package rdate rpm
6. jalankan dari client
rdate -s 172.20.140.32
Diproteksi: CLONE ORACLE 10GR2 dari WINDOWS ke LINUX [detail] Maret 18, 2009
Posted by setijoagus in Linux, Oracle Backup, oracle.Tags: clone database
Masukkan kata sandi Anda untuk melihat komentar
CLONE ORACLE 10GR2 dari WINDOWS ke LINUX Maret 18, 2009
Posted by setijoagus in Linux, Oracle Backup, oracle.Tags: clone
add a comment
CLONE ORACLE 10GR2 dari WINDOWS ke LINUX
seharusnya cara – cara ini juga dapat digunakan untuk melakukkan :
a. control file rusak
b. redolog rusak
c. dan tentunya clone / migrasi ke beda O/S
server asal / windows
1. jika server tidak rusak.
a. create CONTROLFILE script
sql > ALTER DATABASE backup CONTROLFILE to trace
sql > shutdown immediate;
b. temukan trace file terakhir, extention .trc
c. loncat ke langkah no 3
2. jika control file [control01.ctl, control02.ctl, control03.ctl] dan
redolog [redo01.LOG, redo02.LOG, redo03.LOG] rusak
3. edit / buat file yang mirip, jika sulit copykan dari
server yang lain, dalam contoh saya beri nama clone_modif.sql
4. copykan file – file .dbf [find file / semua data file yang ada ]
[kalau ada yang rusak ya wasalam he.....he.....he......]
contoh saya dan disimpan di /u02/data:
index02.dbf
system01.dbf
users01.dbf
sysaux01.dbf
EXAMPLE01.DBF
UNDOTBS01.DBF
data01.dbf
data02.dbf
index01.dbf
5. membuat init.ora, sama dengan langkah no 3, bisa contoh dari server yang lain
6. menyiapkan folder-folder
[oracle@orcl ~]$ mkdir -p /u02/admin/orcl/adump
[oracle@orcl ~]$ mkdir -p /u02/admin/orcl/bdump
[oracle@orcl ~]$ mkdir -p /u02/admin/orcl/cdump
[oracle@orcl ~]$ mkdir -p /u02/flash_recovery_area
[oracle@orcl ~]$ mkdir -p /u02/admin/orcl/udump
7. membuat spfile
8. menjalankan script clone_modif.sql
SQL> @clone_modif.sql;
Control file created.
Database altered.
9. restart, dan lakukan startup normal
SQL> shutdown abort;
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1218992 bytes
Variable Size 96470608 bytes
Database Buffers 184549376 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
quota linux Maret 14, 2009
Posted by setijoagus in Linux.Tags: quota
6 comments
quota, membatasi berapa banyak user menyimpan data ke sebuah folder
1. apakah sudah diinstall ?, jika belum diinstall
[root@wksvr ~]# rpm -ivh quota-3.13-1.2.3.2.el5.i386.rpm
2. edit /etc/fstab
[root@wksvr ~]# vi /etc/fstab
#/dev/hdb1 /u02 ext3 defaults 1 2
/dev/hdb1 /u02 ext3 defaults,grpquota,usrquota 1 2
3. remount
[root@wksvr ~]# mount -o remount /u02
[root@wksvr ~]# mount
/dev/hda2 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hda1 on /boot type ext3 (rw)
/dev/hda4 on /u01 type ext3 (rw)
/dev/hdb1 on /u02 type ext3 (rw,grpquota,usrquota)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
4. bikin database [cepat / lambatnya proses tergantung besarnya kapasitas partisi]
[root@wksvr ~]# quotacheck -cugm /u02
[root@wksvr ~]# ls -l /u02/aquo*
-rw——- 1 root root 7168 Mar 14 10:31 /u02/aquota.group
-rw——- 1 root root 7168 Mar 14 10:31 /u02/aquota.user
5. setquota user
# setquota -u user bs bh is ih -a fs
user : username
bs : block soft limit
bh : block hard limit
is : inode soft limit
ih : inode hard limit
fs : filesystem
6. setquota group
# setquota -g group bs bh is ih -a fs
group : groupname
bs : block soft limit
bh : block hard limit
is : inode soft limit
ih : inode hard limit
fs : filesystem
7. test….test……[aku pilih group]
7a. setquota
misal ada group ws_matras dihatah 250 MB dalam server, maka setquota dapat di set sebagai berikut:
[root@wksvr ~]# setquota -g ws_matras 250000 250000 1000 1000 -a /u02/matras
nilai soft/hard block 250000
soft/hard inode 1000 [asumsi rata-rata 1 file berukuran 250 KB = 1000]
7b. Aktifkan quota
[root@wksvr ~]# quotaon -guva
/dev/hdb1 [/u02]: group quotas turned on
/dev/hdb1 [/u02]: user quotas turned on
7c. Cek quota group
[root@wksvr ~]# quota -g ws_matras
Disk quotas for group ws_matras (gid 1122):
Filesystem blocks quota limit grace files quota limit grace
/dev/hdb1 4 250000 250000 1 1000 1000
7d. report quota
7d.i. report quota setelah ditambahi file menjadi 29692
[root@wksvr ~]# repquota -a
*** Report for user quotas on device /dev/hdb1
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
———————————————————————-
root — 202792 0 0 4 0 0
SUJO — 8 0 0 2 0 0
#3679 — 29692 0 0 2 0 0
7d.ii. report quota setelah ditambahi file menjadi 189120
[root@wksvr ~]# repquota -a
*** Report for user quotas on device /dev/hdb1
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
———————————————————————-
root — 202792 0 0 4 0 0
SUJO — 8 0 0 2 0 0
#3679 — 189120 0 0 3 0 0
7d.iii. report quota setelah ditambahi file menjadi 189120
[root@wksvr ~]# repquota -a
*** Report for user quotas on device /dev/hdb1
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
———————————————————————-
root — 202792 0 0 4 0 0
SUJO — 8 0 0 2 0 0
#3679 — 189120 0 0 3 0 0
7d.iv. saat ditambahi lebih dari 250MB, lewat samba – akses windows
muncul “error There is not enough free disk space”
8. edit quota [250 MB --> 25GB]
[root@wksvr u02]# edquota -g ws_matras
Disk quotas for group ws_matras (gid 1122):
Filesystem blocks soft hard inodes soft hard
/dev/hdb1 4 25000000 25000000 1 100000 100000
Oracle dan “DBA” Maret 14, 2009
Posted by setijoagus in oracle.Tags: oracle dba
2 comments
Oracle dan “DBA”
=====================================================================
seorang teman meminta konsultasi :
=====================================================================
mengapa oracle kok nggak bisa di-startup ?
Kemarin kata teman saya, space harddisk penuh, terus katanya “log file boleh dihapus”
lha sekarang kok nggak bisa di-up ?
sebenarnya mengatasi hal ini, seharusnya simpel, apalagi kalau didukung dengan backup oracle yang benar baik lewat RMAN, EXP dmp, Cold backup tapi karena si “DBA”, nggak dipersenjatai pengetahuan cukup, maka hal hal diatas tidak / belum disiapkan.
Saat datang di terminal servernya, ternyata redolog-nya kehapus, mungkin si “DBA” sangat nafsu “menghapus” log, sampai – sampai redolog juga dihapus [khan akhirannya .log, he.....he........he........]
BTW
saran saya kalau ingin jadi “DBA” [he....he....saya juga masih belajar]
1. minimal baca struktur file – file di Oracle
2. salah satu fungsi “DBA” paling banyak adalah :
backup………..backup………….backup………….
3. cari tahu [buku, inet, majalah, blog]
Virus dan Oracle windows Maret 14, 2009
Posted by setijoagus in oracle.Tags: oracle wndows, virus
1 comment so far
Virus dan Oracle windows
=====================================================================
seorang teman meminta konsultasi :
=====================================================================
mengapa oracle kok nggak bisa di-startup ?
waduh ternyata kalau dijalankan lewat manual juga nggak bisa
kayaknya ada virus nich komputernya, sebab salah satu cirinya komputer booting-nya
lambat sekali, lho kok tiba – tiba reboot sendiri
nach, dari kasus ini mengapa kok harus install Oracle di windows ?
bisa 1000 alasan yang mungkin bisa dipakai, seperti misalnya :
1. gampang installnya, tinggal next,next,……………..
2. program antar muka [vb, delphi] bisa 1 tempat
3. dll
………..
………..
1000. dll
tapi kalo kena virus ? + apalagi nggak ada backupnya Hot & Cold [karena blm sempat]
jadi masalah besar lho ?. Untung masih dapat diatasi.
supaya nggak terulang saran saya :
1. pakailah linux spy nggak kena virus [he....he....], atau
2. pisahkan server database dengan program antar mukanya [vb, delphi]
3. sebisa mungkin batasi, untuk memasukan data- data nggak jelas
[colok flash disk, browsing, share file,..........]