CentOS下Oracle 10g的安裝
The following operating system groups and user are required if you are installing Oracle Database:
-
You must create this group the first time you install Oracle Database software on the system. It identifies operating system user accounts that have database administrative privileges (the SYSDBA privilege). The default name for this group is dba.
If you want to specify a group name other than the default dba group, then you must choose the Custom installation type to install the software or start Oracle Universal Installer as a user that is not a member of this group. In this case, Oracle Universal Installer prompts you to specify the name of this group.
-
This is an optional group. Create this group if you want a separate group of operating system users to have a limited set of database administrative privileges (the SYSOPER privilege). By default, members of the OSDBA group also have the SYSOPER privilege.
If you want to specify a separate OSOPER group, other than the default dba group, then you must choose the Custom installation type to install the software or start Oracle Universal Installer as a user that is not a member of the dba group. In this case, Oracle Universal Installer prompts you to specify the name of this group. The usual name chosen for this group is oper.
-
Verify that the unprivileged user nobody exists on the system. The nobody user must own the external jobs (extjob) executable after the installation.
The following operating system group and user are required for all installations:
-
The Oracle Inventory group (oinstall)
You must create this group the first time you install Oracle software on the system. The usual name chosen for this group is oinstall. This group owns the Oracle inventory, which is a catalog of all Oracle software installed on the system.
Note:
If Oracle software is already installed on the system, then the existing Oracle Inventory group must be the primary group of the operating system user that you use to install new Oracle software. -
The Oracle software owner user (typically, oracle)
You must create this user the first time you install Oracle software on the system. This user owns all of the software installed during the installation. This user must have the Oracle Inventory group as its primary group. It must also have the OSDBA and OSOPER groups as secondary groups.
#!/bin/bash
# determining whether the oracle inverntory group exists,if exists nothing will
# be done,otherwise add the inverntory group
if [ `cat /etc/group | grep "^oinstall$" >> oracle.log 2>1&` ]
then
:
else
$(/usr/sbin/groupadd oinstall)
fi
# determining whether the osdba group exists,if not exists add,otherwise do
# nothing
if [ `cat /etc/group | grep "^dba$" >> oracle.log 2>1&` ]
then
:
else
$(/usr/sbin/groupadd dba)
fi
# determining whether the optional osoper group exists,if not exists add,
# otherwise do nothing
if [ `cat /etc/group | grep "^oper$" >> oracle.log 2>1&` ]
then
:
else
$(/usr/sbin/groupadd oper)
fi
# determining whether the oracle software owner user exists,if not exists add,
# otherwise do nothing
if [ `id "oracle" >> oracle.log 2>1&` ]
then
:
else
/usr/sbin/useradd -g oinstall -G dba,oper oracle
fi
# determining whether the user nobody exists,if not exists add,
# otherwise do nothing
if [ `id "nobody" >> oracle.log 2>1&` ]
then
:
else
/usr/sbin/useradd nobody
fi
# increase the shell limits
# 1.
echo 'oracle soft nproc 2047' >> /etc/security/limits.conf
echo 'oracle hard nproc 16384' >> /etc/security/limits.conf
echo 'oracle soft nofile 1024' >> /etc/security/limits.conf
echo 'oracle hard nofile 65536' >> /etc/security/limits.conf
# 2.
if [ `grep "/lib/security/pam_limits.so" /etc/pam.d/login >> oracle.log 2>1&` ]
then
:
else
echo 'session required /lib/security/pam_limits.so' >> /etc/pam.d/login
fi
#3.
echo 'if [ $USER="oracle" ];then' >> /etc/profile
echo ' if [ $SHELL = "/bin/ksh" ];then' >> /etc/profile
echo ' ulimit -p 16384' >> /etc/profile
echo ' ulimit -n 65536' >> /etc/profile
echo ' else' >> /etc/profile
echo ' ulimit -u 16384 -n 65536' >> /etc/profile
echo ' fi' >> /etc/profile
echo 'fi' >> /etc/profile
# we add a file, so oracle will treate ubuntu as redhat
touch /etc/redhat-release
echo "Red Hat Linux release 4.1" > /etc/redhat-release
# change the kernel parameter
cp /etc/sysctl.conf /etc/sysctl.conf.bak
if [ `grep "^kernel.shmall" /etc/sysctl.conf >> oracle.log 2>1&` ]
then
sed "s/kernel.shmall/d/" /etc/sysctl.conf > /tmp/sysctl.conf.temp
mv /tmp/sysctl.conf.temp /etc/sysctl.conf
echo "kernel.shmall = 2097152" >> /etc/sysctl.conf
else
echo "kernel.shmall = 2097152" >> /etc/sysctl.conf
fi
if [ `grep "^kernel.shmmni" /etc/sysctl.conf >> oracle.log 2>1&` ]
then
sed "s/kernel.shmmni/d/" /etc/sysctl.conf > /tmp/sysctl.conf.temp
mv /tmp/sysctl.conf.temp /etc/sysctl.conf
echo "kernel.shmmni = 4096" >> /etc/sysctl.conf
else
echo "kernel.shmmni = 4096" >> /etc/sysctl.conf
fi
if [ `grep "^kernel.shmmax" /etc/sysctl.conf >> oracle.log 2>1&` ]
then
sed "s/kernel.shmmax/d/" /etc/sysctl.conf > /tmp/sysctl.conf.temp
mv /tmp/sysctl.conf.temp /etc/sysctl.conf
echo "kernel.shmmax = 2147483648" >> /etc/sysctl.conf
else
echo "kernel.shmmax = 2147483648" >> /etc/sysctl.conf
fi
if [ `grep "^kernel.sem" /etc/sysctl.conf >> oracle.log 2>1&` ]
then
sed "s/kernel.sem/d/" /etc/sysctl.conf > /tmp/sysctl.conf.temp
mv /tmp/sysctl.conf.temp /etc/sysctl.conf
echo "kernel.sem = 250 32000 100 128" >> /etc/sysctl.conf
else
echo "kernel.sem = 250 32000 100 128" >> /etc/sysctl.conf
fi
if [ `grep "^fs.file-max" /etc/sysctl.conf >> oracle.log 2>1&` ]
then
sed "s/fs.file-max/d/" /etc/sysctl.conf > /tmp/sysctl.conf.temp
mv /tmp/sysctl.conf.temp /etc/sysctl.conf
echo "fs.file-max = 65536" >> /etc/sysctl.conf
else
echo "fs.file-max = 65536" >> /etc/sysctl.conf
fi
if [ `grep "^net.ipv4.ip_local_port_range" /etc/sysctl.conf >> oracle.log 2>1&` ]
then
sed "s/net.ipv4_local_port_range/d/" /etc/sysctl.conf > /tmp/sysctl.conf.temp
mv /tmp/sysctl.conf.temp /etc/sysctl.conf
echo "net.ipv4_local_port_range = 1024 65000" >> /etc/sysctl.conf
else
echo "net.ipv4_local_port_range = 1024 65000" >> /etc/sysctl.conf
fi
if [ `grep "^net.core.rmem_default" /etc/sysctl.conf >> oracle.log 2>1&` ]
then
sed "s/net.core.rmem_default/d/" /etc/sysctl.conf > /tmp/sysctl.conf.temp
mv /tmp/sysctl.conf.temp /etc/sysctl.conf
echo "net.core.rmem_default = 1048576" >> /etc/sysctl.conf
else
echo "net.core.rmem_default = 1048576" >> /etc/sysctl.conf
fi
if [ `grep "^net.core.rmem_max" /etc/sysctl.conf >> oracle.log 2>1&` ]
then
sed "s/net.core.rmem_max/d/" /etc/sysctl.conf > /tmp/sysctl.conf.temp
mv /tmp/sysctl.conf.temp /etc/sysctl.conf
echo "net.core.rmem_max = 1048576" >> /etc/sysctl.conf
else
echo "net.core.rmem_max = 1048576" >> /etc/sysctl.conf
fi
if [ `grep "^net.core.wmem_max" /etc/sysctl.conf >> oracle.log 2>1&` ]
then
sed "s/net.core.wmem_max/d/" /etc/sysctl.conf > /tmp/sysctl.conf.temp
mv /tmp/sysctl.conf.temp /etc/sysctl.conf
echo "net.core.wmem_max = 262144" >> /etc/sysctl.conf
else
echo "net.core.wmem_max = 262144" >> /etc/sysctl.conf
fi
if [ `grep "^net.core.wmem_default" /etc/sysctl.conf >> oracle.log 2>1&` ]
then
sed "s/net.core.wmem_default/d/" /etc/sysctl.conf > /tmp/sysctl.conf.temp
mv /tmp/sysctl.conf.temp /etc/sysctl.conf
echo "net.core.wmem_default = 262144" >> /etc/sysctl.conf
else
echo "net.core.wmem_default = 262144" >> /etc/sysctl.conf
fi
sysctl -p
# check oracle home directory
if [ -s "/etc/oraInst.loc" ]
then
:
else
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle
echo 'export ORACLE_BASE=/u01/app/oracle' >> /etc/profile
mkdir -p /u01/oradata
chown -R oracle:oinstall /u01/oradata
chmod -R 775 /u01/oradata
mkdir -p /u01/flash_recovery_area
chown -R oracle:oinstall /u01/flash_recovery_area
chmod -R 775 /u01/flash_recovery_area
. /etc/profile
fi
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7899089/viewspace-628188/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- centOS 5下安裝Oracle 10g所需的軟體包CentOSOracle 10g
- centos下安裝oracleCentOSOracle
- CentOS 5.8上安裝Oracle 10gCentOSOracle 10g
- linux下安裝oracle 10gLinuxOracle 10g
- AIX6.1下 Oracle 10g的安裝AIOracle 10g
- CentOS4.6安裝Oracle 10g RAC tipsCentOSOracle 10g
- CENTOS下oracle10g安裝的配置CentOSOracle
- 在Linux下安裝Oracle 10g的方法LinuxOracle 10g
- CentOS 7下安裝Oracle 11gCentOSOracle
- CentOS 下 R 的安裝CentOS
- CentOs下jdk的安裝CentOSJDK
- 32位Linux下安裝Oracle 10gLinuxOracle 10g
- [oracle]centos 7 安裝oracleOracleCentOS
- centos下安裝dockerCentOSDocker
- Centos下安裝cassandraCentOS
- centos下安裝nginxCentOSNginx
- Centos下安裝NessusCentOS
- CentOS下expect 安裝CentOS
- centos下安裝ZooKeeperCentOS
- centos下安裝memcachedCentOS
- Centos下安裝ffmpegCentOS
- 安裝centOS版本oracleCentOSOracle
- numpy在centos下的安裝CentOS
- CentOS 6.5安裝Oracle 11.2.0.4------CentOS 6.5安裝CentOSOracle
- 安裝CentOS4.8 ORACLE 10g軟體 資料庫建立CentOSOracle 10g資料庫
- CentOs下Mongodb的下載與安裝CentOSMongoDB
- linux下安裝oracle 10g 的艱難之旅(轉)LinuxOracle 10g
- CentOS 7.4下安裝Oracle 11.2.0.4資料庫CentOSOracle資料庫
- centos 下docker映象安裝CentOSDocker
- centos下安裝jenkinsCentOSJenkins
- centos下安裝tomcatCentOSTomcat
- CentOS下安裝配置cmakeCentOS
- CentOS 5.5下安裝ActiveMQCentOSMQ
- CentOS下yum安裝MySQLCentOSMySql
- azkaban在centos下的部署安裝CentOS
- centos/linux下的安裝mysqlCentOSLinuxMySql
- centos/linux下的安裝gitCentOSLinuxGit
- centos/linux下的安裝NginxCentOSLinuxNginx