当前位置:网站首页>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;
边栏推荐
- 根据自定义excel标题模板快速excel导出
- Go from introduction to practice -- coordination mechanism (note)
- 覆盖接入2w+交通监测设备,EMQ 为深圳市打造交通全要素数字化新引擎
- 强制 20 天内开发 APP 后集体被裁,技术负责人怒批:祝“早日倒闭!”
- Let Ma Huateng down! Web3.0, hopeless
- 系统自带的karsonzhang/fastadmin-addons报错
- Special training of guessing game
- OpenSSL 编程 一:基本概念
- TypeScript学习
- 洛谷P5706 再分肥宅水
猜你喜欢

GFS distributed file system

Go from introduction to actual combat - panic and recover (notes)

"Apprendre cette image" apparaît sur le Bureau win11 comment supprimer

SQL server for circular usage

Go从入门到实战——行为的定义和实现(笔记)

Modify large online games through CE modifier

Bit.Store:熊市漫漫,稳定Staking产品或成主旋律

流程控制任务
![Unleash the innovative power of open source database | [Gansu] opengauss meetup has come to a successful conclusion](/img/21/9c5f5122270adea9444ff5f2d199ed.jpg)
Unleash the innovative power of open source database | [Gansu] opengauss meetup has come to a successful conclusion

MYSQL 性能优化 index 函数,隐藏,前缀,hash 索引 使用方法(2)
随机推荐
Go从入门到实战——任务的取消(笔记)
String类的常用方法
oss上传调用的是哪个方法
互联网 35~40 岁的一线研发人员,对于此岗位的核心竞争力是什么?
Common methods of string class
Flask----应用案例
How to participate in openharmony code contribution
Yu Wenwen, Hu Xia and other stars take you to play with the party. Pipi app ignites your summer
快递e栈——数组篇小型项目
Go從入門到實戰——接口(筆記)
动态刷新mapper看过来
win11桌面出现“了解此图片”如何删除
SQL必需掌握的100个重要知识点:排序检索数据
MySQL client tools are recommended. I can't imagine that it is best to use Juran
Codeforces Round #723 (Div. 2)
SQL必需掌握的100个重要知识点:IN 操作符
洛谷P5706 再分肥宅水
SQL必需掌握的100个重要知识点:使用函数处理数据
100 important knowledge points that SQL must master: sorting and retrieving data
Let Ma Huateng down! Web3.0, hopeless