- edit /etc/sysconfiog/iptables
- add new rules
- save file
- restart iptables
iptables for dummies
August 20, 2007 at 10:22 am (Uncategorized)
vnc server
June 8, 2007 at 5:44 pm (Script)
- edit /etc/sysconfig/vncservers
- add user:port_number:setting
- VNCSERVERS=”<port_number>:leopard”
- VNCSERVERARGS[<port_number>]=”-geometry 1024×768 -depth 16″
-
edit /home/<user>/.vnc/xstartup
-
# Uncomment the following two lines for normal desktop: unset SESSION_MANAGER exec /etc/X11/xinit/xinitrc
-
-
user need to login from remete....type vncpasswd
-
login to vnc
extra c4$h
May 29, 2007 at 4:33 pm (Uncategorized)
more RMAN command
May 28, 2007 at 5:44 pm (ORACLE)
- list backup summary
- validate backupset <bck#>
- delete obsolete recovery window of 5 days
statpack setup
May 22, 2007 at 3:37 pm (ORACLE)
- create perfstat tablespace ~ 100M
- create temp tablespace ~ 100M
- run ?/rdbms/admin/spcreate.sql
- execute statspack.snap
- run ?/rdbms/admin/spreport.sql
if needed:- run ?/rdbms/admin/spdrop.sql to drop perfstat schema.
Put DB on Achivelog mode
May 21, 2007 at 11:38 am (ORACLE)
- Startup mount
- alter database archivelog
- alter database open
- to check
- select log_mode from v$database;
- show parameter log_archive start;
- to change
- alter system archive log start ‘<arc location>’;
- archive log list;
RMAN backup script
November 1, 2006 at 12:20 pm (Script)
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 4 DAYS; CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE --
--- TYPE DISK TO '/u03/backup/rman/controlfile/%d_CTL_%F';
run {
crosscheck backupset;
delete noprompt expired backupset;
DELETE NOPROMPT OBSOLETE RECOVERY WINDOW OF 7 DAYS;
#backup datafile, controlfile and archivelogs
allocate channel ch1 type disk format
'/u03/backup/rman/datafile/FULL_%d_DB_%u_%s_%p';
backup database;
release channel ch1;
}
run {
# Backup outdated archlogs and delete them
allocate channel ch1 type disk format --
--- '/u03/backup/rman/archive/%d_ARCH_%u_%s_%p'; sql 'ALTER SYSTEM ARCHIVE LOG CURRENT'; backup archivelog all delete input; release channel ch1; }
more script
November 1, 2006 at 8:49 am (Script)
find . -depth -type d | xargs rmdir 2> /dev/null
sed ‘s/$/,’`ls | cut -c 1-5`’/g’ `ls`
My Load-balance script
October 16, 2006 at 4:04 pm (Script)
Script to copy from WebServer-A to WebServer-B. This to enable Load-balance.
At WebServer-A:-
- ssh-keygen -t rsa
- scp id_rsa.pub root@WebServer-B:/root/.ssh/authorized_keys
- vi copyall and write rsync -ave ssh –numeric-ids –delete /var/www/html WebServer-B:/var/www/html
- add entry in cronjob for every 1/2 hour.
At Webserver-B:-
- as root, chmod 644 /root/.ssh/authorized_keys
About Me
August 7, 2006 at 12:41 pm (Others)
Kamarudin Samsudin live in Kuala Lumpur, Malaysia.
I am a Software Engineer but most of the time I’m dealing with DBA’s stuff. I need to maintain MySQL and Oracle databases. Sometime, I involves in web-based development team but not as coder, more as architecture implementer (install & configure servers and etc).
Because of my working nature, I’m very interested in MySQL, Oracle and Web-based technology stuff. Currently, I’m tried to implement MySQL Cluster and learn Ruby so it can be my 1st scripting language. My aims, I will be Certified MySQL DBA by end of this year and an OCA by next year.
I have BEng in Electronics with Computing Science from University Of Wales, UK.
