Wednesday, October 30, 2013

Cyrus IMAP Administration

Configuration Files:
/etc/imapd.conf
/etc/cyrus.conf

Login as cyrus
$ cyradm -user cyrus localhost


localhost> help
authenticate, login, auth         authenticate to server
chdir, cd                         change current directory
createmailbox, create, cm         create mailbox
deleteaclmailbox, deleteacl, dam  remove ACLs from mailbox
deletemailbox, delete, dm         delete mailbox
disconnect, disc                  disconnect from current server
exit, quit                        exit cyradm
help, ?                           show commands
info                              display mailbox/server metadata
listacl, lam, listaclmailbox      list ACLs on mailbox
listmailbox, lm                   list mailboxes
listquota, lq                     list quotas on specified root
listquotaroot, lqr, lqm           show quota roots and quotas for mailbox
mboxcfg, mboxconfig               configure mailbox
reconstruct                       reconstruct mailbox (if supported)
renamemailbox, rename, renm       rename (and optionally relocate) mailbox
server, servername, connect       show current server or connect to server
setaclmailbox, sam, setacl        set ACLs on mailbox
setinfo                           set server metadata
setquota, sq                      set quota on mailbox or resource
subscribe, sub                    subscribe to a mailbox
unsubscribe, unsub                unsubscribe from a mailbox
version, ver                      display version info of current server
xfermailbox, xfer                 transfer (relocate) a mailbox to a different server
localhost> setquota user.dav 51200


export all user name to file
$ cyradm -user cyrus localhost -password <password> << EOF > user.txt
>lm
>EOF

List all quota into text file
$ cyradm -user cyrus localhost -password <password> << EOF > user.txt
>quota
>EOF

Cyrus admin to clean up mail box

$ /usr/lib/cyrus/bin/ipurge -f -b 0 <user.mailbox>

# References:
http://liseyko.blogspot.ca/2007/07/cyrus-management.html


Tuesday, October 29, 2013

Setup APEX Environment

Oracle APEX Installation Guide Download Oracle HTTP Server


POC Env:

http://apex.goweekend.ca:7777/pls/apex/apex_admin

admin

Database:

SID: APEX

Server: apex.goweekend.ca

Port: 1521





Apex Workspace

http://apex.goweekend.ca:8080/apex

Workspace: WS1



Restart APEX

Login as oracle

$ sqlplus / as sysdba

$ shutdown immediate

$ startup

Ensure Listener is up

Login as ohs

$ cd /usr2/middleware/Oracle_WT/instances/apex/bin

$ ./opmnctl stopall

$ ./opmnctl startall

Thursday, October 10, 2013

MongoDB: Readahead for /data/db/ is set to 512KB

OS: Suse Linux 11 SP2

Problem:
Wed Sep 11 08:15:55.215 [initandlisten] ** WARNING: Readahead for /data/db/ is set to 512KB
Wed Sep 11 08:15:55.215 [initandlisten] **          We suggest setting it to 256KB (512 sectors) or less
Wed Sep 11 08:15:55.215 [initandlisten] **          http://dochub.mongodb.org/core/readahead

Solution:

Login as root, and check current Readhead. First of all, find out the file system your database located in. i.e.
# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2             448G  319G  107G  75% /

in my case, /dev/sda2 is the one.
#  blockdev --getra /dev/sda2

Change  Readahead
# blockdev --setra 256 /dev/sda2

restart mongodb server


$ mongo
> use admin
> db.shutdownServer({shutdown:1, force:true})

Start mongodb server again
$ mongodb