分类: Oracle
2009-11-04 13:11:09
# 解压oracle安装文件
zcat lnx_920_disk1.cpio.gz | cpio -idmv
# 解决 warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID*****
rpm --import /etc/pki/rpm-gpg/RPM*
# 挂载iso文件
mount -o loop /root/rhel-server-5.3-x86_64-dvd.iso /mnt/cdrom
# 访问windows 共享
mount -t cifs //192.168.1.121/a /mnt/zcl -o username=a,password=a
# 由于orcale10不支持 RHEL5 所以需要修改/etc/redhat_realease 将 Red Hat Enterprise Linux Server release 5 (Tikanga)
# 改为Red Hat Enterprise Linux Server release 4 (Tikanga)
# 因为SELINUX对oracle有影响,所以把secure linux设成无效,编辑文件 /etc/selinux/config :
# SELINUX=disabled
rpm -Uvh setarch-2*
rpm -Uvh make-3*
rpm -Uvh glibc-2*
rpm -Uvh libaio-0*
rpm -Uvh compat-libstdc++-33-3*
rpm -Uvh compat-gcc-34-3*
rpm -Uvh compat-gcc-34-c++-3*
rpm -Uvh gcc-4*
rpm -Uvh libXp-1*
rpm -Uvh openmotif-2.3.1-2.el5.x86_64.rpm
rpm -Uvh compat-db-4*
rpm -Uvh glibc-devel-2.5-34.i386.rpm
rpm -Uvh sysstat-7.0.2-3.el5.x86_64.rpm
配置内核参数 vi /etc/sysctl.conf
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
# 建立oracle用户
groupadd oinstall
groupadd dba
useradd -m -g oinstall -G dba oracle
# 设置密码
passwd oracle
# 改变权限
chown -R oracle:oinstall /home/oracle
chmod -R 775 /home/oracle
# 修改oracle的profile文件
vi /home/oracle/.bash_profile
# 加入以下内容
ORACLE_BASE=/home/oracle/oracle;export ORACLE_BASE
ORACLE_SID=orcl;export ORACLE_SID
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1;export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$PATH; export PATH
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK; export NLS_LANG
# 保存后执行 source /home/oracle/.bash_profile
用root用户执行 xhost +
用oracle用户执行以下操作:
因为中文有乱码所以设置用英文安装 export LC_ALL=en_US
在安装过程中选择高级安装,并将数据库语言选中文 字符集选GBK的。
用oracle用户进入到oracle10g的安装目录下,./runInstaller,出现安装界面,一步一步安装即可。
emca -config dbcontrol db
emctl start dbconsole