1. 以root登录,挂载linux iso文件
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
2. 检查包是否安装
(软件包源码位于iso下的server目录下)
rpm –q compat-db
rpm -qa | grep compat
如果没有安装:则
#rpm -ivh sudo-1.7.2...rpm
――――――――――――――
Red Hat Enterprise Linux 4.0 and Asianux 2.0:
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 需要装
xscreensaver-4.18-5.rhel4.2
setarch-1.6-1
5.4上安装Oracle 10g时提示如下错误:
Exception in thread “main” java.lang.UnsatisfiedLinkError: /tmp/OraInstall2009-11-25_02-34-42PM/jre/1.4.2/lib/i386/libawt.so:libXp.so.6: cannot open shared object file: No such file or directory
原因是缺少了包,装上如下的包就可以了。
# rpm -ivh libXp-1.0.0-8.1.el5.i386.rpm
3.vi /etc/hosts
192.168.100.16 myhost.us.mycompany.com myhost
127.0.0.1 localhost localhost.localdomain
4. Creating Required Operating System Groups and Users 创建用户组
# /usr/sbin/groupadd dba
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd oper
5. Creating an Oracle Software Owner User
# /usr/sbin/useradd -g oinstall -G dba,oper oracle 创建用户oracle
# passwd oracle
6.
vi /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
7.
vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
8.
vi /etc/pam.d/login
session required /lib/security/pam_limits.so
session required pam_limits.so
9.
vi /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
10.
# mkdir -p /u01/app/oracle
# chown –R oracle:oinstall /u01/app/oracle
# chmod -R 775 /u01/app/oracle
o # mkdir /u01/flash_recovery_area
o # chown oracle:oinstall /u01/flash_recovery_area
o # chmod 775 /u01/flash_recovery_area
10.su – oracle
vi .bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/10.2.0
export ORACLE_SID=teacher
11.
. .bash_profile
env | grep ORA
若无生效,则需测试图形界面($)
若不成功则:
exit
#xhost local:oracle(后到VM中测试)
Xclock
12.换光盘
Su - root
# umount /mnt/cdrom
# mount /dev/cdrom /mnt/cdrom
13.安装
Su - oracle
/mnt/cdrom/database/runinstaller (-ignoreSysPreReqs)
export LANG=C
安装时不选择装数据库
按图示说明运行脚本。
登陆蓝色部分网址是需要启动该服务:
14.创建监听器
netca
无法使用时,先配置.bash_profile
export PATH=$ORACLE_HOME/bin:$PATH
. .bash_profile
lsnrctl status
15.建库
Dbca
以下密码是:abc123
测试数据库:
Exit
安装结束。
登陆oracl管理网站,测试看是否可以访问: