11/21/2011

Update zone using nsupdate

Run nsupdate:
# nsupdate
> server localhost
> key dhcpupdate N8Hk2RUFO84bEVl3uGTD2A==
> zone mobile.linux
> update add ds.mobile.linux. 600 IN A 10.125.1.4
> send
> zone 1.125.10.in-addr.arpa
> update add 4.1.125.10.in-addr.arpa 600 IN PTR ds.mobile.linux.
> send
> quit

it will generate journal file (.jnl)

Configure Bind & DHCP (DDNS)

My named.conf:
include "/etc/rndc.key";
acl mynet { 10.125.1.0/24;
127.0.0.1;
};
options {
directory "/var/named";
forwarders {
8.8.8.8;
8.8.4.4;
};
allow-query { mynet; };
listen-on { 10.125.1.1; };
};
zone "." IN {
type hint;
file "caching-example/named.root";
};
zone "localhost" IN {
type master;
file "caching-example/localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "caching-example/named.local";
allow-update { none; };
};
zone "mobile.linux" IN {
type master;
file "mobile.linux.db";
allow-update { key rndc-key; };
allow-query { mynet; };
allow-transfer { mynet; };
};
zone "1.125.10.in-addr.arpa" IN {
type master;
file "mobile.linux.rev";
allow-update { key rndc-key; };
allow-query { mynet; };
allow-transfer { mynet; };
};

My mobile.linux.db:
$ORIGIN .
$TTL 86400 ; 1 day
mobile.linux IN SOA mobile.linux. root.mobile.linux. (
48 ; serial
10800 ; refresh (3 hours)
900 ; retry (15 minutes)
604800 ; expire (1 week)
86400 ; minimum (1 day)
)
NS mobile.linux.
A 10.125.1.1

My mobile.linux.rev:
$ORIGIN .
$TTL 86400 ; 1 day
1.125.10.in-addr.arpa IN SOA mobile.linux. root.mobile.linux. (
2011032506 ; serial
28800 ; refresh (8 hours)
14400 ; retry (4 hours)
3600000 ; expire (5 weeks 6 days 16 hours)
86400 ; minimum (1 day)
)
NS mobile.linux.

My dhcpd.conf:
include "/etc/rndc.key";
zone mobile.linux {
primary 10.125.1.1;
key rndc-key;
}
zone 1.125.10.in-addr.arpa. {
primary 10.125.1.1;
key rndc-key;
}
max-lease-time 86400;
default-lease-time 172800;
ddns-updates on;
ddns-update-style interim;
subnet 10.125.1.0 netmask 255.255.255.0 {
range 10.125.1.2 10.125.1.10;
option routers 10.125.1.1;
option domain-name-servers 10.125.1.1;
ddns-domainname = "mobile.linux";
}

Tested on Slackware

11/20/2011

Install MySQL on Slackware

1. Run mysql_install_db

2. CHOWN datadir MySQL, biasanya di /var/lib/mysql
chown -R mysql:mysql /var/lib/mysql

3. Comment --SKIP-NETWORKING pada startup script, jika ingin diakses dari host lain

How to reset password MySQL

Langkahnya :

1. Matikan service MYSQL
# service mysqld stop

2. Jalankan service MYSQL dalam safe mode
# mysqld_safe –skip-grant-tables

3. Login sebagai root
#mysql -u root

4. Update password root
mysql> use mysql;
mysql> UPDATE user SET Password = PASSWORD (‘isi_password_baru’) WHERE User=’root’;
mysql> FLUSH PRIVILEGES;
mysql> quit;

5. Restart service MYSQL

10/21/2011

XEN: add loop device

Error: Device 2049 (vbd) could not be connected. Failed to find an unused loop device

when you see that while "xm create ...", then

run: (ex. 128)
echo 'options loop max_loop=128' > /etc/modprobe.d/loop-device.conf

add this to rc.local:

for i in $(seq 8 128) ;
do /usr/bin/mknod -m660 /dev/loop$i b 7 $i ;
done

THAT will solved the problem

10/10/2011

Installing Oracle 11g Release 2 64bit On Slackware 13.37 64bit



sumber:
http://martinusadyh.web.id/2010/12/08/step-by-step-installing-oracle-11g-release-2-on-slackware-13-0/

Based on blog nya Kang Martinus Ady H tersebut di atas, saya coba2 mainkan di Slackware13.37 64bit. Berikut ini adalah troubleshoot di mesin saya selama instalasi Oracle. Silakan menyimak.

1. Pada tahap konfigurasi kernel parameter, saya isi file sysctl.conf dengan:
kernel.sem = 250 32000 100 128
kernel.shmmax = 536870912
fs.aio-max-nr = 1048576
fs.file-max = 6815744 ###tambahan
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576

2. Saya buat bash_profile dan isinya:
ORACLE_BASE=/opt/oracle11gr2
ORACLE_SID=devel
ORACLE_HOME=/opt/oracle11gr2/product/11.2.0/dbhome_1
ORACLE_UNQNAME=orcl ###tambahan
ORACLE_HOSTNAME=localhost ###tambahan (saya lupa belum set hostname sebelum proses instalasi Oracle)
export ORACLE_BASE ORACLE_SID ORACLE_HOME ORACLE_UNQNAME ORACLE_HOSTNAME
export PATH=${PATH}:$ORACLE_HOME/bin

3. Ubah swap space jadi 4GB, dan Run-level 3 atau 5 (with X, di Slackware adalah 4). Setelah instalasi, run-level bisa dikembalikan ke 4.

4. Saat instalasi, ada pengecekan hard limit file descriptor. Untuk itu saya cukup buat file (tidak perlu install pam):
- /etc/security/limits.conf, isinya:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
- /etc/pam.d/login, isinya:
session required /lib/security/pam_limits.so
session required pam_limits.so

5. Saat copying database, oracle akan mencari /lib64/libgcc_s.so.1 sehingga saya buat link:
root# cd /lib64
root# ln -s /usr/lib64/libgcc_s.so.1
lalu jalankan lagi "/opt/oracle11gr2/product/11.2.0/dbhome_1/bin/genorasdksh -base" ketika proses copying masih berlangsung

6. Pastikan service HTTP jalan, agar service Enterprise Manager bisa UP

7. Buat script Up & Down database:
- /etc/rc.d/rc.orastart
#!/bin/sh
/opt/oracle11gr2/product/11.2.0/dbhome_1/bin/lsnrctl start
/opt/oracle11gr2/product/11.2.0/dbhome_1/bin/dbstart $ORACLE_HOME
/opt/oracle11gr2/product/11.2.0/dbhome_1/bin/emctl start dbconsole
- /etc/rc.d/rc.orastop
#!/bin/sh
/opt/oracle11gr2/product/11.2.0/dbhome_1/bin/emctl stop dbconsole
/opt/oracle11gr2/product/11.2.0/dbhome_1/bin/dbshut $ORACLE_HOME
/opt/oracle11gr2/product/11.2.0/dbhome_1/bin/lsnrctl stop

8/04/2011

Beda roaming profiles vs local profiles

Roaming Profiles

Pros:

Automatically backs up user data to the server whenever they log out, so that the user doesn’t have to remember to do so.

Allows users to log into multiple computers. This works great in an environment where people don’t have designated desks, such as an open lab.

Cons:

Security issues. After the user has logged on, a copy of their profile is left on the hard drive. If the computer were to be stolen, this data could easily be compromised.

Slow login times. If a user puts too much data in their profile, it could take a very long time to transfer all that data whenever they log on or off. This could lead to profile corruption.

Bandwidth consumption. Large user profiles take a lot of network bandwidth to transfer data back and forth. Much of this is amounts to wasted bandwidth since many of the files and data transferred are not accessed every time the user logs on.

Maintenance issues. I regularly have to clean old profiles off some computers because those profiles left behind fill the hard drive so much that they prevent other people from logging in. It’s also a fairly regularly problem to have to rebuild user profiles after data has been corrupted during transfer.

Local Profiles

Pros:

Allows for much faster login times because the user’s data is all stored locally.

Cuts down on bandwidth consumption because less data is transferred during login and logoff.

Great for people who have a designated desk where they use the same computer every time.

Cons:

If the user gets on a different PC, they may not be able to access their local data unless they stored some of it on a separate folder on a server.

Security issues. Having all the data stored locally presents a security problem if that PC is stolen.

Potential for data loss. I distinctly remember several people losing important customer data after their computers were destroyed by Hurricane Katrina. These users had been storing data on their hard drives and had no backup copies. When their PC was literally submerged by flood waters, their data washed away with the rest of the machine.

Conclusion

There are as many reasons to use roaming profiles as there are to use local profiles. There are equally as many reasons not to use one over the other. Personally, I think the best solution for a network environment is to provide network server locations for all data storage, then it won’t so much matter if the users are on roaming or local profiles.

The important thing is that users should only be allowed to store a very minimal amount of data in their profile, because it is safer and more secure to keep their data on the server. That way, it doesn’t matter what computer they log into because they can still access their data, and they won’t have to wait for it to download to their machine.

Furthermore, it may help to ‘lock down’ the PC so that the user will be severely limited as to where they store their data. One major problem with roaming profiles is that users tend to dump a lot of data on their Desktop, and this data gets transferred every time they log into a different machine. Users simply should not put any files on the hard drive, and it may require some training in regard to file locations to make sure they don’t do this. Often times, issues with data loss or security breaches come about simply because the user didn’t know what they were doing.

Read more: http://www.brighthub.com/computing/smb-security/articles/9325.aspx

7/27/2011

Install Pacemaker on slack64 DomU

...lanjutan setelah DomU

Booting DomU nya dan lakukan langkah berikut berurutan:
1. Buat group dan user:
groupadd -g 226 haclient
useradd -g 226 -u 226 -s /bin/false -d /var/lib/heartbeat/cores/hacluster hacluster
2. Install libnet dan libesmtp (needed by clusterglue)
3. Install cluster glue (needed by cluster resource agent)
4. Install cluster resource agent (needed by corosync)
5. Install corosync (needed by pacemaker)
6. Install pacemaker
7. Edit fstab:
tmpfs /dev/shm tmpfs defaults 0 0

Konfigurasi /etc/corosync/corosync.conf:
1. Copy corosync.conf.new ke corosync.conf
2. Edit bindnetaddr sesuai IP Anda
3. Tambahkan baris berikut:
aisexec {
user: root
group: root
}
service {
name: pacemaker
ver: 0
}

Reboot dan jalankan service corosync-nya...
Jalankan 'ps axf', jika ada baris berikut dan statusnya S:
corosync
\_ /usr/lib64/heartbeat/stonithd
\_ /usr/lib64/heartbeat/cib
\_ /usr/lib64/heartbeat/lrmd
\_ /usr/lib64/heartbeat/attrd
\_ /usr/lib64/heartbeat/pengine
\_ /usr/lib64/heartbeat/crmd

Service corosync sudah OK...

7/22/2011

Slackware64 as DomU

Based on http://wiki.xensource.com/xenwiki/SlackwareDomU

1. Download slackware system builder for UML from: http://www.inreto.de/mkuml/mkuml-2004.07.17-ananas.tar.bz2
2. Ekstrak dan buat direktori slackware-current di dalamnya.
3. Siapkan ISO Slackware64 lalu mount ke 'slackware-current' tadi atau copy isi keseluruhan DVD ke direktori tersebut.
mount -o loop SlackDVD.iso slackware current
4. Edit file mkuml.sh, sesuaikan nama direktori dengan slackware64.
5. Bila image yg telah create nantinya bisa di-resize, edit baris berikut:
mke2fs -F -j root_fs menjadi mke2fs -F -j -O ^resize_inode root_fs
6. Now, run mkuml.sh; ex: ./mkuml.sh slack64
7. Setelah image jadi, mount image tersebut lalu edit file inittab dan fstab:
file inittab: comment tty0 dan uncomment tty1
file fstab: perhatikan nama device dan tambahkan swap device jika diperlukan
Copy-kan /lib/modules/2.6.38.2 dari dom0 ke /lib/modules nya domU
jangan lupa umount...
8. Buat config utk domU dan simpan di /etc/xen/auto. Ex config slack64:
    kernel = "/boot/vmlinuz-huge-2.6.38.2-xen" builder='linux'
    memory = 64
    name = "agus"
    vif = [ '' ]
    disk = [ 'file:/var/lib/xend/domains/agus.fs,ioemu:sda1,w','file:/var/lib/xend/domains/agus.swap,ioemu:sda2,w' ]
    root = "/dev/sda1 ro"
    extra = "xencons=tty"
9. Run xm create -c slack64

Dom0, Slackware64 13.37 and Xen 4.1.1

Based on http://notes.benv.junerules.com/all/software/new-server-slackware64-and-xen-3-4/

Saya coba aplikasikan di Slackware64 13.37 dengan XEN terbaru (4.1.1) dan Xen patch terbaru+stabil, versi kernel 2.6.38.2

1. Change lilo with grub2(1.99) karena akan multiboot. Sebelum remove paket lilo, install dulu paket grub2 nya.
2. Setelah grub2 terinstall, jalankan grub-install [device]; contoh: grub-install /dev/sda
3. Jika muncul Installation finished. No error reported. lanjutkan ke grub-mkconfig; contoh: grub-mkconfig > /boot/grub/grub.cfg
4. Jika muncul:
    Generating grub.cfg ...
    Found linux image: /boot/vmlinuz-huge-2.6.37.6
    Found linux image: /boot/vmlinuz-generic-2.6.37.6
    done
Baru kemudian remove paket lilo nya. then reboot...
5. Now, download xen-4.1.1.tar.gz dan ekstrak.
6. Compile, jalankan make xen dan make install-xen. Dibutuhkan koneksi internet.
It will creates xen image in your /boot
7. Still in xen-4.1.1 directory, jalankan make tools dan make install-tools. Dibutuhkan acpica.
It will creates 'xm' command and /etc/xen
8. Lalu compile kernel yg sudah di-patch w/ xen, baca Posting saya sebelumnya.
Run make, make modules_install and make install. It will create and copy System.map+vmlinuz into /boot dan kernel modules into /lib/modules
9. Buat initrd di direktori /boot; contoh: mkinitrd -c -k 2.6.38.2 -m ext2 -f ext2 -R -r /dev/sda
10. Run grub-mkconfig again to generate xen image. Lalu edit beberapa baris.
Ini example grub.cfg saya:
    menuentry 'Slackware-13.37.0 GNU/Linux, with Linux 2.6.38.2-xen' --class slackware-13.37.0 --class gnu-linux --class gnu --class os {
    load_video
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set=root ddd12055-3d37-454a-aa53-be58555fa2f8
    echo 'Loading Linux 2.6.38.2-xen ...'
    multiboot /boot/xen-4.1.1.gz dom0_mem=1024M
    module /boot/vmlinuz-huge-2.6.38.2-xen root=/dev/sda1 ro
    module /boot/initrd.gz
    }
Reboot...
11. Booting using new xen-kernel. Jalankan service xen, pertama /etc/init.d/xencommons start, lalu /usr/sbin/xend start
12. Run 'xm list' jika berhasil keluar:
Name ID Mem VCPUs State Time(s)
Domain-0 0 1024 4 r----- 88.1


ps:
My /boot is ext2
have a nice try...

7/20/2011

Refreshing netbios name

1. Remove wins.dat di /var/cache/samba/wins.dat (slackware)
2. Restart nmbd:
    # killall nmbd
    # nmbd
3. Restart smb & nmb di BDC (kalau ada)

NFS (Network File Server) on Slackware

On server
1. Edit file /etc/exports, tambahkan direktori yang akan di-share
/home/dody/Pic 192.168.3.0/24(rw,no_root_squash,subtree_check,sync)
ket:
- 192.168.3.0/24 = network that allowed
- rw = can be read+write
- no_root_squash = permit client to connect as root
- subtree_check = checking every file requested to make sure that it is in exported directory
- sync = performance, prevent data lost

2. Jalankan file /etc/rc.d/rc.nfsd

On client
Mount NFS
mount -t nfs 192.168.3.33:/home/dody/Pic /mnt/nfs -o rw


Da’i dengan Da ai

Kita sering mendengar istilah da’i dalam dunia dakwah. Apa sesungguhnya makna kata da’i itu?
Dalam arti sempit da’i identik dengan Mubaligh, tetapi sebenarnya arti luasnya adalah sosok yang tekun mengkaji dam menyebarkan nilai-nilai normatif Islam menjadi konsep-konsep yang secara teknis mudah dijalankan dalam masyarakat (Operasional). Termasuk juga dalam pengertian da’i, mereka para pekerja sosial, para penggerak masyarakat, para penyantun fakir miskin dan anak yatim, para pendidik, para penulis, dan siapapun yang kegiatannya itu dalam rangka menterjemahkan Islam sebagai rahmatan lil alamin.
Ternyata dalam bahasa Cina ada kata ‘Da Ai’, apakah memiliki kesamaan arti dengan kata da’i?
Sebenarnya penulis teringat dengan salah satu TV swasta yang bernama DAAITV (www.daaitv.co.id). Dan setelah browsing di DAAITV, penulis mendapatkan arti kata Daai, yaitu cinta kasih universal.
Renungkan…!
Salam perdamaian dan toleransi

Automount USB / CDROM on Slackware

User kita harus join ke beberapa group ini dulu biar bisa automount USB/CDROM, dll:
    plugdev
    power
    cdrom
    audio
    video
    netdev
--

Enable right click on a web page

Bila menemui web page yang fungsi right-click nya di-disable, bisa coba script di bawah:
    javascript:void(document.oncontextmenu=null)
copy dan replace URL yang ada di address bar browser Anda, lalu enter.

selamat mencoba

Cek RAM di linux

Ketik di console dan run:
    dmidecode --type 17
output nya seperti di bawah ini:
    Handle 0x0044, DMI type 17, 28 bytes
    Memory Device
    Array Handle: 0x0041
    Error Information Handle: Not Provided
    Total Width: 64 bits
    Data Width: 64 bits
    Size: 2048 MB (nah lho ketahuan>
    Form Factor: SODIMM (nah lho ketahuan>
    Set: None
    Locator: DIMM2
    Bank Locator: BANK 2 (nah lho ketahuan>
    Type: DDR3 (nah lho ketahuan>
    Type Detail: Synchronous
    Speed: 1067 MHz (nah lho ketahuan>
    Manufacturer: 02FE
    Serial Number: 080D35DC
    Asset Tag: Unknown
    Part Number: EBJ21UE8BDS0-DJ-F
    Rank: Unknown

7/19/2011

Backup using Bacula (2)

Install bacula dengan slackbuild. Yang mesti kita download:
    1. Bacula source
    2. Slackbuild untuk server
    3. Slackbuild untuk client
Lalu, build dan install package bacula tersebut.

Konfigurasi:
1. /etc/bacula/bacula-dir.conf (perhatikan kata yg dicetak tebal)
Director {
Name = slackbox-dir
Password = "pass-director"
...
}
Client {
Name = slackbox-fd
Address = darkstar
Password = "pass-fd"
...
}
Storage {
Address = darkstar
Password = "pass-sd"
...
}
Catalog {
dbname = "bacula"; dbuser = "bacula"; dbpassword ="db-passwd"
...
}
Console {
Name = slackbox-mon
Password = "pass-mon"
CommandACL = status, .status
}

2. /etc/bacula/bacula-sd.conf (perhatikan kata yg dicetak tebal)
Storage {
Name = slackbox-sd
...
}
Director {
Name = slackbox-dir
Password = "pass-sd"
}
Director {
Name = slackbox-mon
Password = "pass-director"
Monitor = yes
}

3. /etc/bacula/bacula-fd.conf (perhatikan kata yg dicetak tebal)
Director {
Name = slackbox-dir
Password = "pass-fd"
}
Director {
Name = slackbox-mon
Password = "pass-mon"
Monitor = yes
}

4. /etc/bacula/bconsole.conf (perhatikan kata yg dicetak tebal)
Director {
Name = slackbox-dir
DIRport = 9101
address = darkstar
Password = "pass-director"
}

Coba jalankan service bacula:
/etc/rc.d/rc.bacula start

Test dengan:
bconsole

jika berhasil akan muncul:
Connecting to Director darkstar:9101
1000 OK: slackbox-dir Version: 5.0.3 (04 August 2010)
Enter a period to cancel a command.
*

Untuk manajemennya, saya menggunakan webmin

Backup using Bacula

Xen kernel 2.6.38.2 configuration (Dom0)

Enabling Xen Compatible:
- Processor type and features --->
  [*] Xen Compatible

Domain-0 kernel config:
- Bus options (PCI etc.) ---> [*] PCI support
- Bus options (PCI etc.) --->
  [*] Xen PCI Frontend Debugging (optional)
- Networking Support ---> Networking options --->
  <m> 802.1d Ethernet Bridging (for bridging)
- Device Drivers --->
  XEN ---> [*] Privileged Guest (domain 0)
  <*> Backend driver support
  <*> Block-device backend driver
  <*> Network-device backend driver
  <*> PCI-device backend driver
  PCI Backend Mode (Virtual PCI) --->
  [*] Disable serial port drivers
  Xen version compatibility (3.0.4 and later) --->
  XEN driver support --->
    [*] Scrub memory before freeing it to Xen

Kernel 2.6.38 w/ Xen patch

Download xen-patches terbaru (2.6.38.2) dari http://code.google.com/p/gentoo-xen-kernel/downloads/list
Download kernel yang sama juga, misal di mirror kambing.ui.ac.id

Buat dan masuk ke direktori xen-patches, lalu ekstrak xen-patches tadi.
    mkdir xen-patches cd xen-patches tar jxvf ../xen-patches-2.6.38-2.tar.bz2

Ekstrak kernel 2.6.38.2 yg sudah di-download dan masuk ke direktori hasil ekstrak.
    tar jxvf linux-2.6.38.2.tar.bz2 cd linux-2.6.38.2

Ketik di konsole:
root# for k in ../xen-patches/* ; do echo Patch $k: ; patch -p1 < $k ; done

good luck

Bismillahi rahmani rahim

QS An Naml 30
إِنَّهُ مِنْ سُلَيْمَانَ وَإِنَّهُ بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيمِ

"Sesungguhnya surat itu, dari Sulaiman dan sesungguhnya (isi) nya: “Dengan menyebut nama Allah Yang Maha Pemurah lagi Maha Penyayang.”

Hadits Rasul SAW:

Kullu Amrin Dzi Balin La Yubtada'u Bibismillahir Rohmanirrohim Fahuwa Aqtho'

"Setiap perbuan baik yang tidak dimulai dengan Bismillahir rohmanirrohim maka pahalanya terputus."