偶尔有空上来看看
分类: 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))
)