Вы находитесь на странице: 1из 8

Install the vm ware New Virtual Machine Installation option ---- Custom Virtual Machine Format ---- New

workstation v5 Guest Operating System ---- Linux and verion Red Had Linux Name the Virtual Machine ---- OraTraining Virtual Machine Location ---- drive path where you need to have the virtual mach ine files. Memory for the Virual Machine ---- 1 GB (or one third of the host's ram) Network Type --- NAT (if you have Static IP over the internet then use bridge ne tworking) Select I/O Adapter Types ---- SCSI Adapters ... LSI Logic Select a Disk ---- Create New Virtual Disk Select a Disk Type --- SCSI Disk Capacity --- atleast 10GB for oracle installaiton + patch installation etc. ... and also split disk into 2GB files. Specify Disk File ---- leave it as Finish -----------------------------------------Linux Installation After installation on VMware, Put your linux cd in the cddrive or iso image path in the vmware cdrom Start the vm ware --- it will automatically start the Linux Installation Skip the media test Language selection --- English Keyboard Configuration --- English Installation Type -- -SERVER Disk partitioning --- Manual Druid Disk setup (make atleast 3 partitions) 1. /boot between 1 gb to 2 gb 2. swap double of vm ram 3. / whatever is remaining make it as root in the above setting CLICK ON FORCE TO BE A PRIMARY PARTITION Networ Configuration (leave as it) Select No Firewall Addition Language --- English Time Zone Selection --- Dubai Set Root Password Package Group Selection Desktop select Gnome or KDE Application Editors Graphical Internet Development Development Tools ---> in the details select all the packages starting w ith g. Xsoftware GNome Software Development System

System Tools ---> in the details select sysstat vnc Click Next to start installation After installation it will reboot. After reboot --- agree the licenec to proceed Set Date and Time Set Display Settings Provide System user information Leave Sound Card settings Leave Additional Cds Installation Finish Setup ----------------------------------------------------------checking linux os and kernal version how to see the rethad version cat /etc/redhat-release uname -a show all kernal related thing uname -r show the kernal version du -s foldername will show the activity (size wise) of the selected folder xclock is a command to check the graphical access to a specific user.

----------------------------------------------------------------------------Pre- Requisits for Oracle Installation checking ram, swap file and disk space grep MemTotal /proc/meminfo grep SwapTotal /proc/meminfo df -h will show the space in the drive -----------------------------------------------------------------------------------------------------------------------Checking Network ------------------------------------------------------------# ifconfig -a -------->> see your IP Address in eth0. or run the following command to see your hostname and IP etc # system-config-network if you need to change something in hostname or IP you need to restart the networ k service # service network restart edit the hosts file and enter the ip and host name in the file

#vi /etc/hosts save the file and ping the system by your hostname to check the hosts file entry . the linux server should be ping from the Host machine ping ipaddress ---- it will work ping vmserver ---- it will not work we need to add the entry in the host file on xp c:\windows\system32\drivers\etc\hosts in the hosts file put the ip and vmserver name and ping the server by the name i t should work. -----------------------------------------------------------------create one group <dba> # groupadd dba Create one user <oracle> # useradd -g dba oracle After creating the oracle user set its password by # passwd oracle ftt123 ------------------------------------------------------------------Folder for oracle installation ------------------------------------------------------------------# mkdir ora01 # ls to see newly created folder's permissions it should be under oracle user with db a group Change the permission on the ora01 folder chown -R oracle:dba ora01 after giving the ownership to oracle make the following directories as cd ora01 mkdir -p product/10.2.0/db_1 this is the complete oracle home after running the chown command the permissions will change to oralce:dba, -R is for recursive change means whatever new folder will be create in ora01 it will inherit the permission from the ora01 folder. in the ora01 we will use it as oracle home. If we need to run the setup from some folder (not from cd) then create another f older to containg the uninstall package of the oracle software. in our case i have orainstaller folder to put installion packages. Transfer the oraclepackage to Linux /orainstaller directory from xp (i used wins cp utility to do this)

Unzip the package by #su - oracle $ cd database ls you will find the transferred package in the folder $unzip packagename and press enter it will unzip the package in oraInstaller file in database directory $ ./runInstaller to run the setup -------------------------------------------------------------------Kernal setting and limits parameter settings open the /etc/sysctl.conf file #vi /etc/sysctl.conf and add the following configuraitons kernel.shmall = 2097152 kernel.shmmax = 536870912 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=262144 net.core.wmem_default=262144 net.core.rmem_max=262144 net.core.wmem_max=262144 after saving the file rebuild the kernal for taking effect of these parameters by /sbin/sysctl -p ---------------------see the current limits by ulimit -a for the limits parameter open the /etc/security/limits.conf file #vi /etc/security/limits.conf and add oracle soft oracle hard oracle soft oracle hard nproc 2047 nproc 16384 nofile 1024 nofile 65536

lines in the file and save the file. --------------------------------------------------------------------oracle user environment setting

open the .bash_profile file /home/oracle/.bash_profile and add the following lines ORACLE_BASE=/ora01;export ORACLE_BASE ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME ORACLE_SID=FTT; export ORACLE_SID ORACLE_TERM=xterm; 0export ORACLE_TERM PATH=/usr/sbin:$PATH; export PATH PATH=$ORACLE_HOME/bin:$PATH; export PATH after saving the .bash_profie run the following command to execute the .bash_pro file script $sh .bash_profile --------------------------------------------------------------------Oracle Installation for installation oralce it is better to logout from linux and relogin with ORaCl e user go to the directory where the uninstall version is placed and run the setup as $./runInstaller in the finishing stage oracle requires to run two scripts 1. ./ora01/oraInventory/orainstRoot.sh 2. ./ora01/product/10.2.0/db_1/root.ch and then click on the finish button the installer will run in the database creation put the SID name mentioned in th e user prfile . ---------------------------------------------------------running DBCA when the Oracle software is installed then run the DBCA to create the database, $pwd $cd $ORACLE_HOME $cd bin ./dbca do the appropiate step to compelete the database creation ---------------------------------------------------------starting and stoping the enterprice manager service emctl start dbconsole emctl stop dbconsole it is better to stop and start the service after any change in listener or after creating/installation of oracle ---------------------------------------------------------starting and stoping listener

lsnrctl lsnrctl> start listenere listenername lsnrctl> stop listenere listenername lsnrctl> reload listenere listenername -------------------------------------------------------Creating Listener netmgr name the listener Add Listening Location provide the default port e.g., 1521 if available <<<<< checking the availability by netstat -an |grep 1521 if the command gives result it means the port is in use otherwise available. >>>>> add database services after creating the listener we can see the file at the following location /oracle/db/network/admin/listener.ora CLI for listnere which lsnrctl lsnrctl status listener lsnrctl stop listenere listnerename lsnrctl start listener listenername ---------------------------------------------------createing tns service In Client syste we have TNS that hits the listener on the server to connect the database. netmgr assign any name for the tnsservice provide hostname and port for the service prive SID as service name and test the service we can also ping the newly created service by tnsping servicename it should resolve the service name. TNS = use global database name Listener= use SID --------------------------------check the version of the datbase when the database is down open the following file cat oracle\oraInventory\contentsXML\inventory.xml --------------------------------------------------------------------

VNCSERVER run the vncserver on the linux machine it will generate a new desktop code on the other machine run the vnc client and provide the vncserver generated code the client will connect to the server. ----------------------------isqlplys application server to start run the following command isqlplusctl start isqlplusctl stop to check whether it is working run following in the browser http://machine_name:5560/isqlplus/ if you need to run as dba then http://machine_name:5560/isqlplus/dba ---------------------------------------------Working on control files ------------------------------------------------alter database backup controlfile to trace alter database backup controlfile to trace as '/software/twinscontrolfile.txt' recovery of database when all the cotrol files are lost and we have backup of th e control file and the datbase was shutdown normally. step for demo Startup the datbase by SQL> Startup SQL> alter database backup controlfile to trace > select * from v$log; for getting the currnet log information > alter system switch logfile and the operaing system level remove all the control files to see there path run the following > select name from v$controlfile # rm -r /ora01/oradata/TWINS/cont*.* > alter system switch logfile; (multiple times) > shutdown immediate the database will shutdown normally now try to open the database > startup it will come to nomount but will not mount you can see the bdump alert log for the reason recreating the control file from the backup file. from the backuptrace file copy the syntex from > create controlfile reuse database .... to Chracter set we8iso8859pi the control file will create

now we can open the database; alter database open; this was the database recovery without the noresetlogs; we can confirm the database reincarnation by the followings select * from v$database_reincarnation; ---------------------------------------------------------it will generate the controlfile in the udump directory use ls -lrt to see the f resh file.

-------------------------------------------------all the errors while instance startup and down are dumped in the dump directory the name of the file will be alert_instancename.log -----------------------------------------------------------------

Вам также может понравиться