Author: Arun Bagul

Subversion – How to configure with Apache WebDAV or svnserve

Subversion – How to configure with Apache WebDAV or svnserve

1] What is Subversion?

Subversion is a beautiful free/open source tool (software) to manage changes made to your information. Subversion manages files and directories, and the changes made to them over time. This allows you to recover older versions of your data or examine the history of how your data changed. Subversion can operate across networks, which allows it to be used by people on different computers.

2] Different methods of accessing subversion (svn) repository ?

There are three different methods of accessing subversion repository…

a) Local filesystem or Network filesystem accessed by client directly
b) Apache HTTP using WebDAV module
c) svnserve tunneled over an SSH (svn + ssh)

For more informatio, please refer the article http://www.indiangnu.org/2006/different-methods-of-accessing-subversion-svn-repository/

3] Subversion architectue –

Subversion provides two backends to store the data in svn repository

a) FSFS – Fast and Secure File Systtem –

FSFS backend provides quite a bit more flexibility in terms of its supported deployment scenarios. More flexibility means you have to work a little harder to find ways to deploy it incorrectly. FSFS is the default backend

b) Berkeley DB File system –

Berkeley DB provides real transaction support—perhaps its most powerful feature. Another great feature of Berkeley DB is hot backups—the ability to backup the database environment without taking it “offline”. But Berkeley DB environments are not portable!!

root@arun:~# ls -l  /var/repos_base/myrepository/
total 28
drwxr-xr-x 2 arunsb www-data 4096 2008-12-27 15:30 conf
drwxr-xr-x 2 arunsb www-data 4096 2008-12-26 16:34 dav
drwxr-sr-x 5 arunsb www-data 4096 2008-12-27 15:27 db
-r–r–r– 1 arunsb www-data    2 2008-12-26 16:34 format
drwxr-xr-x 2 arunsb www-data 4096 2008-12-26 16:34 hooks
drwxr-xr-x 2 arunsb www-data 4096 2008-12-26 16:34 locks
-rw-r–r– 1 arunsb www-data  229 2008-12-26 16:34 README.txt
root@arun:~#

root@arun:~# cat /var/repos_base/myrepository/db/fs-type
fsfs
root@arun:~#

4] How Install Subversion –

Ubuntu –

root@arun:~# apt-get install  subversion  subversion-tools
5] How to configure Subversion with Apache HTTP and WebDAV module –

Step (1) First of all we need to create the subversion repository….

root@arun:~# svnadmin create /var/repos_base/myrepository
root@arun:~#

* Make sure to set/change owership/permission of svn repository for Apache webserver user (www-data is apache user)

root@arun:/var/repos_base# chown arunsb:www-data -R /var/repos_base/
root@arun:~# chmod  775 -R /var/repos_base/
root@arun:~#
root@arun:~# ls -l /var/repos_base/
-rwxrwxr-x 1 arunsb www-data   63 2008-12-03 15:50 common_userdb
drwxrwxr-x 7 arunsb www-data 4096 2008-12-03 15:48 myrepository
root@arun:~#

Step (2) Authentication – common user DB for all repositories –

Let us create a file “/var/repos_base/common_userdb” which will contain users information in file and add few users…

root@arun:/var/repos_base# htpasswd  -c /var/repos_base/common_userdb   arunsb
New password:
Re-type new password:
Adding password for user arunsb

root@arun:/var/repos_base# htpasswd  /var/repos_base/common_userdb  ravi
New password:
Re-type new password:
Adding password for user ravi

root@arun:/var/repos_base# htpasswd  /var/repos_base/common_userdb  santhosh
New password:
Re-type new password:
Adding password for user santhosh

root@arun:/var/repos_base# cat /var/repos_base/common_userdb
arunsb:dXxZU5vmHxFoc
ravi:gGEX.dsWcwqzc
santhosh:Jlzed1almY.SY
root@arun:/var/repos_base#

Step (3) Now install Apache , WebDav module for apache –

Ubuntu –

root@arun:~# apt-get install apache2  apache2.2-common  libapache2-svn

you need to enable to WebDAV svn module for apache using following command on Ubuntu…

root@arun:~# a2enmod dav   dav_svn
root@arun:~#

* Make sure that Apache is running ….

Step (4) Configure svn repository with apache –

root@arun:~# cat /etc/apache2/mods-available/dav_svn.conf
# dav_svn.conf – Subversion/Apache configuration

<Location /myrepository>

DAV svn

#You need either SVNPath and SVNParentPath, but not both.
#use SVNParentPath if you have multiple repositories under one directory

SVNPath /var/repos_base/myrepository
#SVNParentPath /var/repos_base

# Access control is done at 3 levels –
#(1) Apache authentication
#(2) Apache <Limit> and <LimitExcept>
#(3) mod_authz_svn is a svn-specific authorization module

AuthType Basic
AuthName “|| Welcome to Subversion Repository || ”
AuthUserFile /var/repos_base/common_userdb

#To enable authorization via mod_authz_svn
AuthzSVNAccessFile  /var/repos_base/myrepository/conf/authz
Require valid-user

#<LimitExcept GET PROPFIND OPTIONS REPORT>
#Require valid-user
#</LimitExcept>

</Location>

## Add entry for other svn repositories

root@arun:~#

* Once done restart the Apache server and try to access svn repository as …

root@arun:~# svn list http://server_name_or_IP/your_repository_name_mentioned_in_dav_svn.conf_file

please refer the article for more operation http://www.indiangnu.org/2006/different-methods-of-accessing-subversion-svn-repository/

6] How to configure Subversion with svnserve tunneled over an SSH (svn + ssh) –

Step (1) Make sure that subversion is installed and repository is created…

Start up script for svnserve is as shown below (ubuntu), please update this file with proper setting…

root@arun:~# cat /etc/init.d/svnserve
#!/bin/bash

# startup script for svn server!
## svnserve  –daemon  –listen-port   3690  –pid-file /var/run/svn.server

SVN_DAEMON=”/usr/bin/svnserve”
PID_FILE=”/var/run/svn-server.pid”
LOG_FILE=”/var/log/svnserve.log”
SVN_PORT=3690
SVN_ROOT=”/var/repos_base”
case “$1” in

start)
if [ -f  $PID_FILE ];then
check=$(cat $PID_FILE)
echo “Subversion service (svnserve) already running [pid = $check]”
else
echo “Starting the Subversion service (svnserve)..”
$SVN_DAEMON  –daemon –root $SVN_ROOT  –listen-port $SVN_PORT –pid-file $PID_FILE  > $LOG_FILE 2>&1
echo “log file is $LOG_FILE”
echo “…”
echo “Done.”
fi
;;

stop)
echo “killing Subversion service (svnserve)…”
if [ -f  $PID_FILE ];then
#killall svnserve
kill -9 $(cat $PID_FILE)
rm  $PID_FILE
echo “…”
echo “Done.”
else
echo “NOT running…”
fi
;;

status)
if [ -f  $PID_FILE ];then
echo “Subversion service (svnserve) -”
pid_of_svnserve=$(cat $PID_FILE)
echo -e “Running & pid is $pid_of_svnserve”
else
echo “Subversion service (svnserve) NOT running…”
fi
;;

*)
echo “Usage: $0  {start|stop|status}”
exit 1
esac
exit 0
#DONE
root@arun:~#

Step (2) svnserve  configuration –

root@arun:~# cat /var/repos_base/myrepository/conf/svnserve.conf
### This file controls the configuration of the svnserve daemon, if you

[general]
### Authenticated users.  Valid values are “write”, “read”,
### and “none”.  The sample settings below are the defaults.
### The password-db option controls the location of the password file
### The authz-db option controls the location of the authorization
### rules for path-based access control.

realm = || Welcome to Subversion Repository ||
anon-access = none
auth-access = write
authz-db = authz
password-db = passwd

root@arun:~#

Step (3) Authentication for svnserve –

root@arun:~# cat /var/repos_base/myrepository/conf/authz
# single user, to a group of users defined in a special [groups]
# section, or to anyone using the ‘*’ wildcard.  Each definition can
# grant read (‘r’) access, read-write (‘rw’) access, or no access (”)

[groups]
svn_admin = arunsb , ravi

# remember here svn name which you mentioned in “dav_svn.conf” file

[myrepository:/]
@svn_admin= rw

[myrepository:/branches]
@svn_admin = rw
santhosh = r

[myrepository:/trunk]
@svn_admin= rw
santhosh = rw

root@arun:~# cat /var/repos_base/myrepository/conf/passwd
### Below it contains one section labelled [users].
### The name and password for each user follow, one account per line.

[users]

arunsb = 1234
ravi   = 1234
santhosh = 12345
root@arun:~#

Step (4) Start svnserve with following command –

root@arun:~# /etc/init.d/svnserve
Usage: /etc/init.d/svnserve  {start|stop|status}
root@arun:~#
root@arun:~# /etc/init.d/svnserve  start
Starting the Subversion service (svnserve)..
log file is /var/log/svnserve.log

Done.
root@arun:~# /etc/init.d/svnserve  status
Subversion service (svnserve) –
Running & pid is 11346
root@arun:~#

root@arun:~# netstat -nlp |  grep svnserve
tcp        0      0 0.0.0.0:3690            0.0.0.0:*               LISTEN      11346/svnserve
root@arun:~#

** HELP ?

root@arun:~# svnserve  –help
usage: svnserve [options]

Valid options:
-d [–daemon]            : daemon mode
–listen-port arg        : listen port (for daemon mode)
–listen-host arg        : listen hostname or IP address (for daemon mode)
–foreground             : run in foreground (useful for debugging)
-h [–help]              : display this help
–version                : show program version information
-i [–inetd]             : inetd mode
-r [–root] arg          : root of directory to serve
-R [–read-only]         : force read only, overriding repository config file
-t [–tunnel]            : tunnel mode
–tunnel-user arg        : tunnel username (default is current uid’s name)
-T [–threads]           : use threads instead of fork
-X [–listen-once]       : listen once (useful for debugging)
–pid-file arg           : write server process ID to file arg

root@arun:~#

Troubleshooting –

arunsb@arun:~$ svn co svn://192.168.0.1/myrepository/trunk/  /tmp/12345
svn: Not authorized to open root of edit operation
arunsb@arun:~$

* please add “anon-access = none” to ‘svnserve.conf’ conf file of your repository…

root@arun:~# vi /var/repos_base/myrepository/conf/svnserve.conf

arunsb@arun:~$ svn co svn://192.168.0.1/myrepository/trunk/   /home/arunsb/working_svn
Authentication realm: <svn://192.168.0.1:3690> ” || Welcome to Subversion Repository ||”
Password for ‘arunsb’:
Checked out revision 2.
arunsb@arun:~$

Thank you,

Arun Bagul

Epoch or Unix timestamp and Date format

Epoch or Unix timestamp and Date format

What is Epoch time ?

Unix time, or POSIX time is also know as Epoch time. Linux/Unix operating systems maintain system time based on some starting time called the Epoch. In Linux/Unix and POSIX systems count time as seconds since midnight Coordinated Universal Time (UTC) of January 1, 1970, not counting leap seconds. It is widely used not only on Unix-like operating systems but also in many other computing systems. Epoch time is in seconds!!

1] How to get Epoch time ?

* Linux / Ubuntu

root@arun:~# date
Wed Jan 28 23:52:12 IST 2009

root@arun:~# date +%s
1233166934
root@arun:~#

* FreeBSD

root@arun:~# date
Wed Jan 28 11:07:10 IST 2009

root@arun:~# date  +%s
1233169634
root@arun:~#

2] How to convert Epoch time into Date format ?

* Linux / Ubuntu

arunsb@arun:~$ date -d ‘1970-01-01 1233167307 sec’
Wed Jan 28 18:28:27 IST 2009
arunsb@arun:~$

* FreeBSD

arunsb@arun:~# date -r 1233169468
Wed Jan 28 11:04:28 IST 2009
arunsb@arun:~#

3] How to convert Date time into Epoch ?

* Linux / Ubuntu

arunsb@arun:~$ date ; date +%s
Thu Jan 29 00:26:48 IST 2009
1233169008
arunsb@arun:~$ date -d ‘Thu Jan 29 00:26:48 IST 2009’ +%s
1233169008
arunsb@arun:~$ date -d ‘Thu Jan 29 00:26:48 IST 2009’ +%s
1233169008
arunsb@arun:~$

* FreeBSD

root@arun:~#  date -j -f ‘%Y-%m-%d %H:%M:%S %Z’ ‘2009-01-29 00:50:04 PST’ +%s
1233219004

root@arun:~#  date -j -f ‘%Y-%m-%d %H:%M:%S %Z’ ‘2009-01-29 00:50:04 GMT’ +%s
1233190204
root@arun:~#

Thanks,
Arun Bagul

टाटा इंडिकॉम Ubuntu Linux पर यूएसबी मॉडेम (Epi Valley)

टाटा इंडिकॉम Ubuntu Linux पर यूएसबी मॉडेम (Epi Valley)

1] मॉडेम क्या है?

मॉडेम (मॉडुलक-demodulator) एक युक्ति है कि एक एनालॉग वाहक संकेत के लिए डिजिटल जानकारी modulates सांकेतिक शब्दों में बदलना है, और भी ऐसी एक वाहक संकेत demodulates को प्रेषित जानकारी व्याख्या करना. वहाँ केबल मोडेम, ADSL मोडेम, ऑप्टिकल मोडेम और USB सेलुलर मोडेम की तरह उपलब्ध मॉडेम के विभिन्न प्रकार हैं.

2] USB सेलुलर मोडेम?

USB (यूनिवर्सल सीरियल बस) सेलुलर मोडेम एक यूएसबी पोर्ट के बजाय एक PCcard या PCMCIA कार्ड (पर्सनल कंप्यूटर मेमोरी कार्ड इंटरनेशनल एसोसिएशन) का उपयोग करें स्लॉट. एक सेलुलर रूटर और एक सेलुलर मॉडेम के बीच अंतर यह है कि एक मोबाइल रूटर आम तौर पर कई लोगों को यह से कनेक्ट करने की अनुमति देता है, जबकि एक मॉडेम कनेक्शन के लिए किया जाता है. एक सेलुलर रूटर है या हो सकता है एक बाह्य datacard नहीं

नोट-मैं SXC का उपयोग कर रहा हूँ 1080 सीडीएमए 1x USB मॉडेम मॉडेम (महामारी घाटी)

3] इसे का उपयोग कैसे करें?

कृपया लेख अधिक जानकारी के लिए http://www.indiangnu.org/2008/tata-indicom-datacard-huawei-cdma-on-linuxubuntu/ देखें. कदम से अधिकांश वही कर रहे हैं …

Ubuntu Linux का उपयोग करें “wvdialconf” कमांड पर ** उत्पन्न करने के विन्यास फाइल और उपयोगकर्ता नाम और कुछ अन्य विकल्प के रूप में जोड़ दिया नीचे …

root@arun:/home/arunsb#wvdialconf

** मेरा wvdial विन्यास फाइल …

root@arun:/home/arunsb# cat   /etc/wvdial.conf

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
Baud = 460800
New PPPD = yes
Modem = /dev/ttyACM0
+FCLASS = 0
ISDN = 0
Phone =#777
Username = internet
Password = internet
# IMP setting
stupid mode = 1
root@arun:/home/arunsb#

** कैसे शुरू / संबंध स्थापित करने के लिए?

root@arun:/home/arunsb# /etc/init.d/tataindicom
उपयोग: / etc / init.d / / tataindicom (शुरू | बंद |) स्थिति

root@arun:/home/arunsb# /etc/init.d/tataindicom  start
टाटा इंडिकॉम datacard सेवा शुरू ..
लॉग फाइल है / var / log / tataindicom.log

हो गया.
root@arun:/home/arunsb#

** एक बार संबंध स्थापित है, तो आप ppp0 इंटरफ़ेस और मार्ग के रूप में प्रमाणित कर सकते नीचे दिखाया गया ….

arunsb@arun:~$ ifconfig
….
… …

ppp0 लिंक encap: प्वाइंट के लिए-Point प्रोटोकॉल
मंत्रिमंडल addr: 219.XX.XX.XX PtP: 172.XX.XX.14 मास्क: 255.255.255.255
POINTOPOINT चलती NOARP बहुस्त्र्पीय MTU उत्तर प्रदेश: 1400 मीट्रिक: 1
RX पैकेट: 31,259 त्रुटि: 124 गिरा 0 overruns: 0 फ्रेम: 0
TX पैकेट: 32,249 त्रुटियाँ:: 0 गिरा 0 overruns: 0 वाहक: 0
collisions: 0 txqueuelen: 3
RX बाइट्स 23928690: (22.8 MB) TX बाइट्स 4,880,834: (4.6 MB)

arunsb@arun:~$

root@arun:/home/arunsb# route -n

… ..

** के लिए “/ etc / init.d / tataindicom फ़ाइल” देखना चाहते हैं?

root@arun:/home/arunsb# cat  /etc/init.d/tataindicom
#!/bin/bash
####
## daemon:: /usr/sbin/pppd  9600 modem crtscts defaultroute usehostname -detach user internet noipdefault call wvdial usepeerdns idle 0 logfd 6
####
case “$1″ in

start)
echo “Starting the TATA Indicom datacard service..”
check=$(ps auxwww | grep “$(which wvdial)” | grep -v grep | awk  ‘{print $2}’)
if [ -z “$check” ];then
/usr/bin/wvdial > /var/log/tataindicom.log 2>&1  &
echo “log file is /var/log/tataindicom.log”
echo “…”
echo “Done.”
else
echo “TATA Indicom datacard service already running [pid = $check]”
fi
;;

stop)
echo “killing pppd daemon and dailer…”
kill -9 $(ps auxwww  |  grep “$(which wvdial)”  | grep -v grep | awk  ‘{print $2}’)
kill -9 $(ps auxwww  |  grep “$(which pppd)”  | grep -v grep | awk  ‘{print $2}’)
echo “…”
echo “Done.”
;;
status)
echo “TATA Indicom datacard -”
pid_of_dailer=$( ps auxwww  |  grep “$(which wvdial)”  | grep -v grep | awk  ‘{print $2}’)
pid_of_pppd=$(ps auxwww  |  grep “$(which pppd)”  | grep -v grep | awk  ‘{print $2}’)
pppd_details=”$(ps auxwww | grep “$(which pppd)” | grep -v grep   | awk -F’pppd’  ‘{print $2}’)”
echo -e “Dailer $(which wvdial) : $pid_of_dailer”
echo -e “pppd daemon $(which pppd) :: $pid_of_pppd   $(which pppd) $pppd_details”
;;
*)
echo “Usage: /etc/init.d/tataindicom {start|stop|status}”
exit 1
esac
exit 0
#DONE
root@arun:/home/arunsb#

** दोस्त का आनंद लें!!

धन्यवाद,
अरुण Bagul

TATA Indicom USB modem (Epi Valley) on Ubuntu Linux

TATA Indicom USB modem (Epi Valley) on Ubuntu Linux

1] What is modem?

Modem (modulator-demodulator) is a device that modulates an analog carrier signal to encode digital information, and also demodulates such a carrier signal to decode the transmitted information. There are different types of modem available like Cable modems, ADSL modems, Optical modems and USB cellular modems.

2] USB cellular modems ?

USB (Universal Serial Bus) cellular modems use a USB port instead of a PCcard or PCMCIA Card (Personal Computer Memory Card International Association) slot. Difference between a cellular router and a cellular modem is that a cellular router normally allows multiple people to connect to it, while the modem is made for one connection. A cellular router may or may not have an external datacard

NOTE- I am using  SXC-1080 CDMA 1x USB MODEM modem (Epi Valley)

3] How to use it ?

Please refer the article http://www.indiangnu.org/2008/tata-indicom-datacard-huawei-cdma-on-linuxubuntu/ for more information. most of the steps are same…

** On Ubuntu Linux use “wvdialconf” command to generate configuration file and add user name and few other options as given below…

root@arun:/home/arunsb# wvdialconf

** My wvdial configuration file…

root@arun:/home/arunsb# cat   /etc/wvdial.conf

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
Baud = 460800
New PPPD = yes
Modem = /dev/ttyACM0
+FCLASS = 0
ISDN = 0
Phone =#777
Username = internet
Password = internet
# IMP setting
stupid mode = 1
root@arun:/home/arunsb#

** HOW to start / establish connection ?

root@arun:/home/arunsb# /etc/init.d/tataindicom
Usage: /etc/init.d/tataindicom {start|stop|status}
root@arun:/home/arunsb# /etc/init.d/tataindicom  start
Starting the TATA Indicom datacard service..
log file is /var/log/tataindicom.log

Done.
root@arun:/home/arunsb#

** Once connection is establish , you can verify the ppp0 interface and  route as shown below….

arunsb@arun:~$ ifconfig
….
……

ppp0 Link encap:Point-to-Point Protocol
inet addr:219.XX.XX.XX  P-t-P:172.XX.XX.14  Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1400  Metric:1
RX packets:31259 errors:124 dropped:0 overruns:0 frame:0
TX packets:32249 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:23928690 (22.8 MB)  TX bytes:4880834 (4.6 MB)

arunsb@arun:~$

root@arun:/home/arunsb# route -n

…..

** Want to see the “/etc/init.d/tataindicom” file?

root@arun:/home/arunsb# cat  /etc/init.d/tataindicom
#!/bin/bash
####
## daemon:: /usr/sbin/pppd  9600 modem crtscts defaultroute usehostname -detach user internet noipdefault call wvdial usepeerdns idle 0 logfd 6
####
case “$1” in

start)
echo “Starting the TATA Indicom datacard service..”
check=$(ps auxwww | grep “$(which wvdial)” | grep -v grep | awk  ‘{print $2}’)
if [ -z “$check” ];then
/usr/bin/wvdial > /var/log/tataindicom.log 2>&1  &
echo “log file is /var/log/tataindicom.log”
echo “…”
echo “Done.”
else
echo “TATA Indicom datacard service already running [pid = $check]”
fi
;;

stop)
echo “killing pppd daemon and dailer…”
kill -9 $(ps auxwww  |  grep “$(which wvdial)”  | grep -v grep | awk  ‘{print $2}’)
kill -9 $(ps auxwww  |  grep “$(which pppd)”  | grep -v grep | awk  ‘{print $2}’)
echo “…”
echo “Done.”
;;
status)
echo “TATA Indicom datacard -”
pid_of_dailer=$( ps auxwww  |  grep “$(which wvdial)”  | grep -v grep | awk  ‘{print $2}’)
pid_of_pppd=$(ps auxwww  |  grep “$(which pppd)”  | grep -v grep | awk  ‘{print $2}’)
pppd_details=”$(ps auxwww | grep “$(which pppd)” | grep -v grep   | awk -F’pppd’  ‘{print $2}’)”
echo -e “Dailer $(which wvdial) : $pid_of_dailer”
echo -e “pppd daemon $(which pppd) :: $pid_of_pppd   $(which pppd) $pppd_details”
;;
*)
echo “Usage: /etc/init.d/tataindicom {start|stop|status}”
exit 1
esac
exit 0
#DONE
root@arun:/home/arunsb#

**  Enjoy buddy!!!

Thank you,
Arun Bagul

How to convert nero image to iso image and extract iso image

How to convert nero image to iso image and extract iso image

Introduction –

nrg2iso is handy tool to convert Nero Image to ISO image

* How to install nrg2iso on Ubuntu Linux –

root@arun:~# apt-get  install   nrg2iso
root@arun:~/oracle-setup# nrg2iso -h
Nrg2Iso v0.4 by G. Kokanosky
released under the GNU GPL v2 or later

Usage :
nrg2iso image.nrg   image.iso

–version    display version number
–help       display this notice

root@arun:~/oracle-setup#

* How to use it ? –

root@arun:~/oracle-setup# ls
ora92linux.nrg
root@arun:~/oracle-setup#

root@arun:~/oracle-setup# nrg2iso ora92linux.nrg  ora92linux.iso
|==============================>[100%]
ora92linux.iso written : 680659100 bytes
root@arun:~/oracle-setup#

root@arun:~/oracle-setup# ls *.iso
ora92linux.iso
root@arun:~/oracle-setup#

* Now ISO image is ready, we can mount ISO image to extract the data as shown below….
root@arun:~/oracle-setup# mount -o loop  ora92linux.iso   /tmp/mount-iso/
root@arun:~/oracle-setup#

root@arun:~/oracle-setup# cd  /tmp/mount-iso/
root@arun:/tmp/mount-iso# ls
doc  index.htm  install  lgto  response  runInstaller  stage
root@arun:/tmp/mount-iso#

root@arun:/tmp/mount-iso# ls
doc  index.htm  install  lgto  response  runInstaller  stage

* Enjoy!! – you can copy the extracted data where ever you want!!

root@arun:/tmp/mount-iso# cp -fr * /root/oracle-setup/oracle-1/
root@arun:/tmp/mount-iso#

root@arun:~/oracle-setup# mount
/root/oracle-setup/ora92linux2.iso  on  /tmp/mount-iso type iso9660 (rw,loop=/dev/loop0)
root@arun:~/oracle-setup#

* Un-mount to ISO image –

root@arun:/tmp/mount-iso# cd  /
root@arun:/# umount /tmp/mount-iso/
root@arun:/#

Thank you,

Arun Bagul

Oracle DB 10.2g installation on Ubuntu Linux

Oracle DB 10.2g installation on Ubuntu Linux

Introduction –

Oracle Database is widely used commercial Database on Unix/Linux and Windows platform….
This article explain the step by step installation of Oracle 10g Release 2.0 on Ubuntu 8.04111!!
Please refer the Oracle installation guide for System requirement…

1] Hardware requirement –

RAM – minimum 1024 MB of physical memory
Disk space -1.5 GB  to 3.5 GB of disk space, depends on the installation…
Minimum 400 MB of disk space in the /tmp directory

arunsb@arun:~$ free  -m
arunsb@arun:~$ df -h
arunsb@arun:~$ df -h /tmp

2] Software dependency –

Make sure that following packages are installed on your system!!

make-3.8
gcc-4.2
libdb4.2
libdb4.2++-dev
libstdc++6
libstdc++6-4.2-dev
libmotif-dev
libmotif3

root@arun:~# apt-get install  build-essential libc6-dev  libmotif-dev  libmotif3
root@arun:~# apt-get install  xauth libxp6 libxt6 libxtst6 libaio1  glibc-source
root@arun:~# apt-get install  rpm

root@arun:~# ln -s /usr/bin/awk   /bin/awk
root@arun:~# ln -s /usr/bin/basename     /bin/basename
root@arun:~# ln -s /usr/bin/rpm    /bin/rpm

root@arun:~# dpkg -l

3] Operating System Groups and Users for Oracle –

* oinstall – Oracle Inventory group
* dba       – The OS DBA group
* oracle   – Oracle software owner  (in mycase arunsb is oracle user)

root@arun:~# id oracle
id: oracle: No such user
root@arun:~#
root@arun:~# grep oinstall /etc/group
root@arun:~# grep dba  /etc/group

NOTE – “oinstall” should be primary group of oracle user. It is not necessary to use “oracle” as username, you can name but make sure that the “oinstall” is primary group of that user!!

root@arun:~# addgroup oinstall
Adding group ‘oinstall’ (GID 1001) …
Done.
root@arun:~#

root@arun:~# addgroup  dba
Adding group `dba’ (GID 1002) …
Done.
root@arun:~#

root@arun:~# addgroup nobody
Adding group `nobody’ (GID 1000) …
Done.
root@arun:~#

root@arun:~# useradd -g oinstall -G dba   arunsb
root@arun:~#

root@arun:~# id arunsb
uid=1000(arunsb) gid=1001(oinstall) groups=1001(oinstall),1002(dba)
root@arun:~#

*** other setting –

root@arun:~# echo “Red Hat Linux release 3.0 (drupal)” > /etc/redhat-release

root@arun:~# cat /etc/redhat-release
Red Hat Linux release 3.0 (drupal)
root@arun:~#

4] Configure Kernel Parameters –

Add following kernel variable value as shown below in sysctl.conf file, then run command “sysctl -p” to update the setting…
root@arun:~# tail -n 16  /etc/sysctl.conf
###############################
## Adding setting for oracle 10g

kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144

##############################
root@arun:~#

* Use below command to set above kernel variables…

root@arun:~# sysctl -p

5] Oracle user profile and envirnoment –

Update /etc/security/limits.conf file as shown below….

root@arun:~# vi /etc/security/limits.conf
root@arun:~# tail  /etc/security/limits.conf
#######################
## Added for arunsb (oracle user)

arunsb soft nproc 2047
arunsb hard nproc 16384
arunsb soft nofile 1024
arunsb hard nofile 65536

#######################
#
root@arun:~#

Add following setting in /etc/pam.d/login file
root@arun:~# vi /etc/pam.d/login

###################################
# oracle user –
session    required   pam_limits.so
###################################

** set envirnoment variables in user profile file “/home/arunsb/.bashrc”  as shown below

arunsb@arun:~$ tail  /home/arunsb/.bashrc
###########################
# Setting for Oracle 10g
export DISPLAY=”:0.0″
export ORACLE_OWNER=arunsb
export ORACLE_BASE=/u01/app
export ORACLE_HOME=/u01/app/product/10.2.0/db_1
export ORACLE_HOSTNAME=arun.mylaptop.com
PATH=$PATH:/u01/app/product/10.2.0/db_1/bin

##########################
#
arunsb@arun:~$

6] Oracle inventory and installation setting –

you need to create oralce Inventory director where Oracle stores all information about oralce software installed on your system. Also use same direcory
for oracle installation make sure to set proper path in  user profile file ie .barshrc

root@arun:~# mkdir -p  /u01/app/oraInventory
root@arun:~# ls -ld /u01/app/oraInventory
drwxr-xr-x 2 root root 4096 2008-11-23 22:57 /u01/app/oraInventory
root@arun:~# chown arunsb:oinstall -R /u01/app/oraInventory
root@arun:~# ls -ld /u01/app/oraInventory
drwxr-xr-x 2 arunsb oinstall 4096 2008-11-23 22:57 /u01/app/oraInventory
root@arun:~#

arunsb@arun:~$ mkdir -p /u01/app/product/10.2.0/db_1

7] It’s  time to install Oracle –

arunsb@arun:/root/oracle-setup/oracle_server-10g$ ./runInstaller
Starting Oracle Universal Installer…

In between installation you need to run following shell scripts as root user…..

root@arun:~# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory to 770.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete
root@arun:~# /u01/app/product/10.2.0/db_1/root.sh
Running Oracle10 root.sh script…

The following environment variables are set as:
ORACLE_OWNER= arunsb
ORACLE_HOME=  /u01/app/product/10.2.0/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin …
Copying oraenv to /usr/local/bin …
Copying coraenv to /usr/local/bin …
Creating /etc/oratab file…
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
root@arun:~#

8] Errors during installation –

NOTE – Installation failed many times with following ERRORs … please don’t forget to create soft link for awk , basename , rpm

Exception Name: MakefileException
Exception String: Error in invoking target ‘ntcontab.o’ of makefile

Exception Name: MakefileException
Exception String: Error in invoking target ‘utilities ctx_on’ of makefile

=================================================
The following J2EE Applications have been deployed and are accessible at the URLs listed below.

iSQL*Plus URL:
http://arun.mylaptop.com:5560/isqlplus
iSQL*Plus DBA URL:
http://arun.mylaptop.com:5560/isqlplus/dba
Oracle Enterprise manager URL
http://arun.mylaptop.com:5560/isqlplus/dba
=================================================

Thank you,
Arun Bagul