centos7下部署oracle 11g

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6

[root@localhost soft]# cat /etc/redhat-release 
CentOS Linux release 7.6.1810 (Core) 

[root@localhost soft]# df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   37G  7.3G   30G  20% /
devtmpfs                  16G     0   16G   0% /dev
tmpfs                     16G     0   16G   0% /dev/shm
tmpfs                     16G  8.9M   16G   1% /run
tmpfs                     16G     0   16G   0% /sys/fs/cgroup
/dev/sda1               1014M  145M  870M  15% /boot
/dev/sdb1                493G  1.4G  466G   1% /data
tmpfs                    3.2G     0  3.2G   0% /run/user/0
[root@localhost soft]# 
[root@localhost soft]# free -h
              total        used        free      shared  buff/cache   available
Mem:            31G        346M         29G         10M        1.9G         30G
Swap:          2.0G          0B        2.0G
[root@localhost soft]# 


[root@localhost soft]# yum install gcc make binutils gcc-c++ compat-libstdc++-33 elfutils-libelf-devel elfutils-libelf-devel-static ksh libaio libaio-devel numactl-devel sysstat unixODBC unixODBC-devel pcre-devel vim unzip -y

[root@localhost soft]# unzip linux.x64_11gR2_database_1of2.zip
[root@localhost soft]# unzip linux.x64_11gR2_database_2of2.zip

[root@localhost soft]# ll
total 2295604
drwxr-xr-x 8 root root       4096 Aug 21  2009 database
-rw-r--r-- 1 root root 1239269270 Aug 31 09:01 linux.x64_11gR2_database_1of2.zip
-rw-r--r-- 1 root root 1111416131 Aug 30 16:40 linux.x64_11gR2_database_2of2.zip
[root@localhost soft]# 

[root@localhost soft]# vim /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled

[root@localhost soft]# setenforce 0
setenforce: SELinux is disabled
[root@localhost soft]# 
[root@localhost soft]# systemctl stop firewalld
[root@localhost soft]# 
[root@localhost soft]# 
[root@localhost soft]# groupadd oinstall
[root@localhost soft]# groupadd dba
[root@localhost soft]# useradd -g oinstall -G dba oracle
[root@localhost soft]# passwd oracle
Changing password for user oracle.
New password: 
BAD PASSWORD: The password is shorter than 8 characters
Retype new password: 
passwd: all authentication tokens updated successfully.
[root@localhost soft]# 
[root@localhost soft]# 
[root@localhost soft]# vim /etc/sysctl.conf 
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).

vm.max_map_count = 655360
fs.aio-max-nr = 1048576
fs.file-max = 6815744
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 = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
[root@localhost soft]#
[root@localhost soft]# sysctl -p
[root@localhost soft]# 
[root@localhost soft]# 
[root@localhost soft]# mkdir -p /data/oracle/product/11.2.0
[root@localhost soft]# mkdir /data/oracle/oradata
[root@localhost soft]# mkdir /data/oracle/inventory
[root@localhost soft]# mkdir /data/oracle/fast_recovery_area
[root@localhost soft]# chown -R oracle:oinstall /data/oracle/
[root@localhost soft]# chmod -R 775 /data/oracle/
[root@localhost soft]# 
[root@localhost soft]# 
[C:\~]$ ssh -p oracle@ip
[oracle@localhost ~]$ vim .bash_profile
ORACLE_BASE=/data/oracle
ORACLE_HOME=$ORACLE_BASE/product/11.2.0
ORACLE_SID=orcl
PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT
NLS_LANG=AMERICAN_AMERICA.AL16UTF16;export NLS_LANG
[oracle@localhost ~]$
[oracle@localhost ~]$ cp -r /data/soft/database/response/ .
[oracle@localhost ~]$ ll
total 0
drwxr-xr-x 2 oracle oinstall 61 Aug 31 09:41 response
[oracle@localhost ~]$ cd response/
[oracle@localhost response]$ vim db_install.rsp 
#------------------------------------------------------------------------------
# Specify the installation option.
# It can be one of the following:
# 1. INSTALL_DB_SWONLY
# 2. INSTALL_DB_AND_CONFIG
# 3. UPGRADE_DB
#-------------------------------------------------------------------------------
oracle.install.option=INSTALL_DB_SWONLY
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/data/oracle/inventory
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/data/oracle/product/11.2.0
ORACLE_BASE=/data/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=dba
DECLINE_SECURITY_UPDATES=true

[oracle@localhost response]$ cd /data/soft/database/
[oracle@localhost database]$ ./runInstaller -silent -responseFile

/home/oracle/response/db_install.rsp -ignorePrereq

[root@localhost ~]# sh /data/oracle/inventory/orainstRoot.sh 


Changing permissions of /data/oracle/inventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /data/oracle/inventory to oinstall.
The execution of the script is complete.


[root@localhost ~]# sh /data/oracle/product/11.2.0/root.sh 


[oracle@localhost ~]$ netca /silent /responsefile /home/oracle/response/netca.rsp 

Parsing command line arguments:
    Parameter "silent" = true
    Parameter "responsefile" = /home/oracle/response/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
    Running Listener Control: 
      /data/oracle/product/11.2.0/bin/lsnrctl start LISTENER
    Listener Control complete.
    Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0
[oracle@localhost ~]$ 
[oracle@localhost ~]$ vim /home/oracle/response/dbca.rsp 
GDBNAME = "orcl"
SID = "orcl"
SYSPASSWORD = "oracle"
SYSTEMPASSWORD = "oracle"
SYSMANPASSWORD = "oracle"
DBSNMPPASSWORD = "oracle"
DATAFILEDESTINATION=/data/oracle/oradata
RECOVERYAREADESTINATION=/data/oracle/fast_recovery_area
CHARACTERSET = "ZHS16GBK"
[oracle@localhost response]$ 


[oracle@localhost response]$ dbca -silent -responseFile /home/oracle/response/dbca.rsp
Copying database files
1% complete
3% complete
11% complete
18% complete
26% complete
37% complete
Creating and starting Oracle instance
40% complete
45% complete
50% complete
55% complete
56% complete
60% complete
62% complete
Completing Database Creation
66% complete
70% complete
73% complete
85% complete
96% complete
100% complete
Look at the log file "/data/oracle/cfgtoollogs/dbca/orcl/orcl.log" for further details.

[oracle@localhost response]$ ps -ef | grep ora | grep -v grep

[oracle@localhost response]$ cd
[oracle@localhost ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 31-AUG-2023 11:21:47

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                31-AUG-2023 10:43:17
Uptime                    0 days 0 hr. 38 min. 30 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /data/oracle/product/11.2.0/network/admin/listener.ora
Listener Log File         /data/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
Services Summary...
Service "orcl" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully

[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Thu Aug 31 11:22:19 2023

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> 
SQL> select distinct owner from dba_objects;

OWNER
------------------------------
OWBSYS_AUDIT
MDSYS
PUBLIC
OUTLN
CTXSYS
OLAPSYS
FLOWS_FILES
OWBSYS
SYSTEM
ORACLE_OCM
EXFSYS

OWNER
------------------------------
APEX_030200
SCOTT
DBSNMP
ORDSYS
ORDPLUGINS
SYSMAN
APPQOSSYS
XDB
ORDDATA
SYS
WMSYS

OWNER
------------------------------
SI_INFORMTN_SCHEMA

23 rows selected.

SQL> 

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6
标签: centosoracle