偶尔有空上来看看
分类: Oracle
2020-07-19 17:47:16
mount -o loop /u01/media/rhel-server-7.7-x86_64-dvd.iso /mnt
cat > /etc/yum.repos.d/yum.repo<
[RHEL77]
name=RHEL77
baseurl=file:///mnt
gpgcheck=0
EOF
yum makecache
yum install -y elfutils* gcc* glibc* libaio* libgcc* libgomp* libstdc* libstdc++-devel* sysstat unixODBC* *libcap* libXp* dstat* compat-* bc unzip smartmontools* mlocate* psmisc* glibc.i686 -y
cd /u01/media
rpm -e compat-libstdc++
rpm -ivh compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm
getenforce
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/sysconfig/selinux
cat /etc/sysconfig/selinux
getenforcesystemctl stop postfix
systemctl stop smartd
systemctl disable firewalld
systemctl disable postfix
systemctl disable smartdsystemctl stop firewalld
systemctl disable firewalld
systemctl status firewalld
cat >> /etc/pam.d/login <
#ORACLE SETTING
session required pam_limits.so
EOFsed -i '/GRUB_CMDLINE_LINUX=/ s/"$/ transparent_hugepage=never"/' /etc/default/grub
grub2-mkconfig > /boot/grub2/grub.cfggroupadd -g 1001 oinstall
groupadd -g 1002 dba
useradd -u 1100 -g oinstall -G dba,oinstall oracle
echo "oracle"|passwd --stdin oracle
mkdir -p /u01/app/oracle
mkdir -p /u01/app/oracle/product/10.2/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01vi ~/.bash_profile
# Oracle 11g oracle Environment
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/10.2/db_1
export ORACLE_SID=ORCL
export TMP=/tmp
export NLS_LANG=american_america.AL32UTF8
export LIBPATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32
export LD_LIBRARY_PATH=$LD_LIBARY_PATH:$ORACLE_HOME/jdk/jre/lib:$ORACLE_HOME/network/lib:$ORACLE_HOME/rdbms/lib
export LD_LIBRARY_PATH=$LD_LIBARY_PATH:$ORACLE_HOME/lib:$ORACLE_HOME/lib32
export CLASS_PATH=$ORACLE_HOME/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$HOME/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:.
umask 022
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
alias sql='sqlplus / as sysdba'
stty erase ^H
cat >> /etc/security/limits.conf <
#ORACLE SETTING
* soft memlock unlimited
* hard memlock unlimited
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft nofile 65536
oracle hard nofile 65536
oracle soft stack 10240
EOFgzip -d 10201_database_linux_x86_64.cpio.gz
cpio -icdmv <10201_database_linux_x86_64.cpio
vi db.rsp
RESPONSEFILE_VERSION=2.2.1.0.0
UNIX_GROUP_NAME="oinstall"
ORACLE_HOME_NAME="OraDb10g_home1"
ORACLE_HOME="/u01/app/oracle/product/10.2/db_1"
SHOW_INSTALL_PROGRESS_PAGE= true
SHOW_END_OF_INSTALL_MSGS= true
COMPONENT_LANGUAGES={"zh_CN"}
s_nameForDBAGrp= "dba"
s_nameForOPERGrp="dba"
INSTALL_TYPE="EE"
n_configurationOption=3
RESTART_SYSTEM=false
RESTART_REMOTE_SYSTEM=false./runInstaller -ignoreSysPrereqs -silent -responseFile /home/oracle/db.rsp
/u01/app/oracle/oraInventory/orainstRoot.sh
/u01/app/oracle/product/10.2/db_1/root.shcd /u01/media/
unzip p8202632_10205_Linux-x86-64.zip
vi patch.rsp
RESPONSEFILE_VERSION=2.2.1.0.0
UNIX_GROUP_NAME="oinstall"
FROM_LOCATION="/u01/media/Disk1/stage/products.xml"
FROM_LOCATION_CD_LABEL=
ORACLE_HOME="/u01/app/oracle/product/10.2/db_1"
ORACLE_HOME_NAME="OraDb10g_home1"
SHOW_WELCOME_PAGE=true
SHOW_CUSTOM_TREE_PAGE=true
SHOW_COMPONENT_LOCATIONS_PAGE=true
SHOW_SUMMARY_PAGE=true
SHOW_INSTALL_PROGRESS_PAGE=true
SHOW_REQUIRED_CONFIG_TOOL_PAGE=true
SHOW_CONFIG_TOOL_PAGE=true
SHOW_RELEASE_NOTES=true
SHOW_ROOTSH_CONFIRMATION=true
SHOW_END_SESSION_PAGE=true
SHOW_EXIT_CONFIRMATION=true
NEXT_SESSION=false
NEXT_SESSION_ON_FAIL=true
NEXT_SESSION_RESPONSE=
DEINSTALL_LIST={"oracle.patchset.db","10.2.0.5.0"}
SHOW_DEINSTALL_CONFIRMATION=true
SHOW_DEINSTALL_PROGRESS=true
CLUSTER_NODES={}
ACCEPT_LICENSE_AGREEMENT=false
TOPLEVEL_COMPONENT={"oracle.patchset.db","10.2.0.5.0"}
SHOW_SPLASH_SCREEN=true
oracle.assistants.server:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_prod"
oracle.bali.cabo:PROD_HOME="/u01/app/oracle/product/10.2/db_1/uix"
oracle.bali.share:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_tools_share"
oracle.client:PROD_HOME=
oracle.companionCD.db:PROD_HOME=
oracle.companionCD.midtier:PROD_HOME=
oracle.crs:PROD_HOME=
oracle.csmig:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_rdbms_expimp"
oracle.rdbms:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_rdbms"
oracle.dbjava.common:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.dbjava.common"
oracle.dbjava.dev:PROD_HOME=
oracle.dbjava.ic:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_dbjava_ic"
oracle.server:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.server"
oracle.sysman.console.emcp:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.sysman.console.emcp"
oracle.sqlplus:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.sqlplus"
oracle.has.common:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_prod"
oracle.has.crs:PROD_HOME=
oracle.has.db:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.has.db"
oracle.sqlplus.ic:PROD_HOME=
oracle.htmldb:PROD_HOME=
oracle.isearch.client:PROD_HOME=
oracle.isearch.is_common:PROD_HOME=
oracle.isearch.server:PROD_HOME=
oracle.javavm.client:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.javavm.client"
oracle.javavm.companion:PROD_HOME=
oracle.javavm.server:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_javavm_server_cmp"
oracle.ldap.client:PROD_HOME="/u01/app/oracle/product/10.2/db_1"
oracle.ldap.companion:PROD_HOME=
oracle.ldap.admin:PROD_HOME="/u01/app/oracle/product/10.2/db_1"
oracle.ldap.esm:PROD_HOME=
oracle.sqlplus.isqlplus:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_prod"
oracle.network.aso:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.network.aso"
oracle.network.client:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_network_client"
oracle.network.cman:PROD_HOME=
oracle.network.listener:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.network.listener"
oracle.network.owm:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.network.owm"
oracle.precomp.common:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.precomp.common"
oracle.precomp.companion:PROD_HOME=
oracle.tg4drda:PROD_HOME=
oracle.network.ssl:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.network.ssl"
oracle.tg4drda.sna:PROD_HOME=
oracle.odbc:PROD_HOME="/u01/app/oracle/product/10.2/db_1/bin"
oracle.oem.client:PROD_HOME=
oracle.tg4drda.tcp:PROD_HOME=
oracle.oraolap:PROD_HOME="/u01/app/oracle/product/10.2/db_1/olap"
oracle.oraolap.api:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.oraolap.api"
oracle.oraolap.dbscripts:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_prod"
oracle.ordim.client:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.interMedia.imclient"
oracle.ordim.companion:PROD_HOME=
oracle.ordim.rdbms:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_prod"
oracle.ordim.server:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.options.intermedia.imserver"
oracle.ovm:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.ovm"
oracle.pg4appc:PROD_HOME=
oracle.pg4mq:PROD_HOME=
oracle.wwg.plsql:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_rdbms"
oracle.precomp.lang:PROD_HOME=
oracle.xdk:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_prod"
oracle.ctx:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.ctx"
oracle.rdbms.companion:PROD_HOME=
oracle.rdbms.crs:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_prod"
oracle.rdbms.dbscripts:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_rdbms_dbscripts"
oracle.rdbms.dm:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_prod"
oracle.rdbms.dmse:PROD_HOME=
oracle.rdbms.hs_common:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_rdbms_hs_common"
oracle.rdbms.ic:PROD_HOME=
oracle.rdbms.install.common:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.rdbms.install.common"
oracle.rdbms.lbac:PROD_HOME=
oracle.rdbms.locator:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_prod"
oracle.rdbms.oci:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_rdbms_oci"
oracle.rdbms.olap:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_prod"
oracle.rdbms.plsql:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_rdbms_plsql"
oracle.rdbms.rman:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.rdbms.rman"
oracle.xdk.companion:PROD_HOME=
oracle.rdbms.util:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.rdbms.util"
oracle.sdo.companion:PROD_HOME=
oracle.sdo.locator:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_cartridges_locator"
oracle.xdk.parser.java:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.xdk.parser.java"
oracle.assistants.acf:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.assistants.acf"
oracle.dbjava.jdbc12:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.dbjava.jdbc12"
oracle.nlsrtl.companion:PROD_HOME=
oracle.rdbms.tg4tera:PROD_HOME=
oracle.dbjava.jdbc14:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.dbjava.jdbc14"
oracle.oraolap.mgmt:PROD_HOME=
oracle.ordim.jai:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.ordim.jai"
oracle.sqlj.sqljruntime:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_java_sqlj_sqljruntime"
oracle.sqlj:PROD_HOME=
oracle.xdk.server:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.xdk.server"
oracle.sysman.agent.db:PROD_HOME="/u01/app/oracle/product/10.2/db_1/sysman"
oracle.sysman.bsln:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_sysman_bsln"
oracle.sysman.console.db:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_sysman_console_db"
oracle.xdk.rsf:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_rsf_rdbms_rsf"
oracle.emdw.emcp:PROD_HOME=
oracle.emdw.rsf:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.emdw.rsf"
oracle.dbjava.rsf:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.dbjava.rsf"
oracle.ldap.rsf:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_ldap_rsf_cmp"
oracle.precomp.rsf:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_rsf_precomp_rsf"
oracle.has.rsf:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_rsf_has_rsf"
oracle.rdbms.rsf.ic:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.rdbms.ic"
oracle.rdbms.rsf:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.rdbms.rsf"
oracle.sqlplus.rsf:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.sqlplus.rsf"
oracle.network.rsf.ic:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.network.rsf.ic"
oracle.network.rsf:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.network.rsf"
oracle.nlsrtl.rsf:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_nlsrtl_rsf"
oracle.oracore.rsf:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.oracore.rsf"
oracle.buildtools.rsf:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_buildtools_rsf"
oracle.isearch.rdbms:PROD_HOME=
oracle.mgw.common:PROD_HOME="/u01/app/oracle/product/10.2/db_1/mgw"
oracle.dv:PROD_HOME=
oracle.rdbms.dv:PROD_HOME=
oracle.rdbms.dv.oc4j:PROD_HOME=
oracle.sysman.agent.core:PROD_HOME="/u01/app/oracle/product/10.2/db_1/sysman"
oracle.sysman.common.core:PROD_HOME="/u01/app/oracle/product/10.2/db_1"
oracle.sysman.repository.core:PROD_HOME="/u01/app/oracle/product/10.2/db_1/sysman"
oracle.javavm.containers:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_java_j2ee_core"
oracle.ctx.companion:PROD_HOME=
oracle.sysman.repository.db:PROD_HOME="/u01/app/oracle/product/10.2/db_1/sysman"
oracle.nlsrtl.rsf.lbuilder:PROD_HOME=
oracle.ons:PROD_HOME="/u01/app/oracle/product/10.2/db_1/opmn"
oracle.ordim.annotator:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_prod"
oracle.sqlj.companion:PROD_HOME=
oracle.oem.oemlt:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oemlt"
oracle.sqlplus.companion:PROD_HOME=
oracle.slax.rsf:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.slax.rsf"
oracle.buildtools.common:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_buildtools_common"
oracle.workflow.manager:PROD_HOME=
oracle.rsf.hybrid:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle_rsf_hybrid"
oracle.rdbms.install.seeddb:PROD_HOME="/u01/app/oracle/product/10.2/db_1/oracle.rdbms.install.seeddb"
oracle.rdbms.install.seeddb.sample_schema:PROD_HOME="/u01/app/oracle/product/10.2/db_1/demo/schema"
DECLINE_SECURITY_UPDATES=TRUEyum -y install libstdc++(x86-32)
rpm -ivh libstdc++-devel-4.8.5-39.el7.i686.rpm
rpm -ivh glibc-devel-2.17-292.el7.i686.rpm
rpm -ivh libaio-0.3.109-13.el7.i686.rpm
rpm -ivh libaio-devel-0.3.109-13.el7.i686.rpm
su - oracle
cd /u01/media/Disk1
./runInstaller -ignoreSysPrereqs -silent -responseFile /home/oracle/patch.rsp
$ORACLE_HOME/bin/dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbName ORCL -sid ORCL -sysPassword oracle -systemPassword oracle -storageType FS -datafileDestination /oradata -datafileJarLocation $ORACLE_HOME/assistants/dbca/templates -characterset ZHS16GBK -obfuscatedPasswords false -sampleSchema false
cd $ORACLE_HOME/network/admin
vi listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = /u01/app/oracle/product/10.2/db_1)
(SID_NAME = ORCL)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.9.1)(PORT = 1521))
)