Tuesday, December 20, 2011

Renaming Default ethx to ethy

Create /etc/mactab (if not exist) and edit it
# touch /etc/mactab
# mcedit /etc/mactab
/etc/mactab For 3 cards
# You can rename your ethx with another name, example : nic01, etc.
eth0 00:23:B7:89:39:E2
eth1 00:08:A3:20:F8:29
eth2 00:50:BA:29:B7:32

Wednesday, December 14, 2011

Logical Volume Group (LVM)

Aptitude install lvm2
To running Lvm on ubuntu, we must have lvm2, if you don't have, then install it
# aptitude install lvm2

Initializing disks or disk partitions
Before you can use a disk or disk partition as a physical volume you will have to initialize it:
# pvcreate /dev/sda3
Physical volume "/dev/sda3" successfully created
Now create a volume group descriptor at the start of the /dev/sda3 partition.
# pvcreate /dev/sda3 /dev/sda4
Physical volume "/dev/sda3" successfully created Physical volume "/dev/sda4" successfully created
Above command line is using when we want creating pvdisk from 2 partitions at once

Setup a Volume Group
# vgcreate vgm-disk /dev/sda3
Volume group "vgm-disk" successfully created
Or if you want creating volume group from more than one partitions, you can using command bellow
# vgcreate vgm-disk /dev/sda3 /dev/sda4
Volume group "vgm-disk" successfully created

Run vgscan and vgdisplay to verify volume group
# vgscan
Reading all physical volumes. This may take a while... Found volume group "vgm-disk" using metadata type lvm2
# vgdisplay
--- Volume group --- VG Name vgm-disk System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 1 VG Access read/write VG Status resizable MAX LV 0 Cur LV 0 Open LV 0 Max PV 0 Cur PV 1 Act PV 1 VG Size 110.86 GiB PE Size 4.00 MiB Total PE 28381 Alloc PE / Size 0 / 0 Free PE / Size 28381 / 110.86 GiB VG UUID A9fOwN-y7Xm-cFDE-ruFK-1xl1-kbRI-fp9IdN

The most important things to verify are that the first three items are correct and that the VG Size item is the proper size for the amount of space in all four of your disks.

Creating the Logical Volume
# lvcreate -n lvm-disk -l 28381 vgm-disk
Logical volume "lvm-disk" created -n is name of logical volume -l is PE (pyshical extend) 28381 size on volume group (vgm-disk), in this situation, I want it to use all partition.

Create the File System
# mkfs.ext3 /dev/vgm-disk/lvm-disk
mke2fs 1.41.11 (14-Mar-2010) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 7266304 inodes, 29062144 blocks 1453107 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=0 887 block groups 32768 blocks per group, 32768 fragments per group 8192 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872 Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 33 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override.

Test the File System
Mount the file system on the logical volume
# mount /dev/vgm-disk/lvm-disk /mnt/lvm 
Now check it, If everything worked properly, you should now have a logical volume mounted at /mnt/lvm
# df -ah
Filesystem Size Used Avail Use% Mounted on /dev/sda1 37G 1.5G 34G 5% / proc 0 0 0 - /proc none 0 0 0 - /sys none 0 0 0 - /sys/fs/fuse/connections none 0 0 0 - /sys/kernel/debug none 0 0 0 - /sys/kernel/security none 1002M 208K 1002M 1% /dev none 0 0 0 - /dev/pts none 1006M 0 1006M 0% /dev/shm none 1006M 288K 1006M 1% /var/run none 1006M 0 1006M 0% /var/lock none 1006M 0 1006M 0% /lib/init/rw /dev/sdc1 147G 117G 23G 84% /mnt/sdc1 /dev/mapper/vgm--disk-lvm--disk 110G 188M 104G 1% /mnt/lvm
Adding a new disk
Current situation
# pvdisplay
--- Physical volume --- PV Name /dev/sda3 VG Name vgm-disk PV Size 110.86 GiB / not usable 352.50 KiB Allocatable yes (but full) PE Size 4.00 MiB Total PE 28381 Free PE 0 Allocated PE 28381 PV UUID mYSSjb-a50Y-GOcP-m30k-1BHL-430G-fFUzAb
# lvdisplay
--- Logical volume --- LV Name /dev/vgm-disk/lvm-disk VG Name vgm-disk LV UUID P5KCpv-2fBq-UKk5-TObN-ZySO-MMW0-ALmpmQ LV Write Access read/write LV Status available # open 0 LV Size 110.86 GiB Current LE 28381 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 251:0
# pvscan
PV /dev/sda3 VG vgm-disk lvm2 [110.86 GiB / 0 free] Total: 1 [110.86 GiB] / in use: 1 [110.86 GiB] / in no VG: 0 [0 ]

Adding new pyshical volume /dev/sdb1.
# pvcreate /dev/sdb1
Physical volume "/dev/sdb1" successfully created PV /dev/sda3 VG vgm-disk lvm2 [110.86 GiB / 0 free] PV /dev/sdb1 lvm2 [931.51 GiB] Total: 2 [1.02 TiB] / in use: 1 [110.86 GiB] / in no VG: 1 [931.51 GiB]
# pvdisplay
--- Physical volume --- PV Name /dev/sda3 VG Name vgm-disk PV Size 110.86 GiB / not usable 352.50 KiB Allocatable yes (but full) PE Size 4.00 MiB Total PE 28381 Free PE 0 Allocated PE 28381 PV UUID mYSSjb-a50Y-GOcP-m30k-1BHL-430G-fFUzAb "/dev/sdb1" is a new physical volume of "931.51 GiB" --- NEW Physical volume --- PV Name /dev/sdb1 VG Name PV Size 931.51 GiB Allocatable NO PE Size 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID W570RU-hvnL-Ipdm-Jo1P-vN2n-TjRJ-GPTCOm

Add the new disks to the volume groups
# vgextend vgm-disk /dev/sdb1
Volume group "vgm-disk" successfully extended

Checking
# vgdisplay
--- Volume group --- VG Name vgm-disk System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 5 VG Access read/write VG Status resizable MAX LV 0 Cur LV 1 Open LV 1 Max PV 0 Cur PV 2 Act PV 2 VG Size 1.02 TiB PE Size 4.00 MiB Total PE 266847 Alloc PE / Size 28381 / 110.86 GiB Free PE / Size 238466 / 931.51 GiB VG UUID A9fOwN-y7Xm-cFDE-ruFK-1xl1-kbRI-fp9IdN

Extend volume groups
# lvextend -l +238466 /dev/vgm-disk/lvm-disk
Extending logical volume lvm-disk to 931.51 GiB Logical volume lvm-disk successfully resized
# vgdisplay
--- Volume group --- VG Name vgm-disk System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 7 VG Access read/write VG Status resizable MAX LV 0 Cur LV 1 Open LV 0 Max PV 0 Cur PV 2 Act PV 2 VG Size 1.02 TiB PE Size 4.00 MiB Total PE 266847 Alloc PE / Size 266847 / 1.02 TiB Free PE / Size 0 / 0 VG UUID A9fOwN-y7Xm-cFDE-ruFK-1xl1-kbRI-fp9IdN

Increase the file system size After you have extended the logical volume it is necessary to increase the file system size to match. how you do this depends on the file system you are using.

Before resizing files ystem sizes.
# df -ah
Filesystem Size Used Avail Use% Mounted on /dev/sda1 37G 1.5G 34G 5% / proc 0 0 0 - /proc none 0 0 0 - /sys none 0 0 0 - /sys/fs/fuse/connections none 0 0 0 - /sys/kernel/debug none 0 0 0 - /sys/kernel/security none 1002M 208K 1002M 1% /dev none 0 0 0 - /dev/pts none 1006M 0 1006M 0% /dev/shm none 1006M 288K 1006M 1% /var/run none 1006M 0 1006M 0% /var/lock none 1006M 0 1006M 0% /lib/init/rw /dev/sdc1 147G 117G 23G 84% /mnt/sdc1 /dev/mapper/vgm--disk-lvm--disk 110G 188M 104G 1% /mnt/lvm
# e2fsck -f /dev/vgm-disk/lvm-disk
e2fsck 1.41.11 (14-Mar-2010) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information /dev/vgm-disk/lvm-disk: 11/7266304 files (0.0% non-contiguous), 504100/29062144 blocks
# resize2fs /dev/vgm-disk/lvm-disk
resize2fs 1.41.11 (14-Mar-2010) Resizing the filesystem on /dev/vgm-disk/lvm-disk to 273251328 (4k) blocks. The filesystem on /dev/vgm-disk/lvm-disk is now 273251328 blocks long
# mount /dev/vgm-disk/lvm-disk /mnt/lvm/
# df -ah
Filesystem Size Used Avail Use% Mounted on /dev/sda1 37G 1.5G 34G 5% / proc 0 0 0 - /proc none 0 0 0 - /sys none 0 0 0 - /sys/fs/fuse/connections none 0 0 0 - /sys/kernel/debug none 0 0 0 - /sys/kernel/security none 1002M 208K 1002M 1% /dev none 0 0 0 - /dev/pts none 1006M 0 1006M 0% /dev/shm none 1006M 288K 1006M 1% /var/run none 1006M 0 1006M 0% /var/lock none 1006M 0 1006M 0% /lib/init/rw /dev/sdc1 147G 117G 23G 84% /mnt/sdc1 /dev/mapper/vgm--disk-lvm--disk 1.1T 200M 974G 1% /mnt/lvm
Editing /etc/fstab file to match new filesystem
# cat /etc/fstab

/dev/sda1 / ext3 defaults 0 1 /dev/sda2 swap swap defaults 0 0 /dev/vgm-disk/lvm-disk /mnt/lvm lvm noatime 0 2 /dev/sdb1 /mnt/sdb1 ext3 defaults 1 1 proc /proc proc nodev,noexec,nosuid 0 0

Done

Menonaktifkan Pop Up pada Avira Antivir

Avira Antivir memiliki salah satu tingkat deteksi terbaik dari semua antivirus, salah satu kelemahan utama adalah bahwa setelah update, akan ditampilkan sebuah iklan besar dilayar kita, bila anda merasa terganggu, maka inilah cara untuk menonaktifkannya.
1. Start --> Run.
2. Ketikkan gpedit.msc dan tekan Ok.
3. Arahkan ke User Configuration > Administrative Templates > System.
4. Double klik "Don't run specified Windows applications".

VirtuaWin - The Virtual Desktop Manager



VirtuaWin merupakan software open source yang diilhami oleh kemampuan Linux dalam menangani multiple desktop. Hal ini memungkinkan pengguna untuk mengatur aplikasi kedalam beberapa virtual desktop.
Fitur
1. Aplikasi ini berjalan di latar belakang, dan muncul di sistem tray.

Memperbaruhi Lisensi Avira Personal Edition Versi 10

Avira selalu memperbarui lisensinya setiap bulan april dan november, bagi yang melakukan autoupdate avira-nya, hal ini tidaklah menjadi suatu permasalahan, hal ini akan menjadi masalah apabila kita hanya melakukan update secara manual. Maka bila lisensi dari avira kita sudah kadaluarsa, update virus definisi juga tidak akan berhasil, satu-datunya cara kita harus melakukan update lisensi terlebih dahulu, baru setelah itu melakukan update definisi virus maupun virus engine-nya, berikut langkah-langkah untuk melakukan pembaharuan lisensi dari avira personal edition.


Ikuti langkah2 dibawah ini secara tepat :

Update Avira Personal Edition Versi 10 Secara Manual

Click here to enlarge

Untuk melakukan update secara manual untuk Avira Personal Edition adalah dgn cara :

Klik kanan pada ikon Avira di taskbar bawah kanan --> Start Antivir --> Update --> Manual Update --> pilih file vdf_fusebundle.zip yang sudah di download

Lokasi download virus definisi Avira terbaru ada disini
Lokasi download file installer Avira Personal Edition terbaru ada disini
Lokasi download file lisensi key Avira Personal Edition terbaru ada disini

MinimizeToTray revived (MinTrayR)

MinTrayR adalah pengganti untuk ekstention MinimizeToTray yang tidak lagi aktif dikembangkan. MinimizeToTray diklaim oleh pembuatnya tidak kompatibel dengan Firefox terbaru dan aplikasi Mozilla lainnya (tetapi dalam perakteknya MinimizeToTray revived (MinTrayR) 1.0 kompatible dengan Thunderbird 8.0).

Click to enlarge

Adding SSH keys to automate login

So we want the mybooks to autologin using a long keyfile. Later on we will remove the option to log in using a password for the SSH setup (basically hardening the SSH setup).

Start on Nebula.despro.lan. We need to repeat this procedure on Orion.despro.lan.


On Nebula.despro.lan

Let's move over to the special .ssh directory

root@nebula:~# cd ~
root@nebula:~# cd .ssh/
root@nebula:~/.ssh# ls -1
known_hosts
root@nebula:~# touch authorized_keys
Next generate a SSH keypair: ssh-keygen -b 4096 -N '' -t rsa -f id_rsa
root@nebula:~# ssh-keygen -b 4096 -N '' -t rsa -f id_rsaGenerating public/private rsa key pair.Your identification has been saved in id_rsa.Your public key has been saved in id_rsa.pub.The key fingerprint is:90:74:ae:c9:24:7f:4c:46:3f:08:77:54:1b:23:d9:fb root@Nebula

PostgreSQL 9.0.4 with Slackware 13.37

PostgreSQL is an advanced object-relational database management system (ORDBMS) based on POSTGRES. With more than 15 years of development history, it is quickly becoming the de facto database for enterprise level open source solutions. This build includes full text search support (tsearch2).
Home: http://www.postgresql.org.Repository: SlackersDownload size: 4,26 MBInstalled size: 22,48 MBPackage filename: postgresql-9.0.4-i686-1cf.txz
Step 1: Download postgresql-9.0.4-i686-1cf.txz for Slackware 13.37 from here and install it.
#installpkg postgresql-9.0.4-i686-1cf.txz
Step 2: Create postgreSQL user account
# adduser postgres# passwd postgresChanging password for user postgres.New UNIX password:Retype new UNIX password:passwd: all authentication tokens updated successfully.

Configuring PostgreSQL 9.0.4 on Slackware 13.37

After succesfully install postgresql on slackware, the next point is to configuring postgresql so it can accessing from network ( local network).


Step 1: edit postgresql.conf
#mcedit /var/lib/pgsql/data/postgresql.conf
change at the connections and authentication section, find the
listen_addresses = 'localhost' and change it to
listen_addresses = '*'
and uncomment
#port =5432 so it becomes
port = 5432
and save it.

Step 2: edit pg_hba.conf
Because i connecting postgresql server from my laptop which have ip number 192.168.110.131 and some times i would like connected from another 192.168.110. ip number, so i editing pg_hba.conf like this
#mcedit /var/lib/pgsql/data/pg_hba.conf
addes this line to pg_hba.conf
host    all     all     192.168.110.0/24     md5

Getting PostgreSQL 9.0.4 module for PHP-5.3.8 on Slackware 13.37

I wanted to play around with PostgreSQL on the test server at work today, and found the slackpack over at LinuxPackages. I was very pleased that I wouldn’t have to compile PostgreSQL from source, as such complex apps will take more time than I would like to invest.

Anyway, once I’ve installed the package, and initialised the database, I decided to give phpPgAdmin a whirl on my freshly baked PostgreSQL installation, but when I try to use it I get an error message telling me that I have not compiled proper database support into my PHP installation.

I checked out my phpinfo(); and sure enough, Slackware‘s package was not built with the --with-pgsql option.

Most of my googling results mention that the only solution is to recompile PHP from scratch, including the --with-pgsql flag. Hmm, I'm really hate to replace my original PHP installation which was done in the “proper” way, ie. via the available slackpack. Who know what the hell I can possibly misconfigure and break!

Slackware 13.37 + Dovecot 2.0.15 (Configuration)

Get Dovecot 2.0.15 from here (dovecot-2.0.15-i686-1cf.txz) then install it
$ upgradepkg --install-new dovecot-2.0.15-i686-1cf.txz
Then, start for configuration
$ cp -v /usr/doc/dovecot-2.0.15/example-config/* /etc/dovecot/

First create user and group for dovecot
groupadd dovecot
useradd -g dovecot dovecot
useradd -g dovecot dovenull
Here Bellow is my worked configuration : Dovecot.conf
# grep -v "#" /etc/dovecot/dovecot.conf

protocols = imap pop3
listen = *
base_dir = /var/run/dovecot/
login_greeting = Dovecot ready.
dict {}
!include conf.d/*.conf
10-auth.conf
$ grep -v "#" /etc/dovecot/conf.d/10-auth.conf

disable_plaintext_auth = yes
auth_mechanisms = plain login
!include auth-system.conf.ext
10-mail.conf
$ grep -v "#" /etc/dovecot/conf.d/10-mail.conf

mail_location = maildir:%h/Maildir
auth_socket_path = /var/run/dovecot/auth-userdb
mail_plugin_dir = /usr/lib/dovecot
mail_plugins = $mail_plugins
10-master.conf
$ grep -v "#" /etc/dovecot/conf.d/10-master.conf

service imap-login {  inet_listener imap {  }  inet_listener imaps {  }}
service pop3-login {  inet_listener pop3 {  }  inet_listener pop3s {  }}
service lmtp {  unix_listener lmtp {  }}
service imap {}
service pop3 {}
service auth {  unix_listener auth-userdb {  }}
service auth-worker {}
service dict {  unix_listener dict {  }}
Dovecot-openssl.cnf
$ grep -v "#" /usr/doc/dovecot-2.0.15/dovecot-openssl.cnf

[ req ]
default_bits = 1024
encrypt_key = yes
distinguished_name = req_dn
x509_extensions = cert_type
prompt = no
[ req_dn ]
C=ID
ST= Indonesia
L=MyCity
O=Dovecot
OU=IMAP server
CN=imap.despro.lan
emailAddress=postmaster@despro.lan
[ cert_type ]
nsCertType = server
$ cd /usr/doc/dovecot-2.0.15/
$ sh mkcert.sh
this action will create /etc/ssl/private/dovecot.pem and /etc/ssl/certs/dovecot.pem have been created. Remember their locations because you have to insert them in 10-ssl.conf
10-ssl.conf
$ grep -v "#" /etc/dovecot/conf.d/10-ssl.conf

ssl_cert =
ssl_key =
20-imap.conf
$ grep -v "#" /etc/dovecot/conf.d/20-imap.conf

protocol imap {mail_plugins = $mail_plugins imap_quota autocreate}
$ grep -v "#" /etc/dovecot/conf.d/20-pop3.conf

protocol pop3 
{mail_plugins = $mail_plugins}
90-plugin.conf
$ grep -v "#" /etc/dovecot/conf.d/90-plugin.conf

plugin 

{    
autocreate = Sent    
autocreate2 = Drafts    
autocreate3 = Junk    
autocreate4 = Trash    
autosubscribe = Sent    
autosubscribe2 = Drafts    
autosubscribe3 = Junk    
autosubscribe4 = Trash
}
90-quota.conf
$ grep -v "#" /etc/dovecot/conf.d/90-quota.conf
plugin {
quota = maildir:User quota
}
auth-system.conf.ext
$ grep -v "#" /etc/dovecot/conf.d/auth-system.conf.ext

passdb {
driver = shadow
}
userdb {
driver = passwd
}
Done

Sed - Merubah karakter ke -n dari file

Untuk merubah karakter ke 10 dengan suatu kalimat, katakanlah SED


Before
root@nebula:# cat test.txt
111111111111111111111111111111111111111111111111111
After
root@nebula:# sed -r "s/^(.{9})/\1SED/" test.txt
111111111SED11111111111111111111111111111111111111111
atau
root@nebula:# sed -i -r "s/^(.{9})/\1SED/" test.txt
-i memberitahu sed untuk langsung mengedit file tersebut (over write) output tidak akan ditampilkan dilayar

Kalau tidak mau di over write
root@nebula:# sed -r "s/^(.{9})/\1SED/" test.txt > test_output.txt

Slackware 13.37 + Dovecot 2.0.15 (POP3 Testing)

This is the way to testing our POP3 installation, every steps should be give correct result.
# telnet localhost 110
# telnet 192.168.110.254 110
# telnet nebula.despro.lan 110
Will given the same results (except IP address and Hostname):
Trying 127.0.0.1...Connected to localhost.Escape character is '^]'.  <-- it means Ctrl + ]+OK Dovecot ready.user fmaster <-- your username+OKpass ******* <-- your password+OK Logged in.quit+OK Logging out.Connection closed by foreign host.
Also check for secure POP connection on port 995
# openssl s_client -connect localhost:995
# openssl s_client -connect 192.168.110.254:995
# openssl s_client -connect nebula.despro.lan:995
Will given same result :
CONNECTED(00000003)
---
---
+OK Dovecot ready.
quit
+OK Logging out
closed
Done

for more advanced testing methode, please take a look these references

ReferensiReferensi 01 Referensi 02

Dovecot Instalation Testing

Check that it's listening
check that Dovecot is listening for connections from locahost
$ telnet localhost 143
Trying ::1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN] Dovecot ready.
^]
check from remote host
$ telnet nebula.anekarupatera.lan 143
Trying 192.168.110.254...
Connected to nebula.anekarupatera.lan.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN] Dovecot ready.
^]
Check that it's allowing logins
check from localhost
$ telnet localhost 143
Trying ::1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN] Dovecot ready.
a login diantokam ********
a OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS] Logged in
^]
check from remote host
$ telnet nebula.anekarupatera.lan 143
Trying 192.168.110.254...
Connected to nebula.anekarupatera.lan.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN] Dovecot ready.
a login diantokam ********
a OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS] Logged in
^]
check that it find inbox after login, do " b select inbox"
b select inbox
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted.
* 6 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1321690865] UIDs valid
* OK [UIDNEXT 906] Predicted next UID
* OK [HIGHESTMODSEQ 1] Highest
b OK [READ-WRITE] Select completed.
Check that it finds other mailboxes after login, do "d lsub "" *"
d lsub "" *
* LSUB () "." "Sent"
* LSUB () "." "Trash"
* LSUB () "." "Drafts"
d OK Lsub completed.
Make a graceful exit
e logout
* BYE Logging out
e OK Logout completed.
Note
^] = Ctrl + ]


Done

Source

Installing OpenFire on CentOS 6.0 (64 Bit)

Download rpm package from http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire-3.7.1-1.i386.rpm
cd /tmp
wget http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire-3.7.1-1.i386.rpm
and install it
rpm -ivh openfire-3.7.1-1.i386.rpm
Because openfire is a 32-bit application and requires 32-bit versions of OS system libraries. These libraries are not installed on CentOS x86_64 (64-bit) by default. You must install these 32-bit libraries on your system before you run openfire.


Resolving the problem

Cara menjalankan Crontab di CentOS (64 Bit)

Untuk definisi tentang crontab silahkan dibaca di bagian referensi, untuk menjalankan cron :
/etc/init.d/crond start
atau
service crond start
crond dapat langsung aktif saat kita menyalakan pc (saat boot) caranya dengan mengetikkan perintah dibawah ini :
chkconfig --level 2345 cron on <-- untuk menghidupkan
chkconfig --level 2345 cron off <-- untuk mematikan
Ada tiga option untuk mengoperasikan crontab
crontab -e
merupakan perintah untuk melakukan penjadwalan dengan crontab, menambah maupun mengurangi tugas
crontab -l
merupakan perintah untuk menampilkan tugas yang sudah ada di dalam crontab -e

sSMTP di CentOS 6.0 (64 Bit) and Slackware 14.0

untuk melakukan instalasi sSMTP di CentOS lakukan dengan cara :
yum install ssmtp
setelah selesai instal, lakukan editing terhadap file configurasinya :
mcedit /etc/ssmtp/ssmtp.conf
dan isikan dengan
root=username@gmail.com
mailhub=smtp.gmail.com:587
rewriteDomain=
hostname=username@gmail.com
UseSTARTTLS=YES
AuthUser=username
AuthPass=password
FromLineOverride=YES
Testing
Create message.txt with and fill with
Subject: Message for you

Message text starts here.

and run ssmtp with bellow command and check your inbox :D
ssmtp diantokam@slackware.com < /tmp/ssmtp.txt

eSMTP + Gmail on CentOS 6.0 (64 Bit)

Install eSMTP :
yum install esmtp
lakukan configurasi eSMTP sebagai berikut :
touch ~/.esmtprc
chmod 0710 /root/.esmtprc
mcedit root/.esmtprc
isi dengan :
identity username@gmail.com
hostname smtp.gmail.com:587
username "username@gmail.com"
password "password"
starttls required
Menggunakan CA dari mozilla.org

Tuesday, December 13, 2011

PostgreSQL 9.0.4 with Slackware 13.37

PostgreSQL is an advanced object-relational database management system (ORDBMS) based on POSTGRES. With more than 15 years of development history, it is quickly becoming the de facto database for enterprise level open source solutions. This build includes full text search support (tsearch2).
Home: http://www.postgresql.org.
Repository: Slackers
Download size: 4,26 MB
Installed size: 22,48 MB
Package filename: postgresql-9.0.4-i686-1cf.txz
Step 1: Download postgresql-9.0.4-i686-1cf.txz for Slackware 13.37 from here and install it.
#installpkg postgresql-9.0.4-i686-1cf.txz
Step 2: Create postgreSQL user account
# adduser postgres# passwd postgresChanging password for user postgres.New UNIX password:Retype new UNIX password:passwd: all authentication tokens updated successfully.

Postgresql 8.4.7 on CentOS 6.0 (64 Bit)

Install Postgresql
# yum install postgresql-server postgresql-devel postgresql-contrib postgresql#
# chmod 777 -R /tmp <-- make sure you do this !!!!
# /etc/rc.d/init.d/postgresql initdb
Initializing database: [ OK ]
# /etc/init.d/postgresql start
Starting postgresql service: [ OK ]
# /etc/init.d/postgresql stop
Stopping postgresql service: [ OK ]
Edit postgresql configuration
# mcedit /var/lib/pgsql/data/postgresql.conf
# line 59: listen all
listen_addresses = '*'
# line 334: change log format
log_line_prefix = '%t %u %d '
port = 5432