Hardware configuration
Memory: ≥1g
Hard disk space: ≥10g
Upload oracle11g installation package:
Putty with WCW User Login, upload Oracle installation files to/HOME/WCW directory via FTP service
#unzip Linux_11gr2_database_1of2.zip
#unzip Linux_11gr2_database_2of2.zip
To check and install the required packages for Oracle Data installation:
Binutils-2.17.50.0.6-14.el5
compat-libstdc++-33-3.2.3-61
Elfutils-libelf-0.137-3.el5
Elfutils-libelf-devel-0.137-3.el5
Elfutils-libelf-devel-static-0.137-3.el5
Gcc-4.1.2-48.el5
Gcc-c++-4.1.2-48.el5
Glibc-2.5-24
glibc-common-2.5-49
glibc-devel-2.5-49
glibc-headers-2.5-49
Kernel-headers-2.6.18-194.el5
Ksh-20100202-1.el5
Libaio-0.3.106-5
Libaio-devel-0.3.106-5
Libgcc-4.1.2-48.el5
libgomp-4.1.2
Libstdc++-4.1.2-48.el5
Libstdc++-devel-4.1.2-48.el5
Make-3.81-3.el5
Sysstat-7.0.2-3.el5
unixodbc-2.2.11-7.1
unixodbc-devel-2.2.11-7.1
Installation configuration:
To determine whether the required packages are installed, enter a command similar to the following:
# Rpm–qa |grep package_name
for Linux Configuring Kernel Parameters
Edit the/etc/sysctl.conf file, and add the last line as shown below
#vi/etc/sysctl.conf (the kernel.shmall kernel.shmmax option defined in the text is commented out with the # number)
Kernel.shmall = 2097152
Kernel.shmmax = 536870912
Kernel.shmmni = 4096
Kernel.sem = 250 32000 100 128
FS.AIO-MAX-NR = 1048576
Fs.file-max = 6815744
Net.ipv4.ip_local_port_range = 9000 65500
Net.core.rmem_default = 262144
Net.core.rmem_max = 4194304
Net.core.wmem_default = 262144
Net.core.wmem_max = 1048586
Enter the following command to change the current value of the kernel parameter so that the current modified kernel parameter takes effect immediately
# sysctl–p
Oracle Software Installation User checks resource limits
#vi/etc/security/limits.conf The resource limit in the installation owner profile (add the following on the last line)
* Soft Nproc 2047
* Hard Nproc 16384
* Soft Nofile 1024
* Hard Nofile 65536
* Soft Stack 10240
Configuration Oracel User Shell Limit
Add the following to /etc/pam.d/login
#vi/etc/pam.d/login Add the following to the bottom of the section
Session required/lib/security/pam_limits.so
Session Required Pam_limits.so
Add the following content to /etc/profile
#vi/etc/profile last line input
if [$USER = "Oracle"]; Then
if [$SHELL = "/bin/ksh"]; Then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Fi
Add the following to/etc/csh.login
#vi/etc/csh.login Add the following:
if ($USER = = "Oracle") Then
Limit Maxproc 16384
Limit deors 65536
endif
Create the required operating system groups and users:
Create an Oracle Database installation group
#groupadd Oinstall
Create a OSDBA group for the database installation, that is, the database Administrators group
#groupadd DBA
Create an Oracle user and join the user to the primary group Oinstall and the secondary group DBA
#useradd-M-G oinstall-g dba Oracle
To set the password for an Oracle User:
# passwd Oracle
Create Oracle installation directory
You must identify or create the following directories for Oracle software:
Oracle Database Base Catalog
# mkdir–p/u01/app/oracle
Oracle Product Inventory directory (this directory is best not in the base directory)
# mkdir–p/u01/app/oralnventory
Gives Oracle and group Oinstall permissions to the created directory
# Chown-r oracle:oinstall/u01/app/oracle/
# Chmod-r 775/u01/app/oracle/
# Chown-r oracle:oinstall/u01/app/oralnventory/
# Chmod-r 775/u01/app/oralnventory/
#chown-R Oracle:oinstall/u01/app
#chmod-R 775/u01/app
The software is placed in the/home/wcwdatabase directory, so you want to assign access rights to it
#chmod-R 777/HOME/WCW
Assign/home/wcw/database directory permissions to Oracle and Oinstall groups
Chown-r Oracle:oinstall/home/wcw/database
Modify Host name
#vi/etc/hosts Add the following on the last line
192.168.96.129 Wcw.met DBServer
Look through the following code:
#service Network Restart
#hostname
Set Oracle User's environment variables
#vi/home/oracle/.bash_profie Add the following:
# Oracle Settings
tmp=/tmp; Export TMP
Tmpdir= $TMP; Export TMPDIR
Oracle_base=/u01/app/oracle; Export Oracle_base
Oracle_home= $ORACLE _base/product/11.2.0/dbhome_1; Export Oracle_home
ORACLE_SID=ORCL; Export Oracle_sid
Oracle_term=xterm; Export Oracle_term
Path=/usr/sbin: $PATH; Export PATH
Path= $ORACLE _home/bin: $PATH; Export PATH
Ld_library_path= $ORACLE _home/lib:/lib:/usr/lib; Export Ld_library_path
Classpath= $ORACLE _home/jre: $ORACLE _home/jlib: $ORACLE _home/rdbms/jlib; Export CLASSPATH
To make an environment variable effective:
#source/home/oracle/.bash_profile
Installing the ORACLE11G Database
#cd/home/wcw/database
#export display= "192.168.96.1:0.0"
#export lc_ctype=c.iso88591
#./rurinstaller
The Oracle graphics Configuration interface will pop up shortly after performing the installation
When OK is confirmed, the Execute configuration script option pops up
Execute/u01/app/orlnventory/orainstroot.sh script with root user
#su –root
#/u01/app/orlnventory/orainstroot.sh
Execute/u01/app/oracle/product/11.2.0/db_1/root.sh script with root user
#su-root
#/u01/app/oracle/product/11.2.0/db_1/root.sh
OK after execution, finally close the graphical interface to complete the installation
At this point ORACLE11GR2 installation configuration is complete
start a DB instance
Start Oracle steps under Linux
1. Go to Sqlplus Launch instance
[[email protected] ~]$ su-oracle--"Switch to Oracle User"
2.[[email protected] ~]$ lsnrctl Start--"turn on Listening"
3.[[email protected] ~]$ sqlplus/nolog--"Go to Sqlplus"
4.sql> conn/as SYSDBA--"Connect to SYSDBA"
5.sql> Startup--"Start db instance"
6.sql> shutdown Immediate--"close db instance"
7.[[email protected] ~]$ lsnrctl stop--"Turn off listening"
Additional:
Manually start Oracle -related options ( performed under oracle user )
To start or turn off monitoring:
#su-oracle
$lsnrctl start/stop
When you start listening, you can see that the 1521 port is in the listening state.
$netstat –tnlup
To start or close a database :
$dbstart/dbshut
Note To start the shutdown database directly from the command, you need to modify two places first
1. Modify the automatic start and shutdown of DB instance and listen
$vi/data/oracle/product/11.2.0/db_1/bin/dbstart
oracle_home_listner=$1 #修改为: oracle_home_listner= $ORACLE _home
$vi/data/oracle/product/11.2.0/db_1/bin/dbshut
oracle_home_listner=$1
# revision changed to
oracle_home_listner= $ORACLE _home
2. set the appropriate DB instance to allow automatic startup with System services: Modify the Oratab file $vi/etc/oratab will last: kerry:/data/oracle/product/11.2.0/db _1:n instead of: kerry:/data/oracle/product/11.2.0/db_1:y
To start the shutdown instance:
Start the database
$dbstart
Close the database
$dbshut
Start off EM (Enterprise Management):
$emctl start/stop dbconsole
The http://192.168.2.77:1158/em can be landed according to the address given.
User name: Sys
Password: Tiger
When you start EM, you can see that port 1158 is in listening state.
$netstat-tnlup
Oracle Service Auto-start script
Set the appropriate DB instance to allow the system to start automatically: Modify the/etc/oratab file
#vi/etc/oratab
Will be the final:
Kerry://data/oracle/product/11.2.0/db_1:n
Switch
Kerry://data/oracle/product/11.2.0/db_1:y
Edit the file/etc/rc.local and add the following code
$SU Root
#vi/etc/rc.local
#start Oracle Listener Fist
Su–oracle–c ' lsnrctl start '
#start Oracle DB
Su–oracle–c ' Dbstart '
#start em
Su–oracle–c ' emctl start dbconsole '
Restart to see if the startup item is started
General ORACLE11GR2 startup mainly uses these 3 commands: (can also open some other services according to your request)
Start Shutdown agent
Emctl Start agent//open proxy
Emctl Stop agent//close Proxy
Start shutdown instance
Startup//Boot instance
Shutdown immediate//close instance
Redhat_5.5_x86 Install ORACLE11G_R2