普通安装
1、安装必要的rpm
yum install compat-db compat-libstdc++ control-center gcc gcc-c++ glibc glibc-common gnome-libs libstdc++ libstdc++-devel make pdksh sysstat xscreensaver setarch libXp libaio libXp-devel libgcc libaio-devel* glibc-devel glibc elfutils-libelf elfutils-libelf-devel binutils unixODBC unixODBC-developenmotif-y
2、修改内核参数 limits
vim /etc/security/limits.conf
oracle soft nofile 65536
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
3、修改内核参数 sysctl
vim /etc/sysctl.conf
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.shmall = 2097152
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
4、让内核生效
/sbin/sysctl -p
5、修改版本
vim /etc/redhat-release
5改成4
6、添加用户和组
groupadd dba
groupadd oinstall
useradd -g oinstall -G dba -m oracle
7、建目录
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01
8、编辑oracle用户配置文件
vim /home/oracle/.bashrc
export ORACLE_BASE=/u01/app/oracle
export
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export
PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_OWNER=oracle
export
ORACLE_SID=orcl
export ORACLE_TERM=vt100
export
THREADS_FLAG=native
export
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export
PATH=$ORACLE_HOME/bin:$PATH
export LANG=en_US
9、解压缩安装文件
tar zxvf oracle_10gr2.tar.gz
chown -R oracle:oinstall database
如果是cpio.gz的格式就
gunzip xxxx.cpio.gz
cpio -idmv < xxx.cpio
10、开始安装
xhost +
su - oracle
./runInstaller
11、安装完毕执行
在root用户下执行
/u01/app/oracle/oraInventory/orainstRoot.sh
/u01/app/oracle/product/10.2.0/db_1/root.sh
静默安装
从第10步开始,走下面流程:
10':准备应答文件
vim /tmp/enterprise.rsp
RESPONSEFILE_VERSION=2.2.1.0.0
FROM_LOCATION="/mnt/database/stage/products.xml"
ORACLE_HOME="/u01/app/oracle/product/10.2.0/db_1"
ORACLE_HOME_NAME="OraDb10g_home1"
TOPLEVEL_COMPONENT={"oracle.server","10.2.0.1.0"}
DEINSTALL_LIST={"oracle.server","10.2.0.1.0"}
SHOW_SPLASH_SCREEN=false
SHOW_WELCOME_PAGE=false
SHOW_COMPONENT_LOCATIONS_PAGE=false
SHOW_CUSTOM_TREE_PAGE=false
SHOW_SUMMARY_PAGE=false
SHOW_INSTALL_PROGRESS_PAGE=false
SHOW_REQUIRED_CONFIG_TOOL_PAGE=false
SHOW_CONFIG_TOOL_PAGE=false
SHOW_RELEASE_NOTES=false
SHOW_ROOTSH_CONFIRMATION=false
SHOW_END_SESSION_PAGE=false
SHOW_EXIT_CONFIRMATION=false
NEXT_SESSION=false
NEXT_SESSION_ON_FAIL=false
SHOW_DEINSTALL_CONFIRMATION=false
SHOW_DEINSTALL_PROGRESS=false
ACCEPT_LICENSE_AGREEMENT=true
COMPONENT_LANGUAGES={"en"}
CLUSTER_NODES=
INSTALL_TYPE="EE"
s_nameForDBAGrp=dba
s_nameForOPERGrp=dba
b_oneClick=false
SHOW_DATABASE_CONFIGURATION_PAGE=false
b_createStarterDB=false
运行安装文件,指明应答文件
./runInstaller -silent -responseFile /tmp/enterprise.rsp
或
./runInstaller -ignoreSysPrereqs -silent -responseFile /tmp/enterprise.rsp
12、安装完毕执行
在root用户下执行
/u01/app/oracle/oraInventory/orainstRoot.sh
/u01/app/oracle/product/10.2.0/db_1/root.sh
特别注意:
不要在x86_64的平台上安装i386版本的Oracle,不然会出现很多链接出问题的情况(例如ins_net_client.mk无法创建等)。切记切记。