oracle19c安裝 單例項 系統centos7 非cdb
一.安裝centos系統(此處 以centos7.9為例)略
二.配置本地yum源
http://blog.itpub.net/70004783/viewspace-2789438/
三、 資料庫安裝準備工作
Hostname |
dbserver |
版本 |
oracle19c |
Oracle_sid |
prod1 |
dbname |
prod |
home |
/home/oracle |
ORACLE_BASE |
/u01/app/oracle |
ORACLE_HOME |
/u01/app/oracle/product/19c/dbhome_1 |
1、安裝需要的軟體列表
yum install -y bc yum install -y compat-libcap1* yum install -y compat-libcap* yum install -y binutils yum install -y compat-libstdc++-33 yum install -y elfutils-libelf yum install -y elfutils-libelf-devel yum install -y gcc yum install -y gcc-c++ yum install -y glibc-2.5 yum install -y glibc-common yum install -y glibc-devel yum install -y glibc-headers yum install -y ksh libaio yum install -y libaio-devel yum install -y libgcc yum install -y libstdc++ yum install -y libstdc++-devel yum install -y make yum install -y sysstat yum install -y unixODBC yum install -y unixODBC-devel yum install -y binutils* yum install -y compat-libstdc* yum install -y elfutils-libelf* yum install -y gcc* yum install -y glibc* yum install -y ksh* yum install -y libaio* yum install -y libgcc* yum install -y libstdc* yum install -y make* yum install -y sysstat* yum install -y libXp* yum install -y glibc-kernheaders yum install -y net-tools-*
2、修改主機名,更改hosts檔案
[root@localhost ~]# hostnamectl set-hostname dbserver
[root@dbserver ~]# vi /etc/hosts [root@dbserver ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 10.8.98.102 dbserver [root@dbserver ~]#
3、 禁用SELINUX,關閉防火牆
[root@dbserver ~]
# cat /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
# SELINUXTYPE= can take one of three values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
[root@dbserver ~]
#
讓SELINUX生效: setenforce 0
[root@dbserver ~]
# systemctl stop firewalld
[root@dbserver ~]
# systemctl disable firewalld
4、修改LINUX的核心檔案
[root@dbserver ~]# vi /etc/sysctl.conf 新增 #oracle setting add kernel.shmmax = 277495689510912 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048586 fs.file-max = 6815744 kernel.shmall = 67747971072 net.ipv4.tcp_max_tw_buckets = 6000 net.ipv4.ip_local_port_range = 9000 65500 net.ipv4.tcp_tw_recycle = 0 net.ipv4.tcp_tw_reuse = 1 #net.core.somaxconn = 262144 net.core.netdev_max_backlog = 262144 net.ipv4.tcp_max_orphans = 262144 net.ipv4.tcp_max_syn_backlog = 262144 net.ipv4.tcp_synack_retries = 2 net.ipv4.tcp_syn_retries = 1 net.ipv4.tcp_fin_timeout = 1 net.ipv4.tcp_keepalive_time = 30 net.ipv4.tcp_keepalive_probes = 6 net.ipv4.tcp_keepalive_intvl = 5 net.ipv4.tcp_timestamps = 0 fs.aio-max-nr = 1048576 net.ipv4.conf.all.rp_filter = 2 net.ipv4.conf.default.rp_filter = 2
生成系統引數生效 [root@dbserver ~]# sysctl -p
5.新增下列引數到/etc/security/limits.conf
[root@dbserver ~]# vi /etc/security/limits.conf 新增以下 #oracle setting add oracle soft nofile 1024 oracle hard nofile 65536 oracle soft nproc 16384 oracle hard nproc 16384 oracle soft stack 10240 oracle hard stack 32768 oracle hard memlock 134217728 oracle soft memlock 134217728
6、修改/etc/pam.d/login檔案
[root@dbserver ~]# vim /etc/pam.d/login 新增以下 #oracle setting add session required /lib/security/pam_limits.so session required pam_limits.so
7、環境變數中新增下列語句
[root@dbserver ~]# vim /etc/profile 新增以下 #oracle setting add if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi
[root@dbserver ~]# source /etc/profile
8、建立檔案目錄和相應的使用者
groupadd oinstall groupadd dba groupadd oper useradd -g oinstall -G dba,oper oracle mkdir -p /u01/app/oracle mkdir -p /u01/oraInventory chown -R oracle.oinstall /u01 chown -R oracle:oinstall /u01/app/oracle chmod -R 775 /u01/app/oracle mkdir -p /u01/app/oracle/product/19c/dbhome_1 chown -R oracle:oinstall /u01/app/oracle/product/
修改oracle使用者密碼 [root@dbserver ~]# passwd oracle
9、配置ORACLE使用者的環境變數
[oracle@dbserver ~]$ vi .bash_profile 新增以下 #oracle setting add export EDITOR=vi export TMP=/tmp export TMPDIR=$TMP export ORACLE_SID=prod1 export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/19c/dbhome_1 export INVENTORY_LOCATION=/u01/oraInventory export TNS_ADMIN=$ORACLE_HOME/network/admin export LD_LIBRARY_PATH=$ORACLE_HOME/lib export NLS_LANG="AMERICAN_AMERICA.ZHS16GBK" export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS" export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin:$PATH:$HOME/bin umask 022
注意此處:
export ORACLE_SID=prod1 ####我此處設定的oracle_id為prod1 export NLS_LANG="AMERICAN_AMERICA.ZHS16GBK" ####我此處設定的字符集為ZHS16GBK
[oracle@dbserver ~]$ source .bash_profile
10、 上傳oracle檔案到/home/oracle 目錄,注意許可權問題,都給oracle使用者許可權
19C需要將壓縮包裡的內容解壓到$ORACLE_HOME目錄下,我們為了方便直接將安裝包複製到$ORACLE_HOME目錄解壓即可。
[oracle@dbserver ~]$ cd $ORACLE_HOME [oracle@dbserver dbhome_1]$ ls [oracle@dbserver dbhome_1]$ pwd /u01/app/oracle/product/19c/dbhome_1 [oracle@dbserver dbhome_1]$ ll total 2987996 -rw-r--r--. 1 oracle oinstall 3059705302 Sep 1 16:59 LINUX.X64_193000_db_home.zip [oracle@dbserver dbhome_1]$
解壓
[oracle@dbserver dbhome_1]$ unzip LINUX.X64_193000_db_home.zip
重啟以下系統
11、root安裝vnc,oracle啟動vnc
切換到root安裝vnc,透過vnc安裝oracle [root@dbserver ~]# yum install *vnc* 切換到oracle 啟動vnc [oracle@dbserver ~]$ vncserver You will require a password to access your desktops. Password: Verify: Would you like to enter a view-only password (y/n)? n A view-only password is not used New 'dbserver:1 (oracle)' desktop is dbserver:1 Creating default startup script /home/oracle/.vnc/xstartup Creating default config /home/oracle/.vnc/config Starting applications specified in /home/oracle/.vnc/xstartup Log file is /home/oracle/.vnc/dbserver:1.log [oracle@dbserver ~]$
12、oracle使用者 透過vnc客戶端連線圖形介面,進入相應目錄,準備開始安裝資料庫
四、僅安裝資料庫軟體
一步一步如下圖所示
透過yum嘗試安裝缺失的軟體包,如果沒有,則忽略繼續
root 賬戶執行這兩個指令碼 ,執行完再點選上圖的ok
[root@dbserver /]
# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of
/u01/app/oraInventory
.
Adding
read
,write permissions
for
group.
Removing
read
,write,execute permissions
for
world.
Changing groupname of
/u01/app/oraInventory
to oinstall.
The execution of the script is complete.
[root@dbserver /]
# /u01/app/oracle/product/19c/dbhome_1/root.sh
Performing root user operation
for
Oracle 19c
The following environment variables are
set
as:
ORACLE_OWNER= oracle
ORACLE_HOME=
/u01/app/oracle/product/19c
/dbhome_1
Enter the full pathname of the
local
bin directory: [
/usr/local/bin
]:
Copying dbhome to
/usr/local/bin
...
Copying oraenv to
/usr/local/bin
...
Copying coraenv to
/usr/local/bin
...
Creating
/etc/oratab
file
...
Entries will be added to the
/etc/oratab
file
as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
[root@dbserver /]
#
五、netca調出圖形介面建立監聽
六、dbca建立資料庫如下
七、登陸資料庫檢視是否正常
SQL> select name from v$datafile; NAME -------------------------------------------------------------------------------- /u01/app/oracle/oradata/PROD/system01.dbf /u01/app/oracle/oradata/PROD/sysaux01.dbf /u01/app/oracle/oradata/PROD/undotbs01.dbf /u01/app/oracle/oradata/PROD/users01.dbf SQL>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/70004783/viewspace-2789887/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle19c安裝_cdbOracle
- oracle11g安裝 單例項 系統centos7Oracle單例CentOS
- 5.6單例項安裝單例
- Redis單例項安裝Redis單例
- mysql 5.7單例項安裝MySql單例
- oracle單例項12.2.0.1安裝Oracle單例
- 安裝Mongodb3.0.6單例項MongoDB單例
- ogg for oracle 19c 非cdb安裝配置Oracle
- oracle 11g 單例項安裝Oracle單例
- centos7系統安裝xrdp教程。CentOS
- Centos7系統安裝wgetCentOSwget
- win10安裝centos7系統以及雙系統啟動項的恢復Win10CentOS
- 單機環境安裝配置ASM例項ASM
- 19C 單例項資料庫安裝單例資料庫
- mysql-5.6.31安裝(單例項 Linux)MySql單例Linux
- ORACLE 單例項完全解除安裝資料庫Oracle單例資料庫
- CentOS7系統GitLab安裝部署教程。CentOSGitlab
- 騰訊雲Centos7系統安裝phpmyAdminCentOSPHP
- centos7 安裝elk日誌分析系統CentOS
- centos7系統msyqldump 客戶端安裝CentOS客戶端
- 【安裝】AIX安裝單例項11gR2 GRID+DBAI單例
- centos7安裝單機kafkaCentOSKafka
- Oracle 11G資料庫單例項安裝Oracle資料庫單例
- Window下安裝Oracle ASM單例項資料庫OracleASM單例資料庫
- Oracle 12C 單例項安裝文件( 官方文件)Oracle單例
- centos7系統安裝mysql(MariaDB)的教程CentOSMySql
- Centos7系統路由追蹤安裝使用教程。CentOS路由
- 單例項,分散式系統體系結構簡介單例分散式
- Memcached安裝與使用例項
- oracle 11g 單例項資料庫的安裝Oracle單例資料庫
- Oracle 10g 安裝及單例項遷移到RACOracle 10g單例
- 系統安裝win10與 linux centos7Win10LinuxCentOS
- Centos7系統中找不到yum及安裝方法。CentOS
- oracle例項安裝到 4% 不能繼續安裝Oracle
- ORACLE-LINUX環境字元介面單例項安裝OracleLinux字元單例
- Oracle 12C 單例項資料庫靜默安裝Oracle單例資料庫
- Oracle 11.2.4.0 ADG 單例項安裝(COPY建立備庫)Oracle單例
- CentOS7 快速高效,簡單安裝 lnmpCentOSLNMP