Monday, July 25, 2011

How install Ubuntu on Fedora on dual boot system

Following are the assumptions:
1. You have dual boot system with windows XP & Fedora

I followed following steps:
1. On Windows XP:
Click Start->Run and then type diskmgmt.msc and press Enter. The Disk Management tool opens.




Reference:
http://docs.fedoraproject.org/en-US/Fedora/13/html/Installation_Guide/sn-x86-uninstall-dual.html

Wednesday, July 20, 2011

Oracle 11gR2 on Ubuntu 11.04

I'm a newbie to Ubuntu. After installing Ubuntu on my machine, I figured out that Oracle 11g doesn't support Ubuntu officially. At first I felt bad for installing Ubuntu, then I searched in net and I came across some wonderful blogs which explains procedure to install the Oracle on Ubuntu:

http://www.pythian.com/news/1355/installing-oracle-11gr1-on-ubuntu-810-intrepid-ibex
http://lesscode.blogspot.com/2010/04/install-oracle-11g-r2-on-ubuntu-104.html
http://mikesmithers.wordpress.com/2010/03/14/installing-oracle-11gr2-on-ubuntu-9-10

I followed info in the above blogs along with some little effort kept on searching web to install Oracle 11gR2 on Ubuntu 11.04 on 32 bit Machine.

Now lets start as a root

sudo su

You might already downloaded Oracle 11g R2:
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

You need to create an account to download the software. There will be two files for Oracle 11g R2. Now unzip the software at your home directory (/home/username/). Username will be your Ubuntu login username

unzip linux_11gR2_database_1of2.zip
unzip linux_11gR2_database-2of2.zip

unzipped files will be at /home/username/database.

At first make sure you install or upgrade following packages(as a root):
apt-get install gcc
apt-get install make
apt-get install binutils
apt-get install gawk
apt-get install x11-utils
apt-get install rpm
apt-get install build-essential
apt-get install libaio1
apt-get install libaio-dev
apt-get install libmotif4
apt-get install libtool
apt-get install expat
apt-get install alien
apt-get install ksh
apt-get install pdksh
apt-get install unixODBC
apt-get install unixODBC-dev
apt-get install sysstat
apt-get install elfutils
apt-get install libelf-dev
apt-get install binutils
apt-get install lesstif2
apt-get install lsb-cxx
apt-get install lsb-rpm
apt-get install libstdc++5

May be too long...But it won't take much time to install those packages.

Now lets create some softlinks to the binaries so that our beloved Oracle takes it up(as a root):
ln -sf /bin/bash /bin/sh
ln -s /usr/bin/awk /bin/awk
ln -s /usr/bin/rpm /bin/rpm
ln -s /usr/bin/basename /bin/basename

ln -s /usr/lib/i386-linux-gnu/libpthread_nonshared.a /usr/lib/libpthread_nonshared.a
ln -s /usr/lib/i386-linux-gnu/libc_nonshared.a /usr/lib/libc_nonshared.a
ln -s /lib/i386-linux-gnu/libgcc_s.so.1 /lib/libgcc_s.so.1
ln -s /usr/lib/i386-linux-gnu/libstdc++.so.6 /usr/lib/libstdc++.so.6

Time to create some users(as a root):
addgroup oinstall
addgroup dba
addgroup nobody
usermod -g nobody nobody
useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle
mkdir /home/oracle
chown -R oracle:dba /home/oracle
mkdir /etc/rc.d
for i in 0 1 2 3 4 5 6 S ; do ln -s /etc/rc$i.d /etc/rc.d/rc$i.d ; done
mkdir -p /u01/app/oracle
chown -R oracle:dba /u01

mv /home/username/download/database /media/database
chown -R oracle:oinstall /media/database

Now lets change some system configuration files:

Add the following lines at the end of the file /etc/sysctl.conf:
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 1048576
net.core.wmem_max = 1048576
net.ipv4.ip_local_port_range = 9000 65500
fs.aio-max-nr = 1048576

Add the following lines at the end of the file /etc/security/limits.conf:
oracle soft nproc 2047
oracle hard nproc 16384
oracle hard nofile 65536
oracle soft nofile 1024

Add the following lines at
/etc/pam.d/login just above the line "session required pam_limits.so":

session required /lib/security/pam_limits.so

Lets activate the new settings from /etc/sysctl.conf with this command:
sysctl -p

Now run the following commands as root:
init 3
DISPLAY=:0; export DISPLAY; xhost +;

Till now we have done everything as a root, Now lets move to user oracle to install Oracle 11g R2(as a user oracle):
su - oracle

DISPLAY=:0 ; export DISPLAY
xclock
Make sure that clock window got popped up and then press Ctrl-c on the terminal.

cd /media/database
./runInstaller -ignoreSysPrereqs

Last command intiates Oracle 11g R2 installation.

1. Configure Security Updates:
You want to get security updates you can register with your mail id or else ignore it.

2. Installation option:
select "Create and configure a database"

3. System Class:
select "Desktop Class"

4. Typical Installation:
Update your Administrative password.

5. Pre-requisite Checks:
Select "Ignore All" and press next.

and now onwards go with defaults. Till it creates the database

Note: If you want SCOT user, at the password management option activate the user SCOT.

By default at the end of the installation you will get the database named "orcl".

After Installation completes lets do some cross checkings & little config changes:

As a root run the following commands:
/u01/app/oraInventory/orainstRoot.sh
/u01/app/oracle/product/11.2.0/dbhome_1/root.sh

creating startup/init script:
Update the following script in /etc/init.d/oracledb. Follow the referenced blogs above for explanation.

#!/bin/bash
#
# /etc/init.d/oracledb
#
# Run-level Startup script for the Oracle Listener and Instances
# It relies on the information on /etc/oratab

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_OWNR=oracle
export PATH=$PATH:$ORACLE_HOME/bin

if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ]
then
echo "Oracle startup: cannot start"
exit 1
fi

case "$1" in
start)
# Oracle listener and instance startup
echo -n "Starting Oracle: "
su $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl start"
su $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
touch /var/lock/oracle
echo "OK"
;;
stop)
# Oracle listener and instance shutdown
echo -n "Shutdown Oracle: "
su $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl stop"
su $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
rm -f /var/lock/oracle
echo "OK"
;;
reload|restart)
$0 stop
$0 start
;;
*)
echo "Usage: `basename $0` start|stop|restart|reload"
exit 1
esac

exit 0
#####################################################

Run following commands as a root.
chmod a+x /etc/init.d/oracledb
update-rc.d oracledb defaults 99

Testing:
connect to the user oracle from root:
su - oracle
Run the following commands to connect to the sqlplus as an oracle user.
. oraenv
ORACLE_SID = [oracle] ? orcl //output, give the orcl at the '?'
sqlplus '/as sysdba'
Now you will be having the sql prompt.


To make the Oracle start at the system boot:
in /etc/oratab change the 'N' on orcl line to Y as follows;

orcl:/u01/app/oracle/product/11.2.0/dbhome_1:Y


Wednesday, July 6, 2011

Lectures

Here I will be listing Lectures which are worth to go through them:

http://www.stanford.edu/class/cs110/ : This is about the Principles of computer systems. It consitutes very good lectures on linux, GDB, VIM, EMACS and brush up on network programming.

http://linuxpoison.blogspot.com: This blog contains good linux related articles. Have a peep into them.

http://www.thegeekstuff.com: Ramesh Natarajan is an author of the blog. It includes very nice articles on instruction guides, How-Tos, troubleshooting tips and tricks Linux and open source technologies. You can peek into "About" section of the blog for more info.


Disclaimer: I'm not sure that those links work for ever, But I hope they will be maintained.

Tuesday, July 5, 2011

Emacs

Will be updating evil-mode

Installing latest emacs:
sudo port install emacs
sudo port install emacs-app

http://wikemacs.org/wiki/Installing_Emacs_on_OS_X


Using following link to install mac ports
https://guide.macports.org/chunked/installing.macports.html


Start playing tetris:
M-x tetris

Grep with in Emacs:
M-x grep

Emacs can compare two files and highlight their differences (M-x ediff)
Emacs is a file manager (M-x dired)
Emacs can read news, mail, and RSS feeds (M-x gnus)
You can even play tetris in Emacs (M-x tetris)

Emacs with Cscope:
To run Cscope in Emacs you need cscope-indexer and xcscope.el in appropriate folders. They can be found at contrib/xcscope/ in cscope source code.
File cscope-indexer must be executable and placed in some directory in system PATH. File xcscope.el must be copied in some folder in Emacs’s load path. Usually, my .el files are in folder ~/elisp and this folder can be included in Emacs load path by adding this line to ~/.emacs:

(add-to-list 'load-path "~/elisp")

When this is done, we can include cscope in Emacs by adding this line to ~/.emacs :
(require 'xcscope)

Start Emacs, type M-x cscope and type TAB key (one or more times). If you see a list of cscope functions in other buffer, everything is fine. Set the cscope-initial-directory variable by typing M-x cscope-set-initial-directory and ~/projects/foo in the mini buffer (we can check variable values in Emacs by typing M-x describe-variable following the variable name).

Create list of files to index and cscope database with M-x cscope-index-files (this should create files cscope.files and cscope.out)

To move between the Cscope tags: "SPACE BAR"
To know the help commands in cscope file: C-h m

(From file xcscope.el)
;; * Keybindings:
;;
;; All keybindings use the "C-c s" prefix, but are usable only while
;; editing a source file, or in the cscope results buffer:
;;
;;      C-c s s         Find symbol.
;;      C-c s d         Find global definition.
;;      C-c s g         Find global definition (alternate binding).
;;      C-c s G         Find global definition without prompting.
;;      C-c s c         Find functions calling a function.
;;      C-c s C         Find called functions (list functions called
;;                      from a function).
;;      C-c s t         Find text string.
;;      C-c s e         Find egrep pattern.
;;      C-c s f         Find a file.
;;      C-c s i         Find files #including a file.
;;
;; These pertain to navigation through the search results:
;;
;;      C-c s b         Display *cscope* buffer.
;;      C-c s B         Auto display *cscope* buffer toggle.
;;      C-c s n         Next symbol.
;;      C-c s N         Next file.
;;      C-c s p         Previous symbol.
;;      C-c s P         Previous file.
;;      C-c s u         Pop mark.
;;
;; These pertain to setting and unsetting the variable,
;; `cscope-initial-directory', (location searched for the cscope database
;;  directory):
;;
;;      C-c s a         Set initial directory.
;;      C-c s A         Unset initial directory.
;;
;; These pertain to cscope database maintenance:
;;
;;      C-c s L         Create list of files to index.
;;      C-c s I         Create list and index.
;;      C-c s E         Edit list of files to index.
;;      C-c s W         Locate this buffer's cscope directory
;;                      ("W" --> "where").
;;      C-c s S         Locate this buffer's cscope directory.
;;                      (alternate binding: "S" --> "show").
;;      C-c s T         Locate this buffer's cscope directory.
;;                      (alternate binding: "T" --> "tell").
;;      C-c s D         Dired this buffer's directory


References:
http://kliketa.wordpress.com/2010/07/09/using-cscope-source-browsing-tool
http://stackoverflow.com/questions/364495/non-gui-emacs-with-cscope
http://www.stanford.edu/class/cs110/other/emacsrefcard.pdf
http://lists.gnu.org/archive/html/help-gnu-emacs/ -- Emacs mailer list

Thursday, April 28, 2011

AP Results

Sites which will provide marks along with grades:
examresults.ap.nic.in
aponline.gov.in
results.cgg.gov.in
esevaonline.com
results.apit.ap.gov.in
portal.ap.gov.in

Sites which will provide only grades:
www.eenadu.net,
www.exametc.com
www.rediff.com/exams
www.manabadi.com,
www.results.manabadi.co.in
www.schools9.com
www.results-ap.com


ƒÅŒª½ «ÖªÃ_©Õ
* H‡-®ý-‡-¯þ-‡©ü ©Çu¢œþ-©ãj¯þ ÊÕ¢* 1100 ¯ç¢¦-ª½Õ¹×, ƒÅŒª½ \ ©Çu¢œþ-©ãj¯þ, „çá¦ãj©ü ÊÕ¢* ƪá¯Ã 1800Ð4251110 ¯ç¢¦-ª½ÕÂ¹× œ¿§ŒÕ©ü Íä§ŒÖL. ¨ 殫 ŸÄyªÃ X¶¾LÅŒ¢, «Öª½Õˆ©Õ Åç©Õ-²Ähªá.
* \XÔ ‚¯þ-©ãj¯þ ꢓŸÄ©ðx «Öª½Õˆ©Õ ©¦µ¼u-«Õ-«Û-Åêá.
* H‡-®ý-‡-¯þ-‡©ü „çá¦ãj©ü, ©Çu¢œþ-©ãj¯þ NE-§çÖ-’¹-ŸÄ-ª½Õ©Õ 125Ð5225 ¯ç¢¦-ª½ÕÂ¹× œ¿§ŒÕ©ü Íä®Ï ¹¢X¾Üu-{ªý ’í¢ÅŒÕ ŸÄyªÃ «Öª½Õˆ©Õ Åç©Õ-®¾Õ-Âî-«ÍŒÕa.


X¶¾L-ÅéÕ, “ê’œ¿Õx ƒÍäa ¤¶òÊÕx:
‡ªá-ªý-˜ã©ü 543212222, 52800
* „îœÄ-¤¶ò¯þ 56731
* ‰œË§ŒÖ 5545678, 54040
* šÇšÇ 129660
* J©-§ŒÕ¯þq 56566, 56300999
* œíÂî„çÖ 54321234
* H‡-®ý-‡-¯þ-‡©ü 12630099, 125560, 1255596
* Æ¢Ÿ¿ª½ÖÐ505101096, 53030, 58888, 57337

‡®ý-‡¢-‡-®ý©Õ (X¶¾L-ÅÃ-©Õ+-«Ö-ª½Õˆ©Õ)
* H‡-®ý-‡-¯þ-‡©ü inter2 ªÃ®Ï æ®p®ý ƒ*a £¾É©ü-šË-éšü ¯ç¢¦ª½Õ ªÃ®Ï.. 55352, 56300 ¯ç¢¦-ª½ÕÂ¹× ‡®ý-‡¢-‡®ý X¾¢XÏ¢-ÍÃL

‡®ý-‡¢-‡-®ý-©Õ(-X¶¾-L-ÅÃ-©Õ+-“ê’-œþ©Õ)
* ÆEo ¯çšü-«-ªýˆ©Õ IPE2ÆE-ªÃ®Ï æ®p®ý ƒ*a £¾É©ü šËéšü ¯ç¢¦ª½Õ ªÃ®Ï, 57333, 54242, 56300©Â¹× ‡®ý-‡¢-‡®ý X¾¢¤ÄL.
* «%Ah-NŸ¿u X¶¾L-ÅÃ-©Â¹× IPEV2 ÆE ªÃ®Ï æ®p®ý ƒ*a £¾É©üšËéšü ¯ç¢¦ª½Õ ªÃ®Ï 57333, 54242, 56300Â¹× X¾¢¤ÄL.
* ÆEo ¯çšü-«-ªýˆ©Õ IPEG2 ÆE ªÃ®Ï æ®p®ý ƒ*a £¾É©ü-šË-éšü ¯ç¢¦ª½Õ ªÃ®Ï 58888, 5676750, 56677, 5667788©Â¹× ‡®ý-‡¢-‡®ý X¾¢XÏ¢-ÍÃL.
* ÆEo-¯ç-šü-«-ª½Õˆ©Õ «%Ah-NŸ¿u IPEV2 £¾É©ü-šË-éšü Ê¢¦ªý 58888, 5676750, 56677, 5667788 ¯ç¢¦-ª½xÂ¹× ‡®ý-‡¢-‡®ý Íä§ŒÖL

Reference:

Eenadu on 28/04/2011 http://eenadu.net/panelhtml.asp?qrystr=htm/panel3.htm

Thursday, September 16, 2010

802.1x

Configuration:

dot1x max-req: The dot1x max-req interface configuration command sets the maximum number of times that the device sends an Extensible Authentication Protocol (EAP) - request frame (assuming that no response is received) to the client before restarting the authentication process.
Other definition:
Sets the number of times that the switch retransmits an EAP-Request frame of a type other than EAP-Request/Identity to the client before restarting the authentication process.


dot1x max-reauth-req: The number of times that the switch restarts the authentication process before the port changes to an unauthorized state.
Other definition: The number of times that the switch sends an EAP-request/identity frame (assuming no response is received) to the client before restarting the authentication process.


The number of EAP-Request/Identity retransmissions is controlled by the dot1x max-reauth-req command; the number of retransmissions for other EAP-Request frames is controlled by the dot1x max-req command.

Timers:
dot1x timeout re-authperiod: The dot1x timeout re-authperiod interface configuration command sets the number of seconds between re-authentication attempts. To return to the default setting, use the no form of this command.

dot1x timeout quiet-period:
The dot1x timeout quiet-period interface configuration command sets the number of seconds that the device remains in the quiet state following a failed authentication exchange (for example, the client provided an invalid password). To return to the default setting, use the no form of this command.

dot1x timeout tx-period: The dot1x timeout tx-period interface configuration command sets the number of seconds that the device waits for a response to an Extensible Authentication Protocol (EAP) - request/identity frame from the client before resending the request. To return to the default setting, use the no form of this command.

dot1x timeout supp-timeout: The dot1x timeout supp-timeout interface configuration command sets the time that the device waits for a response before retransmitting an Extensible Authentication Protocol (EAP)-request frame to the client. To return to the default setting, use the no form of this command.

dot1x timeout server-timeout: The dot1x timeout server-timeout interface configuration mode command sets the time that the device waits for a response from the authentication server before retransmitting packets. To return to the default setting, use the no form of this command.

Authorization Features:
Critical Vlan: is Assigning a VLAN , when AAA server is not reachable.
                      authentication event server dead action authorize vlan vlan-id
Guest Vlan: is Assigning a VLAN, when the client doesn't have the ability to get authenticated.
                      authentication event no-response action authorize vlan vlan-id
Auth fail(Restricted) Vlan: Assigning a VLAN, when the client has ability to get authenticated but authentication fails like users with wrong credentials. auth-fail vlan won't work in multi-auth mode(Just think about having two devices on that port, one being able to authenticate and another showing up that fails and pulling the complete port into the auth-fail VLAN: that's probably not what your customer wants)
                      authentication event fail action authorize vlan vlan-id  [OR]
                      dot1x auth-fail vlan vlan-id


Commands:
aaa authentication dot1x default group radius none 
   -- Uses no authentication. The client is automatically authenticated by the switch without using the information supplied by the client.


Dynamic VLAN Assignment with RADIUS Server:
Radius attributes needs to be passed:
tunnel-type=VLAN
tunnel-medium-type=ALL_802
tunnel-private-group-id="Vlanname" or "uservlanid"

For rsim:
attribute 64 numeric 13
attribute 65 numeric 6
attribute 81 string "nms"

Configuratoin needed on switch:
1. aaa authorization network default group radius
2. "vlanname" or "vlanid" that is sent from radius server need to configured on the switch.


References:
ACS 5.2 configuration:
http://www.cisco.com/en/US/products/ps10315/products_configuration_example09186a0080bc8129.shtml
ACS4.x configuration:
http://www.cisco.com/en/US/tech/tk722/tk809/technologies_configuration_example09186a008076317c.shtml

References:
http://docs.us.dell.com/support/edocs/network/pc6024/en/cli/html/802.htm#1054577
http://www.cisco.com/en/US/docs/switches/lan/catalyst4500/12.1/19ew/configuration/guide/dot1x.html