{"id":1022,"date":"2012-08-15T15:44:38","date_gmt":"2012-08-15T07:44:38","guid":{"rendered":"http:\/\/rmohan.com\/?p=1022"},"modified":"2012-08-15T17:08:01","modified_gmt":"2012-08-15T09:08:01","slug":"how-to-setup-oracle-11g-db","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=1022","title":{"rendered":"How to setup Oracle 11g DB"},"content":{"rendered":"<div>To install Oracle 11g DB,\u00a0 just install the following packages at the startup and continue<\/div>\n<p># yum install binutils gcc glibc glibc-devel cpp make setarch pdksh libaio libaio-devel compat-gcc-34 compat-gcc-34-c compat-libstdc-296 compat-libstdc-33 sysstat -y<\/p>\n<div>Creating groups and user for Oracle Installation:<\/div>\n<p># groupadd oinstall<br \/>\n# groupadd dba<br \/>\n# useradd -m -g oinstall -G dba -d \/home\/oracle -s \/bin\/bash -c\u00a0 &#8220;Oracle Software Owner&#8221; oracle<br \/>\n# passwd oracle<\/p>\n<div>Installing Oracle DB:<\/div>\n<p># mv 11g package to \/home\/oracle<br \/>\n# cd \/home\/oracle<br \/>\n# chown oracle *<br \/>\n# cd<\/p>\n<p>Now as oracle user execute the installation script<\/p>\n<p># xhost +<br \/>\n# su &#8211; oracle<br \/>\nunzip both the packages, after unzip it, a folder called &#8220;database&#8221; is created.<\/p>\n<p># cd database<br \/>\n# .\/runInstaller<\/p>\n<p>a graphical window will appear, Let me tell what all options to select in each window<\/p>\n<div><\/div>\n<div>1st window:-Next2nd Window:-<\/p>\n<p>select Create and configure a database<\/p>\n<p>3rd Window:-<\/p>\n<p>select Server Class<\/p>\n<p>4th Window:-<\/p>\n<p>Single Instance database Installation<\/p>\n<p>5th Window:-<\/p>\n<p>Advanced Install<\/p>\n<p>6th Window:-<\/p>\n<p>select the language to install(english)<\/p>\n<p>7th Window:-<\/p>\n<p>enterprise edition<\/p>\n<p>8th Window:-<\/p>\n<\/div>\n<div><\/div>\n<div>Oracle Base:-<br \/>\n\/home\/oracle\/app\/oracleSoftware Location:-<br \/>\n\/home\/oracle\/app\/oracle\/product\/11.2.0\/dbhome_1<\/div>\n<div><\/div>\n<div>9th Window:-Inventory Directory:-<br \/>\n\/home\/oracle\/app\/oraInventoryInventory Group name:-<br \/>\noinstall<\/p>\n<p>10th Window:-<\/p>\n<p>General Purpose<\/p>\n<p>11th Window:-<\/p>\n<p>Global Database Name:-<br \/>\norcl<\/p>\n<p>SID<br \/>\norcl<\/p>\n<p>12th Window:-<\/p>\n<p>select all default characters<\/p>\n<p>13th Window:-<\/p>\n<p>default option<\/p>\n<p>14th Window:-<\/p>\n<p>File System: \/home\/oracle\/app\/oracle\/oradata<\/p>\n<p>15th Window:-<\/p>\n<p>Do not enable Automated Backup<\/p>\n<p>16th Window:-<\/p>\n<p>use same password for all accounts: oracle<\/p>\n<p>17th Window:-<\/p>\n<p>DataBase Administrator group:- dba<br \/>\nDataBase Operator group:- oinstall<\/p>\n<p>18th Window:-<\/p>\n<p>if any error comes run the script and if packages error comes install those packages using yum.<\/p>\n<div>\u00a0fix and check again (tab) \/ and install packages needed using yum<\/div>\n<div><\/div>\n<div>[<br \/>\nSetting Kernel Parameters&#8230;<br \/>\nfs.file-max = 65536<br \/>\nfs.file-max = 6815744<br \/>\nnet.ipv4.ip_local_port_range = 9000 65500<br \/>\nnet.core.rmem_max = 1048576<br \/>\nnet.core.rmem_max = 4194304<br \/>\nnet.core.wmem_max = 262144<br \/>\nnet.core.wmem_max = 1048576<br \/>\nfs.aio-max-nr = 1048576<br \/>\n]<\/div>\n<p>19th Window:-<\/p>\n<p>finish, installation start<\/p>\n<p>20th Window:-<\/p>\n<p>installing<\/p>\n<p>21th Window:-<\/p>\n<p>close<\/p>\n<p>Connecting to the Database, Now reboot server and login as oracle user. To login to our database, we run sqlplus. But before it, set Environment Variables. Add the below lines to .bash_profile file in the \/home\/oracle directory.<\/p>\n<p># su \u2013 oracle\u00a0 [ login as oracle user ]<\/p>\n<p>Then export Oracle Path:- ( for 11g )<\/p>\n<p>vim .bash_profile<br \/>\nvim \/etc\/profile<\/p>\n<\/div>\n<div><\/div>\n<p>Then export Oracle Path:-<\/p>\n<div><\/div>\n<p>export ORACLE_BASE=\/home\/oracle\/app\/oracle<br \/>\nexport ORACLE_HOME=$ORACLE_BASE\/product\/11.2.0\/dbhome_1<br \/>\nexport ORACLE_SID=orcl<br \/>\nexport PATH=$PATH:$ORACLE_HOME\/bin<br \/>\nexport LD_LIBRARY_PATH=$ORACLE_HOME\/lib:\/lib:\/usr\/lib<br \/>\nexport PATH=$ORACLE_HOME\/bin:$PATH<\/p>\n<div>This will Complete the basic steps in Oracle DB setup.<\/div>\n<div><\/div>\n<p>Now you can start the database.<\/p>\n<p>$ lsnrctl start<\/p>\n<div>The above command starts the database listener. Below command starts the database<\/div>\n<div><\/div>\n<div>$ dbstart[ \/etc\/oratab<\/div>\n<div>orcl:\/home\/oracle\/oracle\/product\/10.2.0\/db_1:Y ( change N to Y ) ]To start the Oracle Enterprise Manager execute the below command.<\/div>\n<div><\/div>\n<div>$ emctl start dbconsole<\/div>\n<div><\/div>\n<div>Now open a new terminal and access the newly created database using<br \/>\nsqlplus as oracle user.[ # su \u2013 oracle ]<\/div>\n<div><\/div>\n<div><\/div>\n<div><\/div>\n<div><\/div>\n<div>$ sqlplus system\/oracle@orcl<\/div>\n<div>NOTE : oracle is the password set for the newly created database during installation<\/div>\n","protected":false},"excerpt":{"rendered":"<p>To install Oracle 11g DB, just install the following packages at the startup and continue <\/p>\n<p># yum install binutils gcc glibc glibc-devel cpp make setarch pdksh libaio libaio-devel compat-gcc-34 compat-gcc-34-c compat-libstdc-296 compat-libstdc-33 sysstat -y<\/p>\n<p> Creating groups and user for Oracle Installation: <\/p>\n<p># groupadd oinstall # groupadd dba # useradd -m -g oinstall -G dba -d [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/1022"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1022"}],"version-history":[{"count":4,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/1022\/revisions"}],"predecessor-version":[{"id":1024,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/1022\/revisions\/1024"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1022"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1022"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1022"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}