Sunday, October 12, 2008

Passed Novell CLP10

After making my mind to go for the certification, i finally passed the cert. It is not that too hard but, the remote connection is slow and lame. What make worse of it is the timer is keep on triggering, making the feeling of panics and nervous.


Wednesday, October 8, 2008

Backup Files

TAR
We have two different backup, full backup and incremental backup.

Let's pick our backup folder as /srv/www/htdocs.

To do a full backup, you need to prompt this command

cd /srv/www
tar cvz -g /tmp/backup/snapshot_htdocs -f /tmp/backup/htdocs_full.tar.gz htdocs

To do a incremental backup.

tar cvz -g /tmp/backup/snapshot_htdocs -f /tmp/backup/htdocs_incremental.tar.gz htdocs

RSYNC
Rsync backup is much more better than tar. Both incremental and full backup can use the same command to execute. Rsync will pick the changes on backup target without capturing the file snapshot.

rsync -ave ssh root@ip_addr_to_be_backup:/home/users /tmp/backup_dir

Monday, October 6, 2008

syslog

The configuration of syslog-ng is distributed across three files

  • /etc/sysconfig/syslog
  • /etc/syslog-ng/syslog-ng.conf.in
  • /etc/syslog-ng/syslog-ng.conf



/etc/sysconfig/syslog contains general parameters applicable to syslog-ng.

/etc/syslog-ng/syslog-ng.conf.in is the template used to create the configuration file /etc/syslog-ng/syslog-ng.conf, which is the configuration file actually used by syslog-ng. both files have the same syntax.

syslogd and syslog-ng share two concepts that you have to understand to the able to configure either one:

  • facilities
  • priorities

Sunday, October 5, 2008

Creating a virtual interface on opensuse11

  • a normal network interface can be queried via the command ifconfig
opensuse01:~ # ifconfig
eth2 Link encap:Ethernet HWaddr 00:0C:29:4F:74:C5
inet addr:192.168.80.134 Bcast:192.168.80.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe4f:74c5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:346 errors:0 dropped:0 overruns:0 frame:0
TX packets:781 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:44214 (43.1 Kb) TX bytes:109649 (107.0 Kb)
Interrupt:18 Base address:0x2024
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:326 errors:0 dropped:0 overruns:0 frame:0
TX packets:326 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:45674 (44.6 Kb) TX bytes:45674 (44.6 Kb)
============================================
  • To add the virtual interface.
ip addr add 192.168.80.135/24 brd + dev eth2 label eth2:1
  • ifconfig again to the command prompt will display this
eth2:1 Link encap:Ethernet HWaddr 00:0C:29:4F:74:C5
inet addr:192.168.80.135 Bcast:192.168.80.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:18 Base address:0x2024
============================================
  • Please do a ping to the new virtual interface.
opensuse01:~ # ping 192.168.80.135
PING 192.168.80.135 (192.168.80.135) 56(84) bytes of data.
64 bytes from 192.168.80.135: icmp_seq=1 ttl=64 time=0.034 ms
64 bytes from 192.168.80.135: icmp_seq=2 ttl=64 time=0.039 ms
64 bytes from 192.168.80.135: icmp_seq=3 ttl=64 time=0.049 ms
64 bytes from 192.168.80.135: icmp_seq=4 ttl=64 time=0.049 ms