当前位置:网站首页>Installing Oracle11g under Linux
Installing Oracle11g under Linux
2022-06-27 21:44:00 【sorghum】
1、 Environmental preparation
operating system :CentOS7 64 position
Oracle11g Compressed packages and various dependent packages
2、 Dependent package detection
rpm -q binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers kernel-headers ksh libaio libaio-devel libgcc libgomp libstdc++ libstdc++-devel make numactl-devel sysstat unixODBC unixODBC-devel
3、 Install missing dependency packages
Carry out orders :yum -y install Dependent package name # In case of networking
rpm -ivh Dependent package name # When the Internet is not available
4、 Create directory user, membership group and permission configuration
# Create group
groupadd oinstall
groupadd dba
# Create user
useradd -g oinstall -G dba oracle
# Set the password
passwd oracle
# Create installation directory
mkdir -p /usr/local/oracle/product/11.2.0/db_1
mkdir -p /usr/local/oracle/oradata
mkdir -p /usr/local/oracle/inventory
mkdir -p /usr/local/oracle/fast_recovery_area
# to grant authorization
chown -R oracle.oinstall /usr/local//oracle
chmod -R 755 /usr/local/oracle
5、 Server configuration modification
# Modify hostname
vim /etc/hosts
# stay host Add... To the file
127.0.0.1 oracledb
# to open up 1521 port
firewall-cmd --zone=public --add-port=1521/tcp --permanent
firewall-cmd --reload
firewall-cmd --list-ports --zone=public
# close selinux
vim /etc/sysconfig/selinux
# modify selinux The value in
SELINUX=disabled
# Execute the command to make the modification effective :
setenforce 0
# Modify kernel parameters
vim /etc/sysctl.conf
# Add the following
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 1073741824
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
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
# Execute the command to make the modification effective
sysctl -p
# Modify user restriction file
vim /etc/security/limits.conf
# Add the following
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
# modify /etc/pam.d/login file
vim /etc/pam.d/login
# Add the following
session required /lib64/security/pam_limits.so
session required pam_limits.so
# To configure oracle The user's environment variables ( Use oracle user )
su - oracle
vim ~/.bash_profile
# add to
ORACLE_BASE=/usr/local/oracle
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
ORACLE_SID=orcl
PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
# Execute the command to make the modification effective
. ~/.bash_profile
6、 Start installation
# Switch to root user
su root
cd /tmp/
mkdir oracle
cd oracle
# decompression
unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip
# After decompression
# Edit silent install response file
cd /tmp/oracle/database/response/
vim db_install.rsp
# Modify the following
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=oracle
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/usr/local/oracle/inventory
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/usr/local/oracle/product/11.2.0/db_1
ORACLE_BASE=/usr/local/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=dba
oracle.install.db.config.starterdb.password.ALL= password
DECLINE_SECURITY_UPDATES=true
# Start installing software
chown -R oracle:oinstall /tmp/oracle/
su - oracle
cd /tmp/oracle/database/
./runInstaller -silent -responseFile /tmp/oracle/database/response/db_install.rsp -ignorePrereq
# Switch back to after installation root User execution script
/usr/local/oracle/inventory/orainstRoot.sh
/usr/local/oracle/product/11.2.0/db_1/root.sh
# Configured to monitor
su - oracle
netca /silent /responseFile /tmp/oracle/database/response/netca.rsp
# see 1521 Whether the port is monitored
netstat -tnulp | grep 1521
# Listen for startup and shutdown commands
lsnrctl start
lsnrctl stop
# Building database
cd /tmp/oracle/database/response/
cp dbca.rsp dbca.rsp.bak
vim dbca.rsp
# Modify the parameters
GDBNAME= "orcl"
SID =" orcl"
SYSPASSWORD= "oracle"
SYSTEMPASSWORD= "oracle"
SYSMANPASSWORD= "oracle"
DBSNMPPASSWORD= "oracle"
DATAFILEDESTINATION=/usr/local/oracle/oradata
RECOVERYAREADESTINATION=/usr/local/oracle/fast_recovery_area
CHARACTERSET= "ZHS16GBK"
# Physical memory
TOTALMEMORY= "1638"
# Carry out orders
dbca -silent -responseFile /tmp/oracle/database/response/dbca.rsp
# Test for Serviceability
sqlplus / as sysdba
SQL> select 1 from dual;
1
----------
1
# There may be problems that some directories do not exist or instances cannot be obtained , Just create or modify the corresponding directory As well as
# Start or close instances
sqlplus / as sysdba
SQL> startup;
SQL> shutdown;
7、 Create a tablespace user and authorize
2、 Create tablespace ;
create temporary tablespace MDGHPS_TEMP tempfile '/usr/local/MDGHPS_TEMP.dbf' size 100m reuse autoextend on next 20m maxsize unlimited;
create tablespace MDGHPS datafile '/usr/local/MDGHPS.dbf' size 100M reuse autoextend on next 40M maxsize unlimited default storage(initial 128k next 128k minextents 2 maxextents unlimited);
3、 Create user ;
create user MDGHPS identified by MDGHPS default tablespace MDGHPS temporary tablespace MDGHPS_TEMP;
4、 Authorize users ;
grant connect,resource to demo;
grant create any sequence to demo;
grant create any table to demo;
grant delete any table to demo;
grant insert any table to demo;
grant select any table to demo;
grant unlimited tablespace to demo;
grant execute any procedure to demo;
grant update any table to demo;
grant create any view to demo;
-- dba jurisdiction
grant connect, resource, dba to demo;
5、 Switching users ;
MDGHPS/MDGHPS;
6、 Import the full database script MDGHPS.sql;
@/usr/MDGHPS.sql;
commit;
边栏推荐
- 熊市慢慢,Bit.Store提供稳定Staking产品助你穿越牛熊
- Acwing周赛57-最长连续子序列-(二分or树状数组)
- Go from introduction to actual combat - context and task cancellation (notes)
- linux下安装oracle11g 静默安装教程
- SQL必需掌握的100个重要知识点:创建计算字段
- Go from introduction to practice -- coordination mechanism (note)
- ∫(0→1) ln(1+x) / (x² + 1) dx
- Contest 2050 and Codeforces Round #718 (Div. 1 + Div. 2)
- Prospects for enterprise digitalization (38/100)
- 农产品期货怎么做怎么开户,期货开户手续费多少,找谁能优惠手续费?
猜你喜欢

于文文、胡夏等明星带你玩转派对 皮皮APP点燃你的夏日

100 important knowledge points that SQL must master: sorting and retrieving data

Go from introduction to practice -- coordination mechanism (note)

How to participate in openharmony code contribution

Save method of JPA stepping pit series

Galaxy Kirin system LAN file sharing tutorial

Go from entry to practice -- CSP concurrency mechanism (note)

Educational Codeforces Round 108 (Rated for Div. 2)

快递e栈——数组篇小型项目

squid代理服务器
随机推荐
IO stream code
ARCS模型介绍
Save method of JPA stepping pit series
Serveur mandataire SQUID
Common methods of string class
Go从入门到实战——package(笔记)
Very comprehensive dolphin scheduler installation and use documents
Data platform scheduling upgrade and transformation | operation practice from Azkaban smooth transition to Apache dolphin scheduler
强制 20 天内开发 APP 后集体被裁,技术负责人怒批:祝“早日倒闭!”
SQL必需掌握的100个重要知识点:组合 WHERE 子句
Codeforces Round #722 (Div. 2)
Covering access to 2w+ traffic monitoring equipment, EMQ creates a new digital engine for all elements of traffic in Shenzhen
squid代理服务器
Acwing周赛57-最长连续子序列-(二分or树状数组)
SQL必需掌握的100个重要知识点:创建计算字段
Special tutorial - Captain selection game
Go从入门到实战——所有任务完成(笔记)
Kirin V10 installation font
Null pointer exception
Go从入门到实战——协程机制(笔记)