su -
yum install libXp gcc make setarch libaio glibc-devel glibc.i686 libXp.so.6 libXt.so.6 libXtst.so.6 compat-libstdc++-33.x86_64 binutils elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel glibc-headers gcc gcc-c++ libaio-devel libaio libgcc libstdc++ make sysstat unixODBC unixODBC-devel unzip glibc-devel.i686 libgcc.i686 binutils compat-db libstdc++ gdbm make ksh libaio-devel libXtst xorg-x11-utils openmotif openmotif.i686 libaio.i686 libaio-devel.i686 compat-glibc.x86_64
groupadd oinstall groupadd dba useradd -d /opt/oracle -g oinstall -G dba -s /bin/bash -m oracle passwd oracle useradd nobody
kernel.sem = 250 32000 100 128 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 = 1048576 fs.aio-max-nr = 1048576
sysctl -p
oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536
session required /lib64/security/pam_limits.so session required pam_limits.so
#!/bin/bash if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi
chmod +x /etc/profile.d/custom.sh
cp /etc/redhat-release /etc/redhat-release.6 echo redhat-4 > /etc/redhat-release
ORACLE_BASE=/opt/oracle ORACLE_HOME=/opt/oracle/database ORACLE_SID=navdb export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH=$ORACLE_HOME/bin:$ORACLE_HOME/lib:$ORACLE_HOME/lib32:$PATH:. export PATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$ORACLE_HOME/lib32:/lib:/usr/lib CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib export LD_LIBRARY_PATH CLASSPATH export NLS_LANG=AMERICAN_AMERICA.UTF8
cd /opt/oracle cpio -idmv < database_linux_x86_64.cpio cd database ./runInstaller
mv /etc/redhat-release.6 /etc/redhat-release
ORA-27125: unable to create shared memory segment
cd $ORACLE_HOME/bin mv oracle oracle.bin
#!/bin/bash export DISABLE_HUGETLBFS=1 exec $ORACLE_HOME/bin/oracle.bin $@
chmod +x oracle
#!/bin/bash # # chkconfig: 345 51 49 # description: startup and shutdown the Oracle 10g listener # echo "Oracle 10g listener start/stop/restart/status" ORA_OWNER=oracle ORACLE_BASE=/opt/oracle ORACLE_HOME=/opt/oracle/database ORACLE_SID=navdb export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH=$ORACLE_HOME/bin:$PATH:. export PATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$ORACLE_HOME/lib32:/lib:/usr/lib CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib export LD_LIBRARY_PATH CLASSPATH alias sqlplus='rlwrap sqlplus' export NLS_LANG=AMERICAN_AMERICA.UTF8 case $1 in start) echo -n "Starting oracle listener: " su - $ORA_OWNER -c "$ORACLE_HOME/bin/lsnrctl start" echo ;; stop) echo -n "Shutting down oracle listener: " su - $ORA_OWNER -c "$ORACLE_HOME/bin/lsnrctl stop" echo ;; status) echo -n "Status of oracle listener: " su - $ORA_OWNER -c "$ORACLE_HOME/bin/lsnrctl status" echo ;; restart) echo -n "Restarting oracle listener:" $0 stop $0 start echo ;; *) echo "Usage: listener [ start | stop | restart | status ]" exit 1 esac exit 0
chmod 700 listener chkconfig listener on
#!/bin/bash # # chkconfig: 345 51 49 # description: startup and shutdown the Oracle 10g instance # # Run-level Startup script for the Oracle Instance, Listener, and Web Interface echo "Oracle 10g database start/stop/restart" ORA_OWNER=oracle ORACLE_BASE=/opt/oracle ORACLE_HOME=/opt/oracle/database ORACLE_SID=navdb export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH=$ORACLE_HOME/bin:$PATH:. export PATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$ORACLE_HOME/lib32:/lib:/usr/lib CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib export LD_LIBRARY_PATH CLASSPATH export NLS_LANG=AMERICAN_AMERICA.UTF8 # if the executables do not exist -- display error if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ] then echo "Oracle startup: cannot start" exit 1 fi # depending on parameter -- startup, shutdown, restart # of the instance and listener or usage display case "$1" in start) # Oracle listener and instance startup echo -n "Starting Oracle: " su $ORA_OWNER -c "$ORACLE_HOME/bin/lsnrctl start" su $ORA_OWNER -c $ORACLE_HOME/bin/dbstart touch /var/lock/oracle # su $ORA_OWNER -c "$ORACLE_HOME/bin/emctl start dbconsole" echo "OK" ;; stop) # Oracle listener and instance shutdown echo -n "Shutdown Oracle: " su $ORA_OWNER -c "$ORACLE_HOME/bin/lsnrctl stop" su $ORA_OWNER -c $ORACLE_HOME/bin/dbshut rm -f /var/lock/oracle # su $ORA_OWNER -c "$ORACLE_HOME/bin/emctl stop dbconsole" echo "OK" ;; restart) $0 stop $0 start ;; *) echo "Usage: `basename $0` start|stop|restart" exit 1 esac exit 0
chmod 700 oracle chkconfig oracle on
navdb:/opt/oracle/database:N
navdb:/opt/oracle/database:Y
Source: https://habr.com/ru/post/144403/
All Articles