linux下oracle 10g的安装
在Linux下安装Oracle我的安装环境:
Redhat Enterprise linux 5.4版本
硬件要求:
内存要求:
Oracle Database官方指定最少512M(后面会警告)建议1GB
磁盘空间要求:
Swap交换分区为1.5GB
/tmp目录中的磁盘空间为400MB
Oracle软件需要1.5GB
Database 需要1.5GB
预配置的数据库需要1.2GB(可选)
快速恢复去需要2.4GB(可选)
操作系统:
具有1GB以上RAM和1.5GB交换空间或者更高配置的计算机上可以实现标准安装
安装过程:
1. Login as root
2. Oracle的安装需要在图形化界面安装
3. 打开Xwindows,允许所有主机显示本主机上的X windows
# xhost + ======è oracle模拟远程用户在本机安装,这步必须执行。
access control disabled, clients can connect from any host
4. 检查系统要求
物理内存最少为1G
# grep MemTotal /proc/meminfo
Swap分区建议为1.5G以上
# grep SwapTotal /proc/meminfo
/tmp分区建议大于400M
# df -lh /tmp
Filesystem> /dev/mapper/vol0-root
37G 5.7G 29G 17% /
查看cpu是否符合安装Oracle
Note:
This command displays the processor type. Verify that the processor architecture matches the Oracle software> # grep "model name" /proc/cpuinfo
model name : Intel(R) Core(TM)2 Duo CPU T6570 @ 2.10GHz
5.检查所需软件包是否安装齐全
我们的内核版本应该为4.0或者更新的,但是不能太新了,否则下面实验时会报错,我们可以将自己的内核版本稍为改改(我这里将5.4给为4.4),骗骗系统,呵呵
# vim /etc/issue
# cat /etc/issue
Red Hat Enterprise Linux Server> Kernel \r on an \m
RH033
我们需要确保系统已经安装过以下软件包:
Red Hat Enterprise Linux 4.0:
Gmake-3.80-5gcc-3.4.3-22.1gcc-ppc32-3.4.3-22.1gcc-c++-3.4.3-22.1gcc-c++-ppc32-3.4.3-22.1glibc-2.3.4-2.9glibc-2.3.4-29 (64-Bit)libgcc-3.4.3-9.EL4libgcc-3.4.3-9.EL4.ppc64.rplibstdc++-3.4.3-9.EL4libstdc++-devel-3.4.3-9.EL4libaio-0.3.103-3libaio-0.3.103-3 (64-Bit)libaio-devel-0.3.103-3 (64-Bit)compat-libstdc++-33-3.2.3-47.3binutils-2.15.92.0.2-13我的系统是32位的,这里我只安装32位的,大家根据自己系统的情况自己选择 注意:
以上的包都是官方4.0系统安装Oracle需要安装的包,我们不能照着他的来,我们需要使用rpm -q package-name 一个一个查看以上的包是否已安装,呵呵,需要点耐心啊!做学问嘛,就是这样,同志们别急啊!经我测试,我的系统已经全部安装,大家,别偷懒啊,一个一个慢慢测试下,不然,后面会有大麻烦找你的!
6.配置 Name Resolution
# cat /etc/nsswitch.conf | grep hosts ======输出如下为正确
#hosts: db files nisplus nis dns
hosts: files dns
# domainname =====输出必须如下,一字不差为正确
(none)
#vim /etc/sysconfig/network
song ~]#vim /etc/hosts
song ~]# hostname
song.example.com
格式类似即可,但/etc/hosts 中的名字和/etc/sysconfig/network中名字一定要是一样的
7.创建用户oracle,附加组dba,oper ,oinstall组
属主是oracle
# /usr/sbin/useradd -g oinstall -G dba,oper oracle# passwd oracle# /usr/sbin/groupadd dba# /usr/sbin/groupadd oinstall# /usr/sbin/groupadd oper#>uid=505(oracle) gid=505(oracle) groups=505(oracle),509(dba),510(oper)
我们可以用一下命令来检测
8.编辑/etc/sysctl.conf文件,添加编辑如下
kernel.shmall = 2097152kernel.shmmax = 2147483648kernel.shmmni = 4096kernel.sem = 250 32000 100 128fs.file-max = 65536net.ipv4.ip_local_port_range = 1024 65000net.core.rmem_default = 1048576net.core.rmem_max = 1048576net.core.wmem_default = 262144net.core.wmem_max = 262144 # sysctl -p
9.设置shell limitsfororacle user#vim /etc/security/limits.conforacle soft nproc 2047oracle hard nproc 16384oracle soft nofile1024oracle hard nofile65536#Vim /etc/pam.d/login 添加 session required /lib/security/pam_limits.so#vim/etc/profile file 添加if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fifi
设置oracle用户的环境变量如下:
# su – oracle
$ vim ~/.bash_profile
PATH=$PATH:$HOME/bin:/u01/app/oracle/product/10.2.0/db_1/bin
ORACLE_BASE=/u01/app/oracle
export ORACLE_BASE
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
export ORACLE_HOME
echo PATH
10.创建oracle挂载安装目录,并修改其权限:# mkdir -p /u01/app/oracle/oradata# chown -R oracle:oinstall /u01/app/oracle/oradata# chmod -R 775 /u01/app/oracle/oradata11.下在oracle软件包,并解压缩# ls10201_database_linux32.zip# unzip 10201_database_linux32.zip # ls10201_database_linux32.zipdatabase# unzip 10201_database_linux32.zip 12.安装oracle实例# su - oracle$ ls10201_database_linux32.zipdatabase$ cd database/$ lsdocinstallresponserunInstallerstagewelcome.html$ ./runInstaller出现以下图,我们作如下选择
# pwd
/u01/app/oracle/product/10.2.0/db_1
# ./root.sh
#cd /home/oracle/oralnventory/orainstRoot.sh
#./orainstRoot.sh
用以下命令开启配置数据库服务器图形化界面
$ emctl start
$ dbca
记着如图的地址,要用
在地址栏中填写刚才的地址,出现如下画面
正确的登录画面如下及表示创建成功
问题总结
1.在使用emctl 和dbca命令时出现没有命令:
解决方法:重新检查环境变量的设置
2.
可能是以下问题:
I. 无LISTERNER
a)$netca =======è创建一个LISTENER
II. 监听器未启动
b) $lsnrctl start
III.. 侦听器未启动
c) $emctl start dbconsole
IV.数据库未打开
d)$sqlsplus / as sysdba
sql>show sya;
sql>alter database mount;
sql>alter database open;
V.主机名解析问题
e) $vim /etc/hosts
开启 127.0.0.1 localhost 这行
3.
$ pwd
/u01/app/oracle/product/10.2.0/db_1/sysman/config
$ vim emd.properties =======追加以下内容
agentTZRegion=Asia/Shanghai
其他的问题咱是还没有遇到,等遇到了再贴出来。
页:
[1]