当前位置:网站首页>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!
边栏推荐
- Performance comparison | FASS iSCSI vs nvme/tcp
- File文件上传的使用(2)--上传到阿里云Oss文件服务器
- 熊市下PLATO如何通过Elephant Swap,获得溢价收益?
- 完全去中心化的编程模式,不需要服务器,也不需要ip,就像一张漫无目的的网络、四处延伸
- Some opportunities for young people in rural brand building
- Sports health is deeply rooted in the hearts of the people, and move protocol leads quality life
- Print out all prime numbers between 1-100
- ssm整合
- Tear the ORM framework by hand (generic + annotation + reflection)
- xSAN高可用—XDFS与SAN融合焕发新生命力
猜你喜欢

【数据库】数据库课程设计一一疫苗接种数据库

The LAAS protocol of defi 2.0 is the key to revitalizing the development of defi track

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

超简单集成HMS ML Kit 实现parental control

Strategic cooperation with many institutions shows the strength of the leading company of platofarm yuancosmos

Training log 4 of the project "construction of Shandong University mobile Internet development technology teaching website"

Reporting Service 2016 自定义身份验证

识变!应变!求变!

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

Refresh, swagger UI theme changes
随机推荐
DCAT batch operation popup and parameter transfer
Super simple integration HMS ml kit face detection to achieve cute stickers
与张小姐的春夏秋冬(4)
『全闪实测』数据库加速解决方案
与张小姐的春夏秋冬(5)
xSAN高可用—XDFS与SAN融合焕发新生命力
【go】defer的使用
Flink connector Oracle CDC 实时同步数据到MySQL(Oracle19c)
Countdown of the uniapp component (such as the countdown to reading the agreement and the countdown to completing learning)
Research and implementation of flash loan DAPP
Android Studio 实现登录注册-源代码 (连接MySql数据库)
Laravel service container (inheritance and events)
NIFI 改UTC时间为CST时间
Differences between href and SRC
The difference between link and @import importing external styles
Strategic cooperation with many institutions shows the strength of the leading company of platofarm yuancosmos
Super simple integration of HMS ml kit to realize parent control
30 knowledge points that must be mastered in quantitative development [what is level-2 data]
Changed crying, and finally solved cannot read properties of undefined (reading 'parsecomponent')
Okaleido tiger logged into binance NFT on July 27, and has achieved good results in the first round