1、 检查OS环境 ,确定以下包被安装
Rpm -qa |grep ‘^binutils’
binutils-2.15.92.0.2-13.EL4 compat-db-4.1.25-9 compat-libstdc++-296-2.96-132.7.2 control-center-2.8.0-12 gcc-3.4.3-22.1.EL4 gcc-c++-3.4.3-22.1.EL44 glibc-2.3.4-2.9 glibc-common-2.3.4-2.9 gnome-libs-1.4.1.2.90-44.1 libstdc++-3.4.3-22.1 libstdc++-devel-3.4.3-22.1 make-3.80-5 pdksh-5.2.14-30 sysstat-5.0.5-1 xscreensaver-4.18-5.rhel4.2 setarch-1.6-1 rpm -Uvh libXp-1* rpm -Uvh openmotif-2*
2、 修改IP
# cat /etc/hosts
192.168.100.16 myhost.us.mycompany.com myhost 127.0.0.1 localhost localhost.localdomain
3、 添加组(dba,oper,oinstall)
# /usr/sbin/groupadd oinstall # /usr/sbin/groupadd dba # /usr/sbin/groupadd oper
4、 创建用户oracle,将其加入组
# /usr/sbin/useradd -g oinstall -G dba,oper oracle
5、 修改文件 /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 = 1048576 net.core.rmem_max = 1048576 net.core.wmem_default = 262144 net.core.wmem_max = 262144
6、 修改文件 /etc/security/limits.conf
oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536
7、 修改文件 /etc/pam.d/login
session required /lib/security/pam_limits.so session required pam_limits.so
8、 修改文件 /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
9、 创建ORACLE_BASE目录,修改oracle对ORACLE_BASE的访问权限
# mkdir -p /mount_point/app/oracle_sw_owner # chown -R oracle:oinstall /mount_point/app/oracle_sw_owner # chmod -R 775 /mount_point/app/oracle_sw_owner
10、 创建ORALE_DATA目录,权限修改
# mkdir /mount_point/oradata # chown oracle:oinstall /mount_point/oradata # chmod 775 /mount_point/oradata
11、 编辑oracle的.bash_profile文件
export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/database/10.2.0/db_1 export ORACLE_SID=yaodb export PATH=$ORACLE_HOME/bin:/$PATH
12、 测试图形界面
xclock
13、 创建/media/cdrom
mkdir /media/cdrom
14、 放入oracle10g镜像文件
mount –t iso9660 /dev/cdrom /media/cdrom $/media/cdrom/database/runInstaller -ignorePatchConflicts
15、 设置显示语言
export LANG=C
16、 执行配置脚本
17、 dbca建库
18、 netca 创建监听器
(可先配置PATH路径:.bash_profile)
export PATH=$ORACLE_HOME/bin:$PATH
. .bash_profile
修改listenre.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /bank/oracle/oracle10g/product/10.2.0/db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL DBNAME = bkserver)
(SID_NAME = bkserver)
)
)
19、 netca tnsname.ora
20、 启动监听器 lsnrctl stop lsnrctl start
21、 sqlplus
22、 用sys用户登录,若提示连接到空闲实例,àstartup,如果报错
ORA-01078,则
则pfile下找到init.ora.nnnnnnn 复制到指定位置 initSID.ora
再用SYS用户登录,startup
The following J2EE Applications have been deployed and are accessible at the URLs listed below.
iSQL*Plus URL:
http://localhost.localdomain:5560/isqlplus
iSQL*Plus DBA URL:
http://localhost.localdomain:5560/isqlplus/dba
Enterprise Manager 10g Database Control URL:
http://localhost.localdomain:1158/em