在Linux安装ORALCE11g数据库总结
Oracle 11g for Linux CentOS 5.2 安装步骤(带图解) (建议在安装之前先浏览一遍)
首先在oracle官方上下载一个oracle 11g(特别说明一下在安装CentOS 5.2时尽量是把开发包装全一些,这样您在安装包检测的时候就会少装一些包。还有一点:安装大概需要5G多的空间,空间不够就老是出错。oralcle安装目录下面的空间一定要大点 要不然没有法安装)
1、用unzip解压 Oracle 11g文件
unzip linux_x86_11gR1_database.zip
(这个您也可以在Windows下面解压,不过您要加载过来,如果你的分区是NTFS,那您就要安装kernel-module-ntfs、fuse、ntfs-3g,当然具体的怎么操作就不必多说了。不过显卡一定要好。上次我在公司弄了一台戴尔破机器 因为网卡没有装好。点击下一步都点击不了)
2、安装包检测及安装
在终端中执行:安装以下包
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3 elfutils-libelf-0.125
elfutils-libelf-devel-0.125
elfutils-libelf-devel-static-0.125 gcc-4.1.2
gcc-c++-4.1.2 glibc-2.5-24
glibc-common-2.5 glibc-devel-2.5 glibc-headers-2.5
kernel-headers-2.6.18 ksh-20060214 libaio-0.3.106
libaio-devel-0.3.106 libgcc-4.1.2 libgomp-4.1.2 libstdc++-4.1.2
libstdc++-devel-4.1.2 make-3.81
sysstat-7.0.2
yum install binutils*
如上所述:还是有4个软件包没有安装,这个不用理会,其实我们刚才安装的compat包已经包含了;可以继续下一步了。
3、系统参数和用户及目录设置
//系统参数设置 vi /etc/sysctl.conf
以下为此文件更改后的内容:
# Kernel sysctl configuration file for Red Hat Linux #
# For binary values, 0 is disabled, 1 is enabled.See sysctl(8) and # sysctl.conf(5) for more details. # Controls IP packet forwarding net.ipv4.ip_forward = 0
# Controls source route verification net.ipv4.conf.default.rp_filter = 1 # Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
# Controls the System Request debugging functionality of the kernel kernel.sysrq = 0
# Controls whether core dumps will append the PID to the core filename
# Useful for debugging multi-threaded applications kernel.core_uses_pid = 1
# Controls the use of TCP syncookies net.ipv4.tcp_syncookies = 1
# Controls the maximum size of a message, in bytes #kernel.msgmnb = 65536
# Controls the default maxmimum size of a mesage queue #kernel.msgmax = 65536
# Controls the maximum shared segment size, in bytes #kernel.shmmax = 4294967295
# Controls the maximum number of shared memory segments, in pages #kernel.shmall = 268435456 #Below for oracle11g kernel.core_uses_pid = 1 kernel.shmmax = 536870912 kernel.shmmni = 4096 kernel.shmall = 2097152
kernel.sem = 250 32000 100 128 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 262144 fs.file-max = 6553600
net.ipv4.ip_local_port_range = 1024 65000
//添加用户组及用户 执行如下命令: #groupadd dba #groupadd oinstall
#useradd oracle -g oinstall -G dba #passwd oracle //新建目录权限 执行如下命令: #mkdir -p /u01
#chown -R oracle:dba /u01 #chmod -R 755 /u01 //用户环境变量
先切换用户到oracle: su – oracle
修改.bash_profile文件: vi .bash_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 ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.1.0.6 export ORACLE_SID=sales
export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin export TNS_ADMIN=$ORACLE_HOME/network/admin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:ORACLE_HOME/lib
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK export ORA_NLS10=$ORACLE_HOME/nls/data unset USERNAME umask 022
4、安装oracle 注销root ;
用oracle帐号进入,进入Oracle所在的目录我的是/disk/Oracle11g-linux_x86 [oracle@root-bs Oracle11g-linux_x86]$ ls
doc install response runInstaller stage welcome.html 执行./runInsaller进行安装:
[oracle@root-bs Oracle11g-linux_x86]$ ./runInstaller

