1. Preparation:
View space remaining generally prepared at least 5G
2. View the swap partition size
Minimum 400M
3. Build User
Groupadd dba-g groupadd oinstall-g useradd oracle-u -110-g 110-g-passwd
Oracle--stdin
4. Set Parameters
Su-oracle
Vi. Bash_profile
Export oracle_base=/u01/oracle
export oracle_home= $ORACLE _base/10g
export ORACLE_SID=ORCL
path=$ PATH: $HOME/bin: $ORACLE _home/bin
5. Permissions
Su
mkdir/u01/oracle
chown oracle:oinstall/u01/oracle/-R
6. Modify System Parameters
Sysctl-a|grep sem|sed ' S/32/100/2 ' >>/etc/sysctl.conf
sysctl-a|grep ip_local|sed-e ' s/32768/1024 '-e ' s/61/ 65/' >>/etc/sysctl.conf
sysctl-a|grep rmem_d|sed ' s/109568/262144 ' >>/etc/sysctl.conf
sysctl-a |grep rmem_ma|sed ' s/131071/262144 ' >>/etc/sysctl.conf
sysctl-a|grep wmem_ma|sed ' s/131071/262144 ' > >/etc/sysctl.conf
sysctl-a|grep wmem_de|sed ' s/109568/262144 ' >>/etc/sysctl.conf
sysctl-a|grep File-m|sed ' s/83702/65536 ' >>/etc/sysctl.conf
sysctl-p
7. Installation
Xhost +
su-oracle
runinstall
8. Problem solving
Install interface garbled problem
Orcale User:
[oracle@~]$ export lc_ctype= "en_US. UTF-8 "
Version issues
Modify the version in/etc/redhat-release to a lower version (Redhat 4.X)
Xhost + Error
Most simply, log off the current user, log on with an Oracle user, and install
9. Starting and closing
Query the current state of the database:
>select Open_mode from V$database;
Oracle Not available -------Oracle does not boot instance
Oracle not mounted-------Oracle mounted Oracle in Nomount phase -------Oracle in the Mount phase
Oracle Read write -------Oracle in the open phase
9.1.sqlplus
Start instance phase Nomount--------------
>startup [Force] [pfile=xxx] nomount;
Check parameter file error Spfilesid.ora---spfile.ora---initsid.ora
View the parameter file used >show parameter spfile is not NULL to start SPFile, otherwise it is pfile
Allocating memory
Log information to alert files and trace files
#tail-F/u01/oracle/admin/orcl/bdump/alert_orcl.log
Start background process
To see if the database starts #ps-ef|grep Ora_
"Set parameters at this stage"
[startup restrict to a restricted session, operation of the database without allowing others to connect]
Load Database phase
DB Mount------------------>alter database mount;
The associated database and the current instance
Locate and open the control file specified in the parameter file
Control file
>show parameter control_file;
Read control file gets the name and status of the data file and redo log file, but does not check for existence
"This phase can operate the database physical operations: ALTER DATABASE, database delete, restore databases, name data files, enable disable logging"
Open the database phase---------------
Determine whether the data file and log file exist, open, and check the consistency of the database
Open online data files and log files
"Operation of database data at this stage"
Close the database phase---------------
>shutdown [Normal|transactional|immediate|abort]
Writes a buffer to the changes in the cache and the entries in the Redo log buffer cache to the data file and the online redo log file
Close data files and redo log files
Unload database
Close Control File
Close instance
Alter file and trace file shutdown
SGA Recycling, background process termination
Shutdown [Normal|transactional|immediate|abort]
Abort not consistent shutdown
9.2.dbstart & Dbshut
Vi/etc/oratab the last field in the database is Y in order to control through Dbstart and Dbshut
VI $ORACLE The value of Oracle_home_listner in _home/bin/dbstart is $oracle_home, start listening
Attach: Oracle Boot
Head-n 6/etc/init.d/network >/etc/init.d/oracle10g
vi/etc/init.d/oracle10g
oracle_home=/u01/oracle/10g
If [!-f $ORACLE _home/bin/dbstart]
then
echo "Oracle cannot start"
exit
fi
if [!-f $ORACLE _home/bin/lsnrctl]
then
echo "Lsnrctl cannot start"
exit
fi
Case "in
' start ')
echo" Starting Oracle 10g ... "
su-oracle-c" $ORACLE _home/bin/dbstart "
#su- Oracle-c "$ORACLE _home/bin/emctl start dbconsole"------>start OEM
;;
' Stop ')
echo "Stopping Oracle 10g ..."
#su-oracle-c "$ORACLE _home/bin/emctl stop dbconsole"------>stop OE M
su-oracle-c "$ORACLE _home/bin/dbshut"
;;
*)
echo "Usage $0:start|stop"
;;
Esac
chmod a+x/etc/init.d/oracle10g chkconfig oracle10g on