10gR2 DATABASE Installation
1.1 安裝前準備
1.1.1 關閉防火牆、SELINUX
[root@vast ~]# service iptables stop
[root@vast ~]# setenforce 0
[root@vast ~]# chkconfig iptables off
[root@vast ~]# chkconfig --list iptables
iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@vast ~]# vi /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 - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
1.1.2 修改hosts檔案
[root@vast ~]# vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.80.121 vast.vastdata
1.1.3 配置網路卡
[root@vast ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
# Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
DEVICE=eth0
BOOTPROTO=static
HWADDR=00:0C:29:9E:65:FE
IPADDR=192.168.80.121
NETMASK=255.255.255.0
GATEWAY=192.168.80.1
ONBOOT=yes
1.1.4 修改機器版本號
[root@vast ~]# vi /etc/redhat-release
Red Hat Enterprise Linux Server release 4.11 (Tikanga)
修改5.11為4.11
1.1.5 安裝rpm包
[root@vast ~]# cd /misc/cd
[root@vast cd]# ls
blafdoc.css EULA GPL README-en RELEASE-NOTES-en.html Server VT
Cluster eula.en_US images README-en.html RPM-GPG-KEY supportinfo
ClusterStorage eula.py isolinux RELEASE-NOTES-en RPM-GPG-KEY-oracle TRANS.TBL
[root@vast cd]# cd Server/
安裝如下rpm包(以下為oracle10g官方文件標註要求安裝的rpm包)
binutils-2.15.92.0.2-10.EL4
compat-db-4.1.25-9
control-center-2.8.0-12
gcc-3.4.3-9.EL4
gcc-c++-3.4.3-9.EL4
glibc-2.3.4-2
glibc-common-2.3.4-2
gnome-libs-1.4.1.2.90-44.1
libstdc++-3.4.3-9.EL4
libstdc++-devel-3.4.3-9.EL4
make-3.80-5
pdksh-5.2.14-30
sysstat-5.0.5-1
xscreensaver-4.18-5.rhel4.2
1.1.6 建立組、使用者
[root@vast ~]# groupadd oinstall
[root@vast ~]# groupadd dba
[root@vast ~]# groupadd oper
[root@vast ~]# useradd -g oinstall -G dba,oper oracle
[root@vast ~]# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: it is based on a dictionary word
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
1.1.7 新增核心引數
[root@vast ~]# vim /etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
儲存退出執行sysctl –p 使引數生效
[root@vast ~]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 2
net.ipv4.conf.default.accept_source_route = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmax = 65536
kernel.shmall = 4294967296
fs.file-max = 6815744
kernel.msgmni = 2878
kernel.msgmnb = 65536
kernel.sem = 250 32000 100 142
kernel.shmmni = 4096
kernel.shmmax = 4398046511104
kernel.sysrq = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 3145728
net.ipv4.ip_local_port_range = 9000 65500
vm.min_free_kbytes = 51200
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
vm.hugetlb_shm_group = 54322
執行後,會返回所有引數
1.1.8 修改使用者限制
[root@oracle ~]# vim /etc/security/limits.conf
新增如下內容
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
1.1.9 許可權控制
[root@oracle ~]# vim /etc/pam.d/login
新增如下內容
session required /lib/security/pam_limits.so
session required pam_limits.so
1.1.10 修改概要檔案
[root@oracle ~]# vim /etc/profile
將如下資訊新增到檔案最後
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
1.1.11 建立目錄與賦權
[root@vast ~]# mkdir /u01/app/oracle -p
[root@vast ~]# chmod 775 /u01 -R
[root@vast ~]# chown oracle:oinstall /u01 -R
1.1.12 新增oracle使用者環境變數
[root@vast ~]# su - oracle
[oracle@vast ~]$ vi .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/dbhome_1
export ORACLE_SID=orcl
export PATH=$ORACLE_HOME/bin:$PATH
儲存退出
使環境變數生效
[oracle@vast ~]$ source .bash_profile
1.1.13 解壓安裝包
這裡我的安裝包放在了/tmp下,進入到/tmp下
[root@vast ~]$ cd /tmp/
[root@vast tmp]$ ls
10201_database_linux_x86_64.cpio.gz p8202632_10205_Linux-x86-64.zip
gconfd-root rpm.txt
keyring-KqS6j0 ssh-TPBNPv3831
mapping-root virtual-root.KGIV2G
orbit-root
解壓這個壓縮包
[root@vast tmp]# gunzip 10201_database_linux_x86_64.cpio.gz
[root@vast tmp]# ls
10201_database_linux_x86_64.cpio p8202632_10205_Linux-x86-64.zip
gconfd-root rpm.txt
keyring-KqS6j0 ssh-TPBNPv3831
mapping-root virtual-root.KGIV2G
orbit-root
[root@vast tmp]# cpio -idmv < 10201_database_linux_x86_64.cpio
database/stage/prereq/db/refhost_Custom.xml
database/stage/prereq/db/refhost.xml
database/stage/prereq/db/db_prereq.xml
.
.
.
database/doc/server.102/b15658/toc.htm
database/doc/server.102/b15658/tuning.htm
database/doc/server.102/b15658
database/doc/server.102/b15658.pdf
database/doc/server.102
database/doc
database/welcome.html
database
1565626 blocks
[root@vast tmp]# ls
10201_database_linux_x86_64.cpio orbit-root
database p8202632_10205_Linux-x86-64.zip
gconfd-root rpm.txt
keyring-KqS6j0 ssh-TPBNPv3831
mapping-root virtual-root.KGIV2G
1.2 安裝資料庫軟體
進入到oracle使用者下開始安裝
[root@vast tmp]# su - oracle
[oracle@vast ~]$ cd /tmp/database/
[oracle@vast database]$ ls
doc install response runInstaller stage welcome.html
[oracle@vast database]$ ./runInstaller
Starting Oracle Universal Installer...
Checking installer requirements...
Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
Passed
All installer requirements met.
Preparing to launch Oracle Universal Installer from
/tmp/OraInstall2016-09-12_06-48-28PM. Please wait ...[oracle@vast database]$ Starting Installer in advanced mode ...
Oracle Universal Installer, Version 10.2.0.1.0 Production
Copyright (C) 1999, 2005, Oracle. All rights reserved.
(一) 選擇高階安裝“Advanced
Installation”
(二) Oracle產品目錄路徑
(三)選擇安裝版本(安裝企業版)
(四)Oracle家目錄
(五)環境預檢查
(六)只安裝資料庫軟體
(1.安裝資料庫並安裝資料庫 2.配置ASM 3.只安裝資料庫軟體)
(七)點選“Install”開始安裝
(八)安裝進度
(九)執行兩個指令碼
[root@vast ~]# /u01/app/oracle/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oracle/oraInventory to 770.
Changing groupname of /u01/app/oracle/oraInventory to oinstall.
The execution of the script is complete
[root@vast ~]# /u01/app/oracle/product/10.2.0/dbhome_1/root.sh
Running Oracle10 root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/10.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.sh script.
Now product-specific root actions will be performed.
[root@vast ~]#
(十)返回安裝資訊
1.3 安裝資料庫
[oracle@vast database]$ dbca
(一)選擇“Next”
(二)選擇“Create a Database”
(三)選擇建立資料庫的型別
(四)設定資料庫名和SID
(五)配置EM(這一步可選也可不選,EM也可在之後建立)
(六)設定使用者密碼
(七)選擇檔案系統
(八)選擇“Use Database File Locations from Template”
(九)配置快速恢復區路徑以及大小
(十)選擇是否需要樣例(可選可不選)
(十一)Oracle記憶體大小設定,預設是40,但是也可以自己設定
(十二)檢視配置資訊,點選“Finish”開始安裝
(十三)檢視安裝資訊
(十四)安裝完成,點選“Exit”
1.4 驗證是否安裝成功
[oracle@vast database]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Sep 12 19:22:42 2016
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 901775360 bytes
Fixed Size 2024944 bytes
Variable Size 230689296 bytes
Database Buffers 666894336 bytes
Redo Buffers 2166784 bytes
Database mounted.
Database opened.
SQL>
Disconnected from Oracle Database 10g Enterprise Edition Release
10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> exit
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30820196/viewspace-2126428/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- clean all Oracle 10gR2 CRS after a failed CRS installationOracle 10gAI
- 11g oracle database installation with oracle grid infrastructure on linux(文件)OracleDatabaseASTStructLinux
- Creating a 10gr2 Data Guard Physical Standby database with Real-Time applyDatabaseAPP
- Post Installation for Databases Created after Installation of 10.2.0.4.4Database
- Database Companion CD Installation Guide 10g Release 2 (10.2) for Linux x86DatabaseGUIIDELinux
- LDAP Server InstallationLDAServer
- Mysql MAC installationMySqlMac
- installation tips
- 2.3.3.2 Application InstallationAPP
- .NET Core installation for DockerDocker
- How to cleanup ASM installationASM
- Oracle Database on Unix AIX,HP-UX,Linux,Mac OS X,Solaris,Tru64 Unix Operating Systems Installation aOracleDatabaseAILinuxMac
- Oracle 10g installationOracle 10g
- RHEL_PXE_Installation_ServerServer
- Mysql_secure_installation詳解MySql
- MongoDB 3.2 for RHEL6.4 installationMongoDB
- Oracle 10gR2 JDBC介紹Oracle 10gJDBC
- Include manifest for over-the-air installationAI
- Getting oracle agent installation from oemOracle
- Glassfish2.1.1 installation and deply tips
- oracle10g_client_installation_noteOracleclient
- Oracle 10gr2的後的undoOracle 10g
- ?Oracle文件閱讀指南-10gr2Oracle
- Oracle 10gr2 Bug 4437727Oracle 10g
- standby database to primary database.Database
- 07-Plugin ‘scala’ is incompatible with this installationPlugin
- Sugar Ultimate 6.5 Installation and Upgrade GuideGUIIDE
- ASM Installation Logs Location. [ID 1349705.1]ASM
- Adding Drivers into VMWare ESXi Installation Image
- oracle 10gR2中streams的配置[zt]Oracle 10g
- oracle 10gR2 RAC 的一個BUGOracle 10g
- oracle 10gr2 rac 修改auto_startOracle 10g
- 10gR2最大保護模式DataGuard建立模式
- After mysql installation, we need to change the password of root as belowMySql
- How to Clean Up After a Failed Oracle Clusterware (CRS) InstallationAIOracle
- the system administrator has set policies to prevent this installation
- Other two network issues in the installation of Oracle RAC DBOracle
- The database owner SID recorded in the master database differs from the database owner SID recorded in database 'DB_NAME'DatabaseAST