当前位置:网站首页>Centos7 silently installs Oracle
Centos7 silently installs Oracle
2022-07-29 05:54:00 【JACK-JIE】
Note before installation
1, The remaining memory space must be greater than 120MB
2, The swap space must be greater than 150MB
Configure swap space
dd if=/dev/zero of=/home/swap bs=1M count=2048
mkswap /home/swap
chmod 600 /home/swap
swapon /home/swap
see 
Bold style
1, To configure yum Source
mv CentOS-Base.repo CentOS-Base.repo.bak
wget -O /etc/yum.repos.d/CentOSBase.repo http://mirrors.aliyun.com/repo/Centos-7.repo
2, Installation and compilation environment
yum -y install gcc gcc-c++ gcc-g77 autoconf automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel* make cmake pcre pcre-devel openssl openssl-devel jemalloc-devel tlc libtool bash-completion
3, Modify the hostname and add it to host
hostnamectl set-hostname xiaoming
IP hostname
4, oracle Dependent package installation
yum -y install binutils compat-libstdc+±33 elfutils-libelf-devel elfutils-libelf-devel-static elfutils-libelf-devel ksh libaio libaio-devel numactl-devel sysstat unixODBC unixODBC-devel pcre-devel
5, Add group user
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
6, Modify the kernel parameters according to the official website
fs.file-max = 6815744
fs.aio-max-nr = 1048576
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
7, Modify user restrictions
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
8, Create installation directory and permissions
mkdir -p /opt/oracle/product/11.2.0
mkdir /opt/oracle/oradata
mkdir /opt/oracle/inventory
mkdir /opt/oracle/fast_recovery_area
chown -R oracle:oinstall /opt/oracle
chmod -R 775 /opt/oracle
9, decompression oracle Installation package
unzip linux.x64_11gR2_database_1of2.zip && unzip linux.x64_11gR2_database_2of2.zip
10, Configure environment variables ( Use oracle The user action )
ORACLE_BASE=/opt/oracle
ORACLE_HOME= O R A C L E B A S E / p r o d u c t / 11.2.0 O R A C L E S I D = o r c l P A T H = ORACLE_BASE/product/11.2.0 ORACLE_SID=orcl PATH= ORACLEBASE/product/11.2.0ORACLESID=orclPATH=PATH:$ORACLE_HOME/bin
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
11, edit oracle The configuration file
/database/response/db_install.rsp
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=xiaoming
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/opt/oracle/inventory
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/opt/oracle/product/11.2.0
ORACLE_BASE=/opt/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.isCustomInstall=false
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=dba
DECLINE_SECURITY_UPDATES=true
12,oracle install ( Use oracle The user action )
./runInstaller -silent -ignorePrereq -ignoreSysPrereqs -responseFile /opt/software/database/response/db_install.rsp
The appearance indicates success
To execute the configuration scripts:
1. Open a terminal window
2. Log in as “root”
3. Run the scripts
4. Return to this window and hit “Enter” key to continue
Successfully Setup Software.
13, Execute the required script
source /opt/oracle/inventory/orainstRoot.sh
source /opt/oracle/product/11.2.0/root.sh
14,oracle Configured to monitor
netca -silent -responseFile /opt/software/database/response/netca.rsp
The appearance indicates success
Oracle Net Services configuration successful. The exit code is 0
15, Check whether the port is listening normally
Netstat -luntp | grep 1521
16, To configure oracle User instance
[GENERAL]
RESPONSEFILE_VERSION = “11.2.0”
OPERATION_TYPE = “createDatabase”
[CREATEDATABASE]
GDBNAME = “orcl”
SID = “orcl”
TEMPLATENAME = “General_Purpose.dbc”
SYSPASSWORD = “oracle”
SYSTEMPASSWORD = “oracle”
SYSMANPASSWORD = “oracle”
DBSNMPPASSWORD = “oracle”
DATAFILEDESTINATION =/opt/oracle/oradata
RECOVERYAREADESTINATION=/opt/oracle/fast_recovery_area
CHARACTERSET = “ZHS16GBK”
TOTALMEMORY = “1638”
17, Instance installation
dbca -silent -responseFile /opt/software/database/response/dbca.rsp
18, Modify listening profile ( The default is hostname )
vim $ORACLE_HOME/network/admin/listener.ora
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =xiaoming)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
19, On off
lsnrctl stop
lsnrctl stop
Close instance
sqlplus / as sysdba
SQL> shutdow immediate;
Boot instance
sqlplus / as sysdba
SQL> startup;
Start listening
lsnrctl start
20, To configure local_listener Parameters
$ sqlplus / as sysdba
Configuration parameters
alter system set local_listener="(address = (protocol = tcp)(host = 172.16.10.173)(port = 1521))";
see
21, Start listening
Create a database file
CREATE TABLESPACE MyDataBase LOGGING DATAFILE ‘/opt/oracle/oradata/orcl/MyDataBase.dbf’ SIZE 100M AUTOEXTEND ON NEXT 32M MAXSIZE 500M EXTENT MANAGEMENT LOCAL;
Create a temporary database file
create temporary TABLESPACE MyDataBase_temp tempfile ‘/opt/oracle/oradata/orcl/MyDataBase_temp.dbf’ SIZE 100M AUTOEXTEND ON NEXT 32M MAXSIZE 500M EXTENT MANAGEMENT LOCAL;
Create a mapping relationship between the user and the above two files
CREATE USER xiaoming IDENTIFIED BY Admin123 DEFAULT TABLESPACE MyDataBase TEMPORARY TABLESPACE MyDataBase_temp;
Add user rights
grant connect,resource,dba to xiaoming;
grant create session to xiaoming;
Delete database
conn sys/dwh as sysdba;
drop tablespace MyDataBase including contents and datafiles;
drop tablespace MyDataBase_temp including contents and datafiles;
Delete user
drop user xiaoming cascade;
When you don’t know what to do, just settle down and study!
边栏推荐
- Training log 4 of the project "construction of Shandong University mobile Internet development technology teaching website"
- Fantom (FTM) surged 45% before the FOMC meeting
- 钉钉告警脚本
- 深度学习的趣味app简单优化(适合新手)
- Ribbon学习笔记一
- 熊市慢慢,Bit.Store提供稳定Staking产品助你穿越牛熊
- Plato Farm有望通过Elephant Swap,进一步向外拓展生态
- 山寨币SHIB 在 ETH 鲸鱼的投资组合中拥有 5.486 亿美元的股份——交易者应提防……
- 与张小姐的春夏秋冬(5)
- SSM integration
猜你喜欢

Flink connector Oracle CDC 实时同步数据到MySQL(Oracle19c)

C# 连接 SharepointOnline WebService

Breaking through the hardware bottleneck (I): the development of Intel Architecture and bottleneck mining

并发编程学习笔记 之 ReentrantLock实现原理的探究

Laravel service container (inheritance and events)

赓续新征程,共驭智存储

Shanzhai coin Shib has a US $548.6 million stake in eth whale's portfolio - traders should be on guard

Ribbon学习笔记二

PHP write a diaper to buy the lowest price in the whole network

北京宝德&TaoCloud共建信创之路
随机推荐
Reporting Service 2016 自定义身份验证
Training log 4 of the project "construction of Shandong University mobile Internet development technology teaching website"
Huawei 2020 school recruitment written test programming questions read this article is enough (Part 2)
Idea using JDBC to connect mysql database personal detailed tutorial
Huawei 2020 school recruitment written test programming questions read this article is enough (Part 1)
Some opportunities for young people in rural brand building
Use of file upload (2) -- upload to Alibaba cloud OSS file server
全闪分布式,如何深度性能POC?
Under the bear market of encrypted assets, platofarm's strategy can still obtain stable income
Research and implementation of flash loan DAPP
The bear market is slow, and bit.store provides stable stacking products to help you get through the bull and bear market
Super simple integration HMS ml kit face detection to achieve cute stickers
Common prompt pop-up box of uniapp
Reporting Services- Web Service
Okaleido Tiger 7.27日登录Binance NFT,首轮已获不俗成绩
Study and research the way of programming
赓续新征程,共驭智存储
Training log III of "Shandong University mobile Internet development technology teaching website construction" project
“山东大学移动互联网开发技术教学网站建设”项目实训日志一
手撕ORM 框架(泛型+注解+反射)