​Oracle安装笔记
Oracle安装笔记
只修改时间,输入:date -s 14:15:00
同时修改日期时间,注意要加双引号,日期与时间之间有一空格,输入:date -s "2015-08-03 14:15:00"
修改完后,记得输入:clock -w
root用户登录
1,交换区检查:
grep MemTotal /proc/meminfo
grep SwapTotal /proc/meminfo
2,磁盘空间情况
[root@localhost app]# df -h
注意,如果切换用户su - oracle时出现-bash-3.2$的提示符是因为把oracle用户的.bash_profile最前面的if语句注释掉的问题,放开就好了。
系统参数修改
1,修改内核
增加到/etc/sysctl.conf中
# For Oracle Install
fs.file-max = 6553600
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
配置生效:
[root@localhost ~]# sysctl -p
2,修改用户资源限制
/etc/security/limits.conf
#Oracle Install Add
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
3,登录限制
/etc/pam.d/login
session required /lib/security/pam_limits.so
4,
Vim /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
安装包
1,安装包检查
rpm -q gcc make binutils openmotif setarch compat-db compat-gcc \
> compat-gcc-c++ compat-libstdc++ compat-libstdc++-devel
2,安装
rpm -Uvh compat-db-4.2.52-5.1.i386.rpm
rpm -Uvh compat-db-4.2.52-5.1.x86_64.rpm
rpm -Uvh libaio-0.3.106-5.i386.rpm
rpm -Uvh libaio-0.3.106-5.x86_64.rpm
rpm -Uvh libaio-devel-0.3.106-5.i386.rpm
rpm -Uvh libaio-devel-0.3.106-5.x86_64.rpm
rpm -Uvh compat-libstdc++-33-3.2.3-61.i386.rpm
rpm -Uvh compat-libstdc++-33-3.2.3-61.x86_64.rpm
rpm -Uvh glibc-kernheaders-2.4-9.1.98.EL.i386.rpm
rpm -Uvh glibc-headers-2.5-49.x86_64.rpm
rpm -Uvh glibc-devel-2.5-49.i386.rpm
rpm -Uvh glibc-devel-2.5-49.x86_64.rpm
rpm -Uvh compat-gcc-34-3.4.6-4.x86_64.rpm
rpm -Uvh compat-gcc-34-c++-3.4.6-4.x86_64.rpm
rpm -Uvh libXp-1.0.0-8.1.el5.i386.rpm
rpm -Uvh libXp-1.0.0-8.1.el5.x86_64.rpm
rpm -Uvh openmotif-2.3.1-2.el5_4.1.i386.rpm
rpm -Uvh openmotif-2.3.1-2.el5_4.1.x86_64.rpm
rpm -Uvh gcc-4.1.2-48.el5.x86_64.rpm
rpm -Uvh gcc-c++-4.1.2-48.el5.x86_64.rpm
rpm -Uvh glibc-2.5-49.i686.rpm
rpm -Uvh glibc-2.5-49.x86_64.rpm
rpm -Uvh libgomp-4.4.0-6.el5.i386.rpm
rpm -Uvh libgomp-4.4.0-6.el5.x86_64.rpm
rpm -Uvh binutils-2.17.50.0.6-14.el5.x86_64.rpm
rpm -Uvh fontconfig-devel-2.4.1-7.el5.i386.rpm
rpm -Uvh fontconfig-devel-2.4.1-7.el5.x86_64.rpm
rpm -Uvh freetype-devel-2.2.1-21.el5_3.i386.rpm
rpm -Uvh freetype-devel-2.2.1-21.el5_3.x86_64.rpm
rpm -Uvh kernel-headers-2.6.18-194.el5.x86_64.rpm
rpm -Uvh libstdc++44-devel-4.4.0-6.el5.x86_64.rpm
rpm -Uvh libXmu-1.0.2-5.i386.rpm
rpm -Uvh make-3.81-3.el5.x86_64.rpm
rpm -Uvh setarch-2.0-1.1.x86_64.rpm
rpm -Uvh sysstat-7.0.2-3.el5.x86_64.rpm
rpm -Uvh zlib-devel-1.2.3-3.x86_64.rpm
增加用户名
/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -m -g oinstall -G dba oracle
id oracle
passwd oracle
修改变量
修改.bash_profile文件:此文件隐藏,在/home/oracle/.base_profile
增加以下内容:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
# For Oracle Install
export ORACLE_BASE=/home/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10g
export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin
export ORACLE_OWNER=oracle
export ORACLE_SID=mmkt11
export NLS_LANG=" american_america.WE8ISO8859P1 "
修改完毕,执行如下操作,使设置生效:
[root@localhost ~]# source /home/oracle/.bash_profile
安装数据库
1,新建目录
[root@localhost /]# mkdir -p /u01
2,赋给数据库安装目录权限
[root@localhost /]# chown -R oracle:oinstall /u01
3,切换Oracle进入图形化界面进入安装目录运行
./instsllrun
创建数据库及配置
1,用oracle用户,进入Oracle软件目录下的bin目录,运行dbca
2,用oracle用户,进入Oracle软件目录下的bin目录,运行netca
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。