2017年9月20日 星期三

ORACLE Install 10g in RHEL5.8

自己的記錄

https://oracle-base.com/articles/10g/oracle-db-10gr2-installation-on-rhel-5


1   setup monitor

system-config-display  
選右邊的那個按鈕

2
mount  -o loop /mnt/

[root@localhost ~]#
 mkdir /mnt/cdrom 
 mount /dev/sr0 /mnt/cdrom
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@localhost ~]#




2 yum setup

rm -rf /etc/yum.repos.d/*
vi "/etc/yum.repos.d/yum.repo"

[rpm]
name=RPM
baseurl=file:///mnt/cdrom/Server
enabled=1
gpgcheck=0

3   must be
 vi /etc/hosts

Hosts File

The "/etc/hosts" file must contain a fully qualified name for the server.
vi /etc/hosts
....    


Set Kernel Parameters

Add the following lines to the "/etc/sysctl.conf" file.
vi  "/etc/sysctl.conf" 

#kernel.shmall = 2097152
#kernel.shmmax = 2147483648
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
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

Add the following lines to the "/etc/security/limits.conf" file.
vi "/etc/security/limits.conf"
*               soft    nproc   2047
*               hard    nproc   16384
*               soft    nofile  1024
*               hard    nofile  65536

Disable secure linux by editing the "/etc/selinux/config" file, making sure the SELINUX flag is set as follows.
vi  /etc/selinux/config
SELINUX=disabled

Disable Service

for i in sendmail yum-updatesd  iscsi iscsid  cups  ip6tables portmap 
do 
echo $i
chkconfig  $i  off
done

Setup

Install the following packages.

 网上找了很多资料说是缺少包,但是安装了之后还是一样的问题,最后看到了一篇文章说是缺少“glibc-devel-2.5-49.i386.rpm”安装之后问题解决,为什么64的OS上要安装32位的包呢?到现在还是不明白,请大家多多指点!
rpm -import /mnt/cdrom/RPM-GPG-KEY-redhat-release


yum -y install   setarch-2*   make-3*  glibc-2*  libaio-0* \
compat-libstdc++-33-3* compat-gcc-34-3* compat-gcc-34-c++-3* \
gcc-4*  libXp-1*  openmotif-2*  compat-db-4*

%%重要
yum install -y  glibc-devel-2.5-123*

Create the new groups and users.
groupadd oinstall
groupadd dba
groupadd oper

#useradd -g oinstall -G dba oracle
usermod -g oinstall -G dba oracle
passwd oracle

Edit the "/etc/redhat-release" file replacing the current release information (Red Hat Enterprise Linux Server release 5 (Tikanga)) with the following:
vi  /etc/redhat-release
redhat-4


Create the directories in which the Oracle software will be installed.
mkdir -p /u01/app/oracle/product/10.2.0/db_1
chown -R oracle.oinstall /u01


Login as the oracle user and add the following lines at the end of the ".bash_profile" file.
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=TSH1; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

if [ $USER = "oracle" ]; then
  if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
  else
    ulimit -u 16384 -n 65536
  fi
fi


Unpack Files

First unzip the files.
gunzip 10201_database_linux_x86_64.cpio.gz
Next unpack the contents of the files.
cpio -idmv < 10201_database_linux_x86_64.cpio
You should now have a single directory (Disk1) containing installation files.


升級至於10.2.0.4
1
unzip p6810189_10204_Linux-x86-64.zip 







沒有留言:

RHEL install EPEL

  https://www.linuxtechi.com/install-epel-repo-on-rhel-system/ EPEL dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest...