-
-
Save gladiopeace/33c3641e823ad6855236e67c7a3339f0 to your computer and use it in GitHub Desktop.
oracle installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iptables -I INPUT -p tcp --dport 1521 -j ACCEPT | |
iptables -I INPUT -p tcp --dport 1522 -j ACCEPT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install required packages | |
sudo yum -y install oracleasm-support libxml2 | |
sudo yum -y install binutils compat-db control-center | |
sudo yum -y install gcc gcc-c++ glibc glibc-common | |
sudo yum -y install libstdc++ libstdc++-devel make pdksh sysstat | |
sudo yum -y install gnome-libs xscreensaver libgnome libgnomeui libXp | |
sudo yum -y install sysstat setarch | |
sudo yum -y install libaio util-linux compat-libstdc++-33 | |
# create users and groups | |
/usr/sbin/groupadd oinstall | |
/usr/sbin/groupadd dba | |
/usr/sbin/useradd -g oinstall -G dba oracle | |
# set password for `oracle` | |
passwd oracle # to set password | |
# kernel configuration | |
echo "kernel.sem = 250 32000 100 128" >> /etc/sysctl.conf | |
echo "net.ipv4.ip_local_port_range = 1024 65000" >> /etc/sysctl.conf | |
echo "net.core.rmem_default = 262144" >> /etc/sysctl.conf | |
echo "net.core.rmem_max = 262144" >> /etc/sysctl.conf | |
echo "net.core.wmem_default = 262144" >> /etc/sysctl.conf | |
echo "net.core.wmem_max = 262144" >> /etc/sysctl.conf | |
# security limits configuration | |
echo "oracle soft nproc 2047" >> /etc/security/limits.conf | |
echo "oracle hard nproc 16384" >> /etc/security/limits.conf | |
echo "oracle soft nofile 1024" >> /etc/security/limits.conf | |
echo "oracle hard nofile 65536" >> /etc/security/limits.conf | |
# session configuration. may be buggy | |
echo "session required pam_limits.so" >> /etc/pam.d/login | |
# /etc/profile configuration for `oracle` | |
echo "if [ $USER = "oracle" ]; then" >> /etc/profile | |
echo " if [ $SHELL = "/bin/ksh" ]; then" >> /etc/profile | |
echo " ulimit -p 16384" >> /etc/profile | |
echo " ulimit -n 65536" >> /etc/profile | |
echo " else" >> /etc/profile | |
echo " ulimit -u 16384 -n 65536" >> /etc/profile | |
echo " fi" >> /etc/profile | |
echo "fi" >> /etc/profile | |
# ORACLE HOME catalogs creation | |
mkdir -p /opt/oracle/app/oracle | |
chown -R oracle:oinstall /opt/oracle/app/oracle | |
chmod -R 775 /opt/oracle/app/oracle | |
echo "umask 022" >> /home/oracle/.bash_profile | |
# solves shared memory problem for Database Configuration Assistance | |
export ORACLE_HOME=/opt/oracle/app/oracle/product/10.2.0/db_1 | |
mv $ORACLE_HOME/bin/oracle $ORACLE_HOME/bin/oracle.bin | |
echo "#!/bin/bash" >> $ORACLE_HOME/bin/oracle | |
echo "export DISABLE_HUGETLBFS=1" >> $ORACLE_HOME/bin/oracle | |
echo "exec $ORACLE_HOME/bin/oracle.bin $@" >> $ORACLE_HOME/bin/oracle | |
chmod +x $ORACLE_HOME/bin/oracle | |
# run OUI. Run scripts he asked | |
./runInstaller | |
# path for oracle binaries | |
export PATH=$ORACLE_HOME/bin:$PATH | |
# database launch | |
lsnrctl start | |
dbstart | |
# test connection | |
sqlplus sys/ as sysdba |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment