RHEL5.5 64位部署ORACLE 10G 10204
1. 系統資訊
1.1 主機資訊
1.2 網路資訊
2. 安裝虛擬機器
3. 配置安裝環境
3.1 建立使用者、組及目錄
3.2 建立環境變數
3.3 安裝依賴包
3.4 修改系統版本
3.5 修改核心引數
3.6 修改使用者限制
3.7 修改登入驗證
4. 安裝資料庫
5. 升級資料庫
6. 建立資料庫
7. 配置監聽
序號 |
作業系統 |
版本 |
記憶體 |
Swap |
磁碟 |
防火牆 |
SELinux |
1 |
RHEL |
5.5-x86_64 |
2G |
2G |
40G |
關閉 |
禁用 |
[root@oracle10g ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.5 (Tikanga)
[root@oracle10g ~]# grep MemTotal /proc/meminfo
MemTotal: 2057360 kB
[root@oracle10g ~]# grep SwapTotal /proc/meminfo
SwapTotal: 2048276 kB
[root@oracle10g ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 37G 2.6G 33G 8% /
/dev/sda1 99M 12M 82M 13% /boot
tmpfs 1005M 0 1005M 0% /dev/shm
.host:/ 98G 62G 37G 63% /mnt/hgfs
[root@oracle10g ~]# /etc/init.d/iptables status
Firewall is stopped.
[root@oracle10g ~]# getenforce
Disabled
序號 |
主機名 |
IP |
掩碼 |
閘道器 |
1 |
oracle10g |
192.168.230.180 |
255.255.255.0 |
192.168.230.2 |
[root@oracle10g ~]# cat /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.230.180 oracle10g
[root@oracle10g ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=oracle10g
[root@oracle10g ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
HWADDR=00:0c:29:d3:a0:ef
IPADDR=192.168.230.180
NETMASK=255.255.255.0
GATEWAY=192.168.230.2
參考http://blog.itpub.net/28536251/viewspace-1455365/安裝Linux系統。
建立使用者、組及目錄指令碼,並執行指令碼。
[root@oracle10g ~]# cat ora_user_dir.sh
#!/bin/bash
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
echo "123456" | passwd --stdin oracle
mkdir -p /u01/oraInventory
chown -R oracle:oinstall /u01/
chmod -R 775 /u01/
[root@oracle10g ~]# sh ora_user_dir.sh
Changing password for user oracle.
passwd: all authentication tokens updated successfully.
建立環境變數列表檔案,並增加環境變數到配置檔案。
[root@oracle10g ~]# cat ora_env.txt
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
ORACLE_SID=stone; export ORACLE_SID
PATH=$ORACLE_HOME/bin:$PATH; export PATH
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
[root@oracle10g ~]# cat ora_env.txt >> /home/oracle/.bash_profile
建立依賴包列表檔案,並安裝依賴包
[root@oracle10g ~]# cat ora_software1.txt
binutils*
compat-libstdc++*
elfutils-libelf*
elfutils-libelf-devel*
elfutils-libelf-devel-static*
gcc*
gcc-c++*
glibc*
glibc-common*
glibc-devel*
glibc-headers*
kernel-headers*
ksh*
libaio*
libaio*
libgcc*
libgomp*
libstdc++*
libstdc++-devel*
libXp*
libXt*
make*
sysstat*
unixODBC*
unixODBC-devel*
[root@oracle10g ~]# cat ora_software1.txt | xargs yum install –y
因為Oracle 10g官方只支援到RHEL4為止,所以需要更改版本說明,編輯/etc/redhat-release檔案,刪除Red Hat Enterprise Linux Server release 5 (Tikanga),增加redhat-4。
[root@oracle10g ~]# cat /etc/redhat-release
redhat-4
建立記憶體引數列表檔案,將內容增加到/etc/sysctl.conf檔案中。
[root@oracle10g ~]# cat sysctl.txt
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
[root@oracle10g ~]# cat sysctl.txt >> /etc/sysctl.conf
[root@oracle10g ~]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
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
[root@oracle10g ~]# id oracle
uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba)
[root@oracle10g ~]# echo "501" >/proc/sys/vm/hugetlb_shm_group
[root@oracle10g ~]# cat /proc/sys/vm/hugetlb_shm_group
501
建立使用者列表檔案,將內容增加到/etc/security/limits.conf檔案中。
[root@oracle10g ~]# cat oraclelimit.txt
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
[root@oracle10g ~]# cat oraclelimit.txt >> /etc/security/limits.conf
[root@oracle10g ~]# tail -4 /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
更改/etc/pam.d/login檔案,新增下面的內容,使使用者限制生效。
[root@oracle10g ~]# tail -1 /etc/pam.d/login
session required pam_limits.so
[root@oracle10g ~]# su - oracle
[oracle@oracle10g ~]$ cpio -idmv < /mnt/hgfs/data/oracle/software/10204/10201_database_linux_x86_64.cpio
[oracle@oracle10g ~]$ ls
database
[oracle@oracle10g ~]$ cd database/
[oracle@oracle10g database]$ ls
doc install response runInstaller stage welcome.html
[oracle@oracle10g database]$ export DISPLAY=192.168.230.1:0.0
[oracle@oracle10g database]$ ./runInstaller
選擇高階模式。
指定庫存目錄和安裝組。
選擇企業版。
增加簡體中文語言。
指定安裝目錄。
安裝環境檢查。
如果提示swap不夠,可以使用以下方式增加swap。
[root@oracle10g ~]# dd if=/dev/zero of=/tmp/swap bs=1M count=2000
2000+0 records in
2000+0 records out
2097152000 bytes (2.1 GB) copied, 52.036 seconds, 40.3 MB/s
[root@oracle10g ~]# ll -h /tmp/swap
-rw-r--r-- 1 root root 2.0G Aug 13 18:28 /tmp/swap
[root@oracle10g ~]# mkswap /tmp/swap
Setting up swapspace version 1, size = 2097147 kB
[root@oracle10g ~]# swapon -s
Filename Type Size Used Priority
/dev/sda2 partition 2048276 12 -1
[root@oracle10g ~]# swapon /tmp/swap
[root@oracle10g ~]# swapon -s
Filename Type Size Used Priority
/dev/sda2 partition 2048276 12 -1
/tmp/swap file 2047992 0 -2
[root@oracle10g ~]#/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@oracle10g ~]# /u01/app/oracle/product/10.2.0/db_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/db_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@oracle10g ~]# yum install java-1.6.0-openjdk*
[root@oracle10g ~]# su - oracle
[oracle@oracle10g ~]$ jar xvf /mnt/hgfs/data/oracle/software/10204/p6810189_10204_Linux-x86-64.zip
[oracle@oracle10g ~]$ ls
database Disk1 README.html
[oracle@oracle10g ~]$ cd Disk1/
[oracle@oracle10g Disk1]$ ls
10204_buglist.htm install patch_note.htm response runInstaller stage
[oracle@oracle10g Disk1]$ export DISPLAY=192.168.230.1:0.0
[oracle@oracle10g Disk1]$ chmod 755 runInstaller
[oracle@oracle10g Disk1]$ chmod 755 /home/oracle/Disk1/install/.oui
[oracle@oracle10g Disk1]$ chmod 755 /home/oracle/Disk1/install/unzip
[oracle@oracle10g Disk1]$ ./runInstaller –ignoresysprereqs
需要加上–ignoresysprereqs引數,不然會報版本不對的錯誤。
[root@oracle10g ~]# /u01/app/oracle/product/10.2.0/db_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/db_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying coraenv to /usr/local/bin ...
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.
[oracle@oracle10g ~]$ dbca
[oracle@oracle10g ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Thu Aug 13 19:38:59 2015
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[root@oracle10g ~]# su - oracle
[oracle@oracle10g ~]$ export DISPLAY=192.168.230.1:0.0
[oracle@oracle10g ~]$ netmgr
[oracle@oracle10g ~]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 14-AUG-2015 09:09:58
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.4.0 - Production
System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.230.180)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.230.180)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.4.0 - Production
Start Date 14-AUG-2015 09:09:58
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.230.180)(PORT=1521)))
Services Summary...
Service "stone" has 1 instance(s).
Instance "stone", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28536251/viewspace-1772729/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORACLE資料庫10G部署Oracle資料庫
- Windows Server 2008下ORACLE 10G 10204 重建資料庫WindowsServerOracle 10g資料庫
- 【原創】goldengate 在rhel5.5 oracle 10g/11g x64bit中的自動啟動GoOracle 10g
- Oracle 10g Grid Control 部署初步完成Oracle 10g
- Oracle database /etc/sysctl.conf (RHEL5.5 64bit)OracleDatabase
- rhel5.5 linux系統下安裝Oracle 11gLinuxOracle
- 【Option】部署安裝Oracle 10g的Data Mining元件Oracle 10g元件
- oracle client 10201 upgrade to 10204Oracleclient
- oracle 10201 升級到10204 for windowsOracleWindows
- oracle 10204 64 bit on aix 5.3 nbu 備份問題OracleAI
- ORACLE 10g下載|ORACLE 10g下載地址|ORACLE 10g官網下載地址Oracle 10g
- oracle 10204終結版psu昨天釋出(10.2.0.4.9)Oracle
- oracle 10204rac 歸檔切換 ORA-19054Oracle
- oracle 10g patchOracle 10g
- ORACLE 10G AUTOTRACEOracle 10g
- oracle asm 10gOracleASM
- recyclebin for oracle 10gOracle 10g
- Oracle 10g flashbackOracle 10g
- Glossary Oracle 10gOracle 10g
- ORACLE10201手動升級到10204Oracle
- oracle 10g flashback databaseOracle 10gDatabase
- Oracle 10g RAC NFSOracle 10gNFS
- oracle 10g em建立Oracle 10g
- ORACLE 10G 升級Oracle 10g
- Oracle 10g RAC TAFOracle 10g
- oracle 10g RMAN管理Oracle 10g
- ORACLE 10G AWR 速查!Oracle 10g
- Oracle AS 10g 10.1.2.0.2Oracle
- Oracle 10G 跟蹤Oracle 10g
- oracle 10g的程式Oracle 10g
- oracle 10g em patchOracle 10g
- Oracle 10g Scheduler 特性Oracle 10g
- Oracle 10g AS基本管理Oracle 10g
- oracle 10g logmnrOracle 10g
- oracle 10g downloadOracle 10g
- ORACLE 10G expdp/impdpOracle 10g
- oracle 10g logminerOracle 10g
- oracle 10g ADDMOracle 10g