Friday, July 13, 2012

Adding User and Group with specific uid and gid

[root@slchost ~]# useradd aime
[root@slchost ~]# groupadd svrtech
[root@slchost ~]# usermod -u 94110 aime
[root@slchost ~]# usermod -G svrtech aime
[root@slchost ~]# groupmod -g 42424 svrtech
[root@slchost~]# su aime
[aime@slchost root]$ id
uid=94110(aime) gid=503(aime) groups=503(aime),42424(svrtech)
[aime@slchost root]$

Friday, April 6, 2012

Change Hypervisor memory for Domain-0

Change Hypervisor memory:

vi /boot/grub/grub.conf (default is 512M)
You can change it to 4096 fro better performance.

 restart the host


Saturday, February 25, 2012

Cisco Anyconnect Certificate issue on Fedora 16

This is what i did to resolve the Certificate issue:


Check this Link: http://blog.offenders.org/?cat=26

Installing Cisco Anyconnect VPN on Linux

by on Feb.18, 2012, under Cisco, Fedora, Internet, Linux, Remote Access
The Cisco docs aren’t very helpful, and I’ve spent a lot of time getting this working, often making dozens of changes and not knowing which one actually fixed it. I’ve finally nailed it down. On Fedora 15/16, this is all you need to do.
You can install the Anyconnect software before or after installing these packages. If you installed it before, you will need to restart the vpnagentd_init service afterwards.
# yum install gdk-pixbuf2-devel.i686 libcurl-devel.i686 gtk2-devel.i686 glibc.i686 libxml2.i686 libxml2-devel.i686 libcurl-devel.i686 gtk2-devel.i686 atk-devel.i686 glibc.i686 libxml2.i686 libxml2-devel.i686
# ln -s /lib/libplc4.so /usr/lib/libplc4.so
# ln -s /lib/libnspr4.so /usr/lib/libnspr4.so
That’s it! Open up the gui client as a non-root user.
If there are problems, start the vpn client in a terminal so you can see any errors thrown, and watch syslog for additional errors.

Friday, December 23, 2011

RAC DB faq's

To Check status of RAC DB:
===========================
[oracle@slc00ypo ~]$ srvctl status database -d ORCL
Instance ORCL1 is running on node slc00ypo
Instance ORCL2 is running on node slc00ypp
[oracle@slc00ypo ~]$


[oracle@slc00ypo ~]$ srvctl status nodeapps
VIP slc00ypq is enabled
VIP slc00ypq is running on node: slc00ypo
VIP slc00ypr is enabled
VIP slc00ypr is running on node: slc00ypp
Network is enabled
Network is running on node: slc00ypo
Network is running on node: slc00ypp
GSD is disabled
GSD is not running on node: slc00ypo
GSD is not running on node: slc00ypp
ONS is enabled
ONS daemon is running on node: slc00ypo
ONS daemon is running on node: slc00ypp


[oracle@slc00ypo trace]$ crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.DATA.dg    ora....up.type ONLINE    ONLINE    slc00ypo   
ora....ER.lsnr ora....er.type ONLINE    ONLINE    slc00ypo   
ora....N1.lsnr ora....er.type ONLINE    ONLINE    slc00ypo   
ora.asm        ora.asm.type   ONLINE    ONLINE    slc00ypo   
ora.cvu        ora.cvu.type   ONLINE    ONLINE    slc00ypo   
ora.gsd        ora.gsd.type   OFFLINE   OFFLINE              
ora....network ora....rk.type ONLINE    ONLINE    slc00ypo   
ora.oc4j       ora.oc4j.type  ONLINE    ONLINE    slc00ypo   
ora.ons        ora.ons.type   ONLINE    ONLINE    slc00ypo   
ora.orcl.db    ora....se.type ONLINE    ONLINE    slc00ypo   
ora....ry.acfs ora....fs.type ONLINE    ONLINE    slc00ypo   
ora.scan1.vip  ora....ip.type ONLINE    ONLINE    slc00ypo   
ora....SM1.asm application    ONLINE    ONLINE    slc00ypo   
ora....PO.lsnr application    ONLINE    ONLINE    slc00ypo   
ora....ypo.gsd application    OFFLINE   OFFLINE              
ora....ypo.ons application    ONLINE    ONLINE    slc00ypo   
ora....ypo.vip ora....t1.type ONLINE    ONLINE    slc00ypo   
ora....SM2.asm application    ONLINE    ONLINE    slc00ypp   
ora....PP.lsnr application    ONLINE    ONLINE    slc00ypp   
ora....ypp.gsd application    OFFLINE   OFFLINE              
ora....ypp.ons application    ONLINE    ONLINE    slc00ypp   
ora....ypp.vip ora....t1.type ONLINE    ONLINE    slc00ypp   
[oracle@slc00ypo trace]$


RAC DB Connection String:
==========================
I tried :

jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)
(ADDRESS=(PROTOCOL=TCP)(HOST=adc4120554.us.oracle.com) (PORT=1616))
(ADDRESS=(PROTOCOL=TCP)(HOST=adc4120555.us.oracle.com) (PORT=1616))
(CONNECT_DATA=(SERVICE_NAME=ORCL)))

http://programmersjournal.blogspot.com/2008/08/jdbc-connection-string-for-oracle-rac.html


Finding Log File location:
==========================
SQL> connect / as sysdba;
Connected.

SQL> show parameter backg;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
background_core_dump                 string      partial
background_dump_dest                 string      /u01/app/oracle/diag/rdbms/orc
                                                 l/ORCL1/trace
SQL> exit

Tuesday, December 6, 2011

Rsync - Copy from remote hosts

To copy files from remote servers

a) Mount the filesystem locally using NFS.

Run the below :

 rsync   -avtz      /net/host_name-mounted/faovm     /scratch/aime/faovm_local


/net/host_name-mounted/faovm is a NFS point which is mounted locally.

There is a difference in

/net/host_name-mounted/faovm and /net/host_name-mounted/faovm/

/net/host_name-mounted/faovm    :   will copy  faovm directory also.
/net/host_name-mounted/faovm/   : by giving trailing slash it will copy contents inside faovm dir.



-a  archive mode
-v  verbose
-t  preserve time
-z  transfering in a compressed mode , so that transfers are done quickly



Wednesday, November 23, 2011

How to use Vncserver with X or Console

If you want to run Vncserver in console mode,

cd $home/.vnc

=== For console Mode=======
$ cat xstartup
#!/bin/sh
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &


==========================

=== startx (kde mode)============

$ cat xstartup
#!/bin/sh
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
exec /usr/bin/startkde

========================























Thursday, October 20, 2011

Install perl modules

To install mod_perl in ubuntu :

root@ubuntu:/etc/apache2# apt-get install libapache2-mod-perl2

Add below directives in /etc/apache2/httpd.conf

root@ubuntu:/etc/apache2# cat httpd.conf
<Directory /var/www/perl>
Options +ExecCGI
AddHandler cgi-script .cgi .pl
</Directory>
root@ubuntu:/etc/apache2#

Create directory inside /var/www as perl 


cd /var/www
mkdir perl

Permission can be set as below
drwxr-xr-x  2 www-data www-data 4096 2011-10-20 15:33 perl


refer your apache.conf file what user directive is given there ,
by default it is www-data




After installing any perl module restart apache2

root@ubuntu:/etc/apache2# /etc/init.d/apache2 restart



To Check all Perl modules install :

root@ubuntu:/etc/apache2# perl -MCPAN -e 'CPAN::Shell->r'


Apache2::SizeLimit             0.05      0.95  PHRED/Apache-SizeLimit-0.95.tar.gz
B                              1.22      1.31  RJBS/perl-5.15.2.tar.bz2
CGI                            3.43      3.55  MARKSTOS/CGI.pm-3.55.tar.gz
Compress::Zlib                2.020     2.037  PMQS/IO-Compress-2.037.tar.gz
Cwd                            3.30      3.33  SMUELLER/PathTools-3.33.tar.gz
File::MimeInfo::Rox            0.15       0.2  PARDUS/File-MimeInfo/File-MimeInfo-0.14.tar.gz
Filter::Util::Call             1.08      1.39  PMQS/Filter-1.39.tar.gz
HTML::FormatPS                 2.04      2.10  NIGELM/HTML-Format-2.10.tar.gz
I18N::LangTags::Detect         1.03      1.04  LBROCARD/perl-5.12.4.tar.gz
I18N::Langinfo                 0.02      0.07  JESSE/perl-5.13.9.tar.gz
LWP                           5.837      6.03  GAAS/libwww-perl-6.03.tar.gz
List::Util                     1.21      1.23  GBARR/Scalar-List-Utils-1.23.tar.gz
Locale::Constants              2.07      3.16  SBECK/Locale-Codes-3.16.tar.gz
Locale::Country                2.07      3.18  SBECK/Locale-Codes-3.18.tar.gz
Mail::Address                  2.06      2.08  MARKOV/MailTools-2.08.tar.gz
Pod::Man                       2.22      2.25  RRA/podlators-2.4.0.tar.gz
Socket                         1.82      1.94  FLORA/perl-5.13.11.tar.gz
mod_perl2                  2.000004  2.000005  PHRED/mod_perl-2.0.5.tar.gz
233 installed modules have no parsable version number
(use 'o conf show_unparsable_versions 1' to show them)



Also try :

root@ubuntu:/etc/apache2# instmodsh
Available commands are:
   l            - List all installed modules
   m <module>   - Select a module
   q            - Quit the program
cmd? l
Installed modules are:
   Perl
cmd? 1


Place all your perl scripts in /var/www/perl

and test in browser as http://localhost/test/first.pl