Oracle安装和使用
1、下载rpm包:
Linux/i386/updates/12.1/i386/sysstat-7.0.2-3.el5.asp121.i386.rpm">ftp://195.220.108.108/linux/ASPLinux/i386/updates/12.1/i386/sysstat-7.0.2-3.el5.asp121.i386.rpm
ftp://rpmfind.net/linux/fedora/releases/9/Everything/i386/os/Packages/libaio-0.3.106-4.2.i386.rpm
ftp://rpmfind.net/linux/fedora/releases/9/Everything/i386/os/Packages/libaio-devel-0.3.106-4.2.i386.rpm
ftp://fr.rpmfind.net/linux/fedora/releases/10/Everything/i386/os/Packages/unixODBC-2.2.12-9.fc10.i386.rpm
ftp://fr.rpmfind.net/linux/fedora/releases/10/Everything/i386/os/Packages/unixODBC-devel-2.2.12-9.fc10.i386.rpm
2、配置内核参数
修改/etc/systl.conf,增加以下参数
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
修改完后运行sysctl -p
3、创建安装数据库所需要的组
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba Oracle
passwd Oracle
修改/etc/sudoers文件
增加一行,使得Oracle用户有sudo权限,否则用Oracle用户登录无法进行一些操作
%oinstall ALL=(ALL) NOPASSWD: ALL
4、添加Oracle限制参数
修改/etc/security/limits.conf,增加
Oracle soft uproc 2047
Oracle hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
修改/etc/pam.d/login,增加
session required /lib/security/pam_limits.so
session required pam_limits.so
修改/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
设置Oracle环境变量
vi /home/Oracle/.bash_profile,修改
umask 022
TMP=/mnt/Oracle/tmp
TMPDIR=/mnt/Oracle/tmp
export TMP TMPDIR
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
export ORACLE_BASE=/mnt/Oracle/app/Oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_UNQNAME=orcl
export ORACLE_SID=orcl
export PATH=$ORACLE_HOME/bin:${PATH}
export ORACLE_PATH=$ORACLE_HOME:$ORACLE_HOME/rdbms/admin:.
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/lib
export LIBPATH=${LIBPATH}:$ORACLE_HOME/lib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/jlib:$ORACLE_HOME/network/jlib:$ORACLE_HOME/jdk
/jre
5、创建安装目录
mkdir -p /mnt/Oracle/app
chown -R Oracle:oinstall /mnt/Oracle/app
chmod -R 755 /mnt/Oracle/app
创建临时目录
mkdir /mnt/Oracle/tmp
chmod a+wr /mnt/Oracle/tmp
6、解压安装包
unzip linux_11gR2_database_1of2.zip
unzip linux_11gR2_database_2of2.zip
cd database
sh runInstaller
安装过程如果遇到管理口令无法输入的情况,先在全局数据名里面点一下,再点管理口令就可以输入了
================启动过程================
「em启动过程」
1、emctl start dbconsole
2、打开浏览器输入:https://localhost:1158/em
3、启动监听程序
点击启
相关新闻>>
- 发表评论
-
- 最新评论 更多>>