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