This is a work instruction complete with
all the scripts necessary for full-fledged work, incl. for autostart database and additional services.
The instruction does not contain a direct description of actions in OracleInstaller. The specialist who installs this configuration already knows what to do.
The article is not mine, the author needs an invite, but for some reason the article does not fast in the sandbox.1. create users and groups')
doing under the root
groupadd oinstall
useradd -g oinstall oracle
passwd oracle
# let's decide on directories for installation
traditionally arrays or sections for oracle
mounted to the root
/ u00
/ u01
...
in our case:
/ u00 - section for Oracle DB
/ u01 - section under http
/ u02 - directory for Oracle itself
DBMS put on / u02 and create slips on / u00
on other sections we throw only control files
mkdir -p /u02/app/oracle/product/10.2.0/db_1
chown -R oracle.oinstall /u02
mkdir -p /u00/oradata
chown -R oracle.oinstall /u00
mkdir -p /u01/oradata
chown -R oracle.oinstall /u01
2. Fake installermake a copy of the file / etc / redhat-release
cp redhat-release redhat-release1
do a snag - otherwise the installer will not start
echo redhat-4> redhat-release
3. Setting limitsadd to /etc/security/limits.conf
* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536
4. add to /etc/pam.d/loginsession required /lib/security/pam_limits.so
5. Deliver the packages :
compat-db-4.2.52-5.1.i386.rpm
compat-db-4.2.52-5.1.x86_64.rpm
compat-gcc-34-3.4.6-4.x86_64.rpm
"compat-gcc-34-c++-3.4.6-4.x86_64.rpm"
"compat-libstdc++-33-3.2.3-61.i386.rpm"
"compat-libstdc++-33-3.2.3-61.x86_64.rpm"
gcc-4.1.2-14.el5.x86_64.rpm
glibc-2.5-18.i686.rpm
glibc-2.5-18.x86_64.rpm
libaio-0.3.106-3.2.i386.rpm
libaio-0.3.106-3.2.x86_64.rpm
libXp-1.0.0-8.1.el5.i386.rpm
libXp-1.0.0-8.1.el5.x86_64.rpm
make-3.81-1.1.x86_64.rpm
openmotif22-2.2.3-18.i386.rpm
openmotif22-2.2.3-18.x86_64.rpm
setarch-2.0-1.1.x86_64.rpm
6. install kernel parametersAdd to /etc/sysctl.conf - #for oracle
kernel.shmmni = 4096
#semaphores: semmsl semmns semopm semmni
kernel.sem = 250 32000 100 128
fs.file-max = 65535
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
check
# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
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.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
7. set .bash_profile for the oracle user# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
ORACLE_HOME=/u02/app/oracle/product/10.2.0/db_1 ; export ORACLE_HOME
ORACLE_BASE=/u00/oradata ; export ORACLE_BASE
ORACLE_TERM=xterm ; export ORACLE_TERM
ORACLE_SID=_ ; export ORACLE_SID
TNS_ADMIN=$ORACLE_HOME/network/admin ; export TNS_ADMIN
ORACLE_DOC=$ORACLE_HOME/doc ; export ORACLE_DOC
ORACLE_SID=_l ; export ORACLE_SID
NLS_LANG=AMERICAN_AMERICA.CL8MSWIN1251 ; export NLS_LANG
PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:ORACLE_HOME/lib
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
export PATH
unset USERNAME
pre-replace base_name - with SID
8. direct installationgo to X under the user Oracle and run the installation
/ this manual does not cover the work in the installer itself because it is simple and transparent /
sh runInstaller
we install
advanced
custom
...
choose components
we install
perform scripts under the root
is ready.
9. Creating base creation scriptsif there are DBCA database templates then they should be put in
/ assistants / dbca / templates
run in x-ah dbca
and create base generation scripts
Paying attention:
need to set the correct encoding
those for example CL8MSWIN1251
and the national AL16UTF16
10. To avoid mistakes, check$ sqlplus / nolog
SQL * Plus: Release 10.2.0.1.0 - Production on Sun Jul 29 10:32:44 2007
Copyright © 1982, 2005, Oracle. All rights reserved.
SQL> conn sys as sysdba
Enter password:
oraclemerl: error while loading shared libraries: libaio.so.1 cannot be shared
ERROR:
ORA-12547: TNS: lost contact
need to put
libaio-0.3.103-3.X86_64.RPM
or older
11 launch creation11.1 run database creation scripts
11.2 check the availability of files
sqlnet.ora
tnsnames.ora
sample files
sqlnet.ora
NAMES.DIRECTORY_PATH= (TNSNAMES)
tnsnames.ora
_ =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ip_)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = _)
)
)
base_name replace with SID, ip_base - server interface ip from which the database will be available
if there are no files, they can be created by pens or a master ./netmgr
12. do autostart base12.1 copy the oratab file into / etc / and correct the name and path to the database in it
sample oratab file
_:/u02/app/oracle/product/10.2.0/db_1:Y
12.2 copy the oracle file to /etc/init.d/
12.3 check for dbstart (should be in / bin /)
12.4 check the commands serivce oracle start / stop
12.5 make links:
ln -s /etc/init.d/oracle /etc/rc2.d/S99oracle
ln -s /etc/init.d/oracle /etc/rc3.d/S99oracle
ln -s /etc/init.d/oracle /etc/rc4.d/S99oracle
ln -s /etc/init.d/oracle /etc/rc0.d/K01oracle
ln -s /etc/init.d/oracle /etc/rc6.d/K01oracle
12.6 check how it starts when the server is started / stopped
to log in / var / log / oracle
13. Oracle iSQL * plusmanual start - isqlplusctl start
stop hand - isqlplusctl stop
installation service
copy the
oraisql file to /etc/init.d/
manage service - service oraisql start | stop | restart
view on port 5561
those
server_name : 5561 / isqlplus / andhttp: // server_name: 5561 / isqlplus / dba.uix
autostart stop service
make links
ln -s /etc/init.d/oraisql /etc/rc2.d/S99oraisql
ln -s /etc/init.d/oraisql /etc/rc3.d/S99oraisql
ln -s /etc/init.d/oraisql /etc/rc4.d/S99oraisql
ln -s /etc/init.d/oraisql /etc/rc0.d/K01oraisql
ln -s /etc/init.d/oraisql /etc/rc6.d/K01oraisql
14. Oracle Enterprise Manager
manual start
emctl start dbconsole
hand stop
emctl stop dbconsole
installation service
copy the
oraemc file to /etc/init.d/
manage service - service oraemc start | stop | restart
look at
server_name : 1158 / em /
autostart stop service
make links
ln -s /etc/init.d/oraemc /etc/rc2.d/S99oraemc
ln -s /etc/init.d/oraemc /etc/rc3.d/S99oraemc
ln -s /etc/init.d/oraemc /etc/rc4.d/S99oraemc
ln -s /etc/init.d/oraemc /etc/rc0.d/K01oraemc
ln -s /etc/init.d/oraemc /etc/rc6.d/K01oraemc