SUSE Install Oracle
来源:互联网 发布:淘宝运营费用 编辑:程序博客网 时间:2024/05/01 14:14
SUSE Linux Oracle Install
一、安装环境
1、服务器环境
SUSE LinuxEnterprise 11 sp1
2、Oracle依赖包
binutils-2.19(installed)
gcc-4.3 (installed)
gcc-c++-4.3(installed)
glibc-2.9(installed)
glibc-devel-2.9(installed)
ksh-93t(installed)
libstdc++33-3.3.3(installed)
libstdc++43-4.3.3_20081022(installed)
libstdc++43-devel-4.3.3_20081022(installed)
libaio-0.3.104(installed)
libaio-devel-0.3.104(installed)
libgcc43-4.3.3_20081022(installed)
libstdc++-devel-4.3(installed)
make-3.81(installed)
sysstat-8.1.5(no install)
unixODBC-2.2.12-198.17.i586.rpm(noinstall)
unixODBC-devel-2.2.12-198.17.i586.rpm(noinstall)
二、安装
1、配置环境
1、配置 /etc/sysctl.conf
fs.aio-max-nr =1048576
fs.file-max =6815744
kernel.shmall = 2097152
kernel.shmmax =536870912
kernel.shmmni =4096
kernel.sem = 25032000 100 128
net.ipv4.ip_local_port_range= 9000 65500
net.core.rmem_default= 262144
net.core.rmem_max =4194304
net.core.wmem_default= 262144
net.core.wmem_max =1048586
net.ipv4.tcp_wmem =262144 262144 262144
net.ipv4.tcp_rmem =4194304 4194304 4194304
# /sbin/chkconfigboot.sysctl on 让suse启动时加载/etc/sysctl.conf
# /sbin/sysctl–p 使修改的参数立即生效
2、配置/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
3、配置/etc/security/limits.conf
oracle softnproc 2047
oracle hardnproc 16384
oracle soft nofile1024
oracle hard nofile65536
oracle hardstack 10240
4、配置/etc/pam.d/login
session required /lib/security/pam_limits.so
session required pam_limits.so
5、创建用户、用户组、Oracle目录并授权
# groupadd dba
# groupadd oinstall
#useradd -g oinstall -G dba -m oracle
# passwd oracle
# mkdir oraInventory
# mkdir oracle
# chown –R oracle:oinstalldatabase
# chown –R oracle:oinstalloracle
# chown –R oracle:oinstalloraInventory
6、配置oracle环境变量
umask=022
ORACLE_BASE=/oracle
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db
ORACLE_SID=orcl
LD_LIBRARY_PATH=$ORACLE_HOME/lib
PATH=$PATH:$ORACLE_HOME/bin:/usr/lib
export PATH ORACLE_BASE ORACLE_HOME ORACLE_SIDLD_LIBRARY_PATH
2、配置自动启动
vi /etc/oratab,修改行:
orcl:/opt/oracle/11g:N为 orcl:/opt/oracle/11g:Y
以root身份建立开机启动oracle服务的脚本:vi /etc/init.d/oracle,添加如下脚本:
#!/bin/sh
#chkconfig: 2345 2080
#description: Oracledbstart / dbshut
#上面两行配置chkconfig
ORA_HOME=/usr/local/oracle/product/11.2.0/db
ORA_OWNER=oracle
LOGFILE=/var/log/oracle.log
echo"########################################################################################################################">> ${LOGFILE}
date +"%T %a %D: RunOracle" >> ${LOGFILE}
if [ ! -f ${ORA_HOME}/bin/dbstart] || [ ! -f ${ORA_HOME}/bin/dbshut ]; then
echo "Error: Missing the script file${ORA_HOME}/bin/dbstart or ${ORA_HOME}/bin/dbshut!" >> ${LOGFILE}
echo"########################################################################################################################">> ${LOGFILE}
exit
fi
start(){
echo "Startup Database..."
su - ${ORA_OWNER} -c"${ORA_HOME}/bin/dbstart ${ORA_HOME}"
echo "Done."
echo "Run database control..."
su - ${ORA_OWNER} -c"${ORA_HOME}/bin/emctl start dbconsole"
echo "Done."
}
stop(){
echo "Stop database control..."
su - ${ORA_OWNER} -c"${ORA_HOME}/bin/emctl stop dbconsole"
echo "Done."
echo "Shutdown Database..."
su - ${ORA_OWNER} -c"${ORA_HOME}/bin/dbshut ${ORA_HOME}"
echo "Done."
}
case "$1" in
'start')
start >> ${LOGFILE}
;;
'stop')
stop >> ${LOGFILE}
;;
'restart')
stop >> ${LOGFILE}
start >> ${LOGFILE}
;;
esac
date +"%T %a %D:Finished." >> ${LOGFILE}
echo "########################################################################################################################">> ${LOGFILE}
echo ""
使用如下命令将 /etc/init.d/oracle 置为可执行文件:
chmod a+x /etc/init.d/oracle
将 oracle 添加到 chkconfig中:
chkconfig--add oracle
可使用如下命令查看和设置oracle服务的开机启动级别:
chkconfig| grep oracle #查看oracle服务的开机启动级别
chkconfig--level24 oracle off #修改oracle服务的开机启动级别
chkconfig --level 35 oracle on
建立连接:
ln -s /etc/init.d/oracle /etc/rc.d/rc0.d/K01oracle #关机执行
ln -s /etc/init.d/oracle /etc/rc.d/rc6.d/K01oracle #重启执行
- SUSE Install Oracle
- Install Oracle 10g on SuSE 10
- Suse 11 Install KVM
- suse install python pip
- qmail install in SUSE linux
- install vmtools on Suse 11
- SUSE 11 SP4 Install NTP
- SUSE 11 SP4 Install vsftpd
- SUSE 12 SP2 Install FTP
- SUSE 12 SP2 Install ntp
- supervisord suse 11 sp2 install
- SuSE oracle startup automatically
- Auto install SUSE 11 on KVM
- install a manually downloaded RPM on SUSE
- SUSE 11 SP4 Install VMware 12
- Suse 11 Install Mysql 5.7.15
- Suse 11 Install Nginx 1.10.1
- Suse 11 Install openssl 1.0.1c
- 《第2章:线程安全性》一种常见的加锁约定
- 分享WMRNET-IV低功耗水表、燃气表无线扩频抄表系统 - APPCON
- ExtJs之组件(window)
- 无法打开包含文件#include”cxtypes.h”问题————OpenCV笔记
- 动态链接库的RPATH和RUNPATH解惑
- SUSE Install Oracle
- uva 10163 Storage Keepers
- Android学习(22)-实战要点
- ExtJs之列表(grid)
- ORACLE常用数值函数、转换函数、字符串函数
- interface脱耦合和Android当中onclickListener接口浅析
- Roman to Integer - LeetCode
- 使用OpenMP给程序加速
- SIGPIPE信号详解