oracle11g安裝 單例項 系統centos7
一.安裝centos系統(此處以centos7.9為例)略
二.配置本地yum源
http://blog.itpub.net/70004783/viewspace-2789438/
三、 資料庫安裝準備工作
Hostname |
dbserver |
版本 |
oracle11.2.0.4 |
Oracle_sid |
prod1 |
dbname |
prod |
home |
/home/oracle |
ORACLE_BASE |
/u01/app/oracle |
ORACLE_HOME |
/u01/app/oracle/product/11.2.0/dbhome_1 |
1、安裝需要的軟體列表
yum install binutils -y yum install compat-libcap1 -y yum install compat-libstdc -y yum install gcc -y yum install gcc-c++ -y yum install glibc -y yum install glibc-devel -y yum install ksh -y yum install libgcc -y yum install libstdc++ -y yum install libstdc++-devel -y yum install libaio -y yum install libaio-devel -y yum install libXext -y yum install libXtst -y yum install libX11 -y yum install libXau -y yum install libxcb -y yum install libXi -y yum install make -y yum install sysstat -y yum install unixODBC -y yum install unixODBC-devel –y
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、新增組與使用者,並修改oracle使用者密碼
/usr/sbin/groupadd -g 60001 oinstall /usr/sbin/groupadd -g 60002 dba /usr/sbin/groupadd -g 60003 oper /usr/sbin/useradd -u 61002 -g oinstall -G dba oracle
[root@dbserver ~]# passwd oracle
4、建立相應的資料夾
mkdir -p /u01/app/oracle/product/11.2.0/dbhome_1 chown -R oracle:oinstall /u01 chmod -R 775 /u01/
5、修改作業系統引數
vi /etc/security/limits.conf 新增以下 #ORACLE SETTING oracle soft nproc 16384 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 oracle soft stack 10240 oracle hard stack 32768
6、禁用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
7、關閉防火牆
[root@dbserver ~]# systemctl stop firewalld [root@dbserver ~]# systemctl disable firewalld
8、修改/etc/pam.d/login檔案
vi /etc/pam.d/login #ORACLE SETTING session required pam_limits.so
9、修改sysctl.conf配置檔案
[root@dbserver ~]# vi /etc/sysctl.conf 新增一下 #ORACLE SETTING fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmmax = 8589934592 kernel.shmall = 2097152 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 = 1048586
若為2G記憶體則設定
#kernel.shmmax = 2147483648 (2*1024*1024*1024)
#kernel.shmall = 524288 (實體記憶體2*1024*1024*1024/4K)
(大於SGA,小於實體記憶體,例:實體記憶體90%)
若為8G記憶體設定為(其餘類推)
#kernel.shmmax = 8589934592
#kernel.shmall = 2097152
讓配置生效:
sysctl -p
10、oracle環境變數設定
[oracle@dbserver ~]$ vi .bash_profile 新增以下 # Oracle Settings oracle TMP=/tmp; export TMP TMPDIR=$TMP; export TMPDIR export ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME ORACLE_SID=prod1; export ORACLE_SID ORACLE_TERM=xterm; export ORACLE_TERM PATH=/usr/sbin:$PATH; export PATH PATH=$ORACLE_HOME/bin:$PATH; export 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.ZHS16GBK;export NLS_LANG
注意:
此處最後一行我語言選擇的是ZHS16GBK
退出oracle再登陸檢查一下oracle環境變數有沒設定好 [oracle@dbserver ~]$ env | grep ORACLE ORACLE_SID=prod1 ORACLE_BASE=/u01/app/oracle ORACLE_TERM=xterm ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 [oracle@dbserver ~]$
上傳oracle檔案到/home/oracle 目錄,注意許可權問題,都給oracle使用者許可權
[oracle@dbserver ~]$ ll total 2487476 drwxr-xr-x 7 oracle oinstall 136 Aug 27 2013 database drwxr-xr-x 2 oracle oinstall 6 Aug 31 08:47 Desktop drwxr-xr-x 2 oracle oinstall 6 Aug 31 08:47 Documents drwxr-xr-x 2 oracle oinstall 6 Aug 31 08:47 Downloads drwxr-xr-x 2 oracle oinstall 6 Aug 31 08:47 Music -rwxr-xr-x. 1 oracle oinstall 1395582860 Aug 30 16:40 p13390677_112040_Linux-x86-64_1of7.zip -rwxr-xr-x. 1 oracle oinstall 1151304589 Aug 30 16:40 p13390677_112040_Linux-x86-64_2of7.zip drwxr-xr-x 2 oracle oinstall 6 Aug 31 08:47 Pictures drwxr-xr-x 2 oracle oinstall 6 Aug 31 08:47 Public -rwxr-xr-x. 1 oracle oinstall 279608 Aug 30 16:40 rlwrap-0.42.tar.gz drwxr-xr-x 2 oracle oinstall 6 Aug 31 08:47 Templates drwxr-xr-x 2 oracle oinstall 6 Aug 31 08:47 Videos [oracle@dbserver ~]$
重啟一下系統
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、透過vnc客戶端連線,準備開始安裝資料庫
以下透過vnc在圖形介面進行操作
透過圖形介面進入相應目錄,解壓oracle軟體
[oracle@dbserver ~]$ pwd
/home/oracle
[oracle@dbserver ~]$ ls
Desktop Documents Downloads Music p13390677_112040_Linux-x86-64_1of7.zip p13390677_112040_Linux-x86-64_2of7.zip Pictures Public rlwrap-0.42.tar.gz Templates Videos
[oracle@dbserver ~]$ unzip p13390677_112040_Linux-x86-64_1of7.zip
[oracle@dbserver ~]$ unzip p13390677_112040_Linux-x86-64_2of7.zip
進入解壓後的database資料夾,執行./runInstaller命令
[oracle@dbserver database]$ ls
install readme.html response rpm runInstaller sshsetup stage welcome.html
[oracle@dbserver database]$ pwd
/home/oracle/database
[oracle@dbserver database]$ ./runInstaller
四、僅安裝資料庫軟體
一步一步如下圖所示
可以透過root賬戶嘗試安裝這幾個缺的軟體包。
86% 報錯:Error in invoking target 'agent nmhs' of makefile
解決方案:
在
makefile中新增連結libnnz11庫的引數
修改
$ORACLE_HOME/sysman/lib/ins_emagent.mk,將
$(MK_EMAGENT_NMECTL)修改為:
$(MK_EMAGENT_NMECTL) -lnnz11
建議修改前備份原始檔案
[oracle@dbserver lib]$ cd $ORACLE_HOME/sysman/lib [oracle@dbserver lib]$ cp ins_emagent.mk ins_emagent.mk.bak [oracle@dbserver lib]$ vi ins_emagent.mk
進入vi編輯器後 命令模式輸入 /NMECTL 進行查詢,快速定位要修改的行
原來:
$(SYSMANBIN)emdctl:
$(MK_EMAGENT_NMECTL)
修改後:
$(SYSMANBIN)emdctl:
$(MK_EMAGENT_NMECTL) -lnnz11
儲存退出後 retry
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/11.2.0/dbhome_1/root.sh Performing root user operation for Oracle 11g The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/11.2.0/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建立資料庫如下
七、登陸資料庫檢視是否正常
[oracle@dbserver ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Tue Aug 31 11:17:53 2021 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select * from dual; D - X SQL>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/70004783/viewspace-2789569/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle19c安裝 單例項 系統centos7 非cdbOracle單例CentOS
- 5.6單例項安裝單例
- Redis單例項安裝Redis單例
- mysql 5.7單例項安裝MySql單例
- oracle單例項12.2.0.1安裝Oracle單例
- 安裝Mongodb3.0.6單例項MongoDB單例
- Oracle11g 搭建單例項DataGuardOracle單例
- oracle 11g 單例項安裝Oracle單例
- centos7系統安裝xrdp教程。CentOS
- Centos7系統安裝wgetCentOSwget
- oracle11g asm單例項重建hasOracleASM單例
- 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單例
- Oracle11g使用rman從單例項遷移到racOracle單例
- 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單例