当前位置:网站首页>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;
边栏推荐
- 本周二晚19:00战码先锋第8期直播丨如何多方位参与OpenHarmony开源贡献
- OpenSSL 编程 一:基本概念
- squid代理服务器
- 互联网 35~40 岁的一线研发人员,对于此岗位的核心竞争力是什么?
- 数组作业题
- Unleash the innovative power of open source database | [Gansu] opengauss meetup has come to a successful conclusion
- 创建对象时JVM内存结构
- Codeforces Round #723 (Div. 2)
- 100 important knowledge points that SQL must master: retrieving data
- Burp suite遇到的常见问题
猜你喜欢

After being forced to develop the app within 20 days, the group was laid off, and the technical director angrily criticized it: I wish "closure as soon as possible!"

今晚战码先锋润和赛道第2期直播丨如何参与OpenHarmony代码贡献

Codeforces Round #717 (Div. 2)

Covering access to 2w+ traffic monitoring equipment, EMQ creates a new digital engine for all elements of traffic in Shenzhen

Let Ma Huateng down! Web3.0, hopeless

How to delete "know this picture" on win11 desktop

Go from introduction to actual combat - package (notes)

Go从入门到实战——Context与任务取消(笔记)

MySQL usage notes 1

AI painting minimalist tutorial
随机推荐
Bit.Store:熊市漫漫,稳定Staking产品或成主旋律
Burp suite遇到的常见问题
White whoring red team goby & POC, how do you call white whoring?
Prospects for enterprise digitalization (38/100)
Go from starting to Real - Interface (note)
Go从入门到实战——Context与任务取消(笔记)
VMware vSphere esxi 7.0 installation tutorial
Go from entry to practice - dependency management (notes)
Covering access to 2w+ traffic monitoring equipment, EMQ creates a new digital engine for all elements of traffic in Shenzhen
Contest 2050 and Codeforces Round #718 (Div. 1 + Div. 2)
Go从入门到实战——仅需任意任务完成(笔记)
ARCS模型介绍
∫(0→1) ln(1+x) / (x² + 1) dx
Use the storcli tool to configure raid. Just collect this article
Go从入门到实战——行为的定义和实现(笔记)
Galaxy Kirin system LAN file sharing tutorial
The difference between scrum and Kanban
Codeforces Global Round 14
io流代码
"Apprendre cette image" apparaît sur le Bureau win11 comment supprimer