Redhat6.5下Oracle10g静默安装
来源:互联网 发布:金蝶软件多少钱一套 编辑:程序博客网 时间:2024/06/05 16:11
Oracle10g静默安装
OK,接下来说Oracle10g的静默安装(就是命令行安装,不用图形界面)
1、如果是新装的系统,没有安装过Oracle的话,请忽略以下步骤,直接从第二步开始。
[oracle@oracle ~]$ sqlplus / as sysdbaSQL>shutdown abort [oracle@oracle ~]$ su - root[root@oracle ~]$ cd /u01/oracle[root@oracle oracle]$ rm -rf * [root@oracle oracle]$ cd /usr/local/bin[root@oracle bin]$ rm -rf *[root@oracle etc]$ cd /etc[root@oracle etc]$ rm -rf ora*[root@oracle ~]# userdel -r oracle[root@oracle ~]# groupdel oinstall[root@oracle ~]# groupdel dba
2、修改Redhat Linux的版本号:
修改前:
修改后:
3、检查服务器空间
内存至少512M 交换分区至少1Goracle软件安装位置1.3G数据库安装位置至少1G/tmp要有足够400M的剩余如果这些目录都是隶属于根文件系统 那根需要有3G空闲才能安装 (1.3+1+0.4)上述都属于最小要求 这是远远不够后期运行添加数据使用的.并且随着后期运行oracle自身产生的文件会逐渐增大 请保留足够的空间需求
检查方法:
[root@oracle ~]# grep -E 'MemTotal|SwapTotal' /proc/meminfo
4、解决软件依赖包
[root@oracle ~]# yum install libXtst-devel.x86_64 libXtst-devel.i686 libstdc++-devel.i686 kernel-headers glibc-devel.i686 glibc-devel.x86_64 gnome-icon-theme dmz-cursor-themes sgml-common libaio.i686 libaio.x86_64 libaio-devel.x86_64 libaio-devel.i686 ncurses-devel.x86_64 ncurses-devel.i686 elfutils-libelf-devel.x86_64 elfutils-libelf-devel.i686 compat-gcc-34 compat-gcc-34-c++ libXxf86misc.i686 libXxf86vm.i686 libXt.i686 libXt.x86_64 libXmu.x86_64 libXmu.i686 mpfr cpp xorg-x11-xauth compat-gcc-34-c++ libdaemon avahi avahi-glib shared-mime-info libIDL-devel.i686 libIDL-devel.x86_64 ORBit2-devel.i686 ORBit2-devel.x86_64 GConf2-devel.i686 GConf2-devel.x86_64 gnome-vfs2-devel.i686 gnome-vfs2-devel.x86_64 libbonobo-devel.i686 libbonobo-devel.x86_64 libtool-ltdl.i686 libtool-ltdl.x86_64 unixODBC-devel.i686 unixODBC-devel.x86_64 gtk2-engines.i686 gtk2-engines.x86_64 libmcpp mcpp xorg-x11-server-utils libXv-devel.i686 libXv-devel.x86_64 ConsoleKit-x11 xorg-x11-xinit libXp-devel.i686 libXp-devel.x86_64 libXxf86dga libdmx xorg-x11-utils compat-db43.i686 compat-db43.x86_64 ppl.i686 ppl.x86_64 cloog-ppl.i686 cloog-ppl.x86_64 gcc gcc-c++ compat-libstdc++-33.i686 compat-libstdc++-33.x86_64 compat-db.i686 compat-db.x86_64 gnome-themes system-icon-theme system-gnome-theme readline-devel.i686 readline-devel.x86_64 libgnome-devel.i686 libgnome-devel.x86_64 binutils-devel.i686 binutils-devel.x86_64 elfutils-devel.i686 elfutils-devel.x86_64 numactl-devel.i686 numactl-devel.x86_64 sysstat libaio compat-libstdc++ libaio-devel libgcc libstdc++ libstdc++-devel unixODBC unixODBC-devel pdksh compat-libstdc++* setarch
以上安装命令提示没有pdksh这个包,手动下载pdksh安装上。(setarch这个包在Redhat5.0叫setarch,在Redhat6.0中叫 util-linux-ng)
5、解析主机
将你的主机名跟IP地址在本地hosts文件中做个解析,这里我的主机名为oracle,IP地址是192.168.1.52
6、操作系统资源限制。
将如下内容添加到/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
7、加载参数。
[root@oracle ~]#sysctl -p
每个参数的意思详解:kernel.shmall Total amount of shared memory available (bytes or pages)kernel.shmmax Maximum size of shared memory segment (bytes) 建议大于等于SGAkernel.shmmni Maximum number of shared memory segments system-widekernel.shmall*kernel.shmmni = 能够分配的内存大小kernel.sem = SEMMSL SEMMNS SEMOPM SEMMNI SEMMSL Maximum number of semaphores per set 每个信号对象集的最大信号对象数; SEMMNS Maximum number of semaphores system-wide 系统范围内最大信号对象数; SEMOPM 每个信号对象支持的最大操作数; SEMMNI Maximum number of semaphore identifiers 系统范围内最大信号对象集数。其中 SEMMNS的值等于 SEMMSL*SEMMNIfs.file-max 系统中所允许的文件句柄最大数目。net.ipv4.ip_local_port_range 应用程序可使用的IPv4端口范围。net.core.rmem_default 套接字接收缓冲区大小的缺省值net.core.rmem_max 套接字接收缓冲区大小的最大值net.core.wmem_default 套接字发送缓冲区大小的缺省值net.core.wmem_max 套接字发送缓冲区大小的最大值
8、建立oracle用户和组。建议指定GID和UID方式(尤其集群环境)
[root@dba ~]# groupadd -g 54321 oinstall [root@dba ~]# groupadd -g 54322 dba [root@dba ~]# useradd -u 54321 -g oinstall -G dba oracle [root@dba ~]# passwd oracle
9、建立oracle软件安装文件目录
[root@dba ~]# mkdir -p /u01/oracle[root@dba ~]# chown -R oracle:oinstall /u01/
10、设置oracle环境变量
[root@oracle ~]# vim ~oracle/.bash_profile(以下内容追加到此文件最后)export ORACLE_BASE=/u01/oracleexport ORACLE_HOME=$ORACLE_BASE/ora10gexport ORACLE_SID=ora10gexport PATH=$PATH:$HOME/bin:$ORACLE_HOME/binexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
环境变量详解:ORACLE_BASE oracle产品基目录ORACLE_HOME 数据库产品目录、通常情况下HOME目录是BASE的子目录 ORACLE_HOME=$ORACLE_BASE/ora10gORACLE_SID 操作系统和oracle实例关联的纽带PATH 将安装后的oracle命令追加到执行搜索路径LD_LIBRARY_PATH 动态库的位置
11、shell限制。
[root@dba ~]# vim /etc/security/limits.conf (将以下内容追加到此文件中)oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536[root@dba ~]# grep 'limit' /etc/pam.d/system-auth
12、将dba组id加入到文件中
[root@oracle ~]# echo 54322 > /proc/sys/vm/hugetlb_shm_group
13、解压安装包、编辑配置文件,安装。
[root@oracle ~] # su - oracle[oracle@oracle ~] $ cd /data/soft[oracle@oracle soft] $ zcat 10201_database_linux_x86_64.cpio.gz | cpio -idmv[oracle@oracle soft] $ cd /data/soft/database/response[oracle@oracle response] $ cp enterprise.rsp ../[oracle@oracle response] $ cd ..[oracle@oracle database] $ vim enterprise.rspUNIX_GROUP_NAME="oinstall" #安装的组 ORACLE_HOME="/u01/oracle/ora10g"ORACLE_HOME_NAME="OraDbHome1" #根据提示 唯一的名字COMPONENT_LANGUAGES={"en","zh_CN"}INSTALL_TYPE="EE"s_nameForDBAGrp=dbas_nameForOPERGrp=oinstalln_configurationOption=3
[oracle@oracle database]$./runInstaller -silent -ignoreSysPrereqs -responsefile /data/soft/database/enterprise.rsp
14、安装完成。
到这里,安装就算完成了,用root用户,执行这2个脚本,就可以了,有同学要问了,我在命令行下执行 ps aux | grep ora_ 并没有找到进程啊,是不是安装出问题了......................擦,就特么你话多,爱看看,不爱看滚...开个玩笑,其实是我们并没有创建数据库,所以这里没有进程,因为下面要升级到10.2.0.5,所以这里就不创建了,想创建了同学可以在命令行执行这个命令:
[oracle@oracle database]$#dbca -silent -createdatabase -templatename /u01/oracle/ora10g/assistants/dbca/templates/General_Purpose.dbc -gdbname ora10g -sid ora10g -syspassword oracleSys1 -systempassword oracleSys1 -emconfiguration LOCAL -dbsnmppassword oracleSys1 -sysmanpassword oracleSys1 -characterset al32utf8
二、升级到Oracle1g 10.2.0.5版本
1、准备升级。
上面的小伙伴有过创建数据库的同学,这里把数据库关掉。
[oracle@oracle database]$ sqlplus / as sysdbaSQL> shutdown immediate
2、解压安装包。
[oracle@oracle database]$ cd /data/soft/[oracle@oracle soft]$ unzip patch_10205_linux-x86-64.zip
3、执行runInstaller
[oracle@oracle soft]$ cd Disk1/[oracle@oracle Disk1]$ ./runInstaller -silent -ignoreSysPrereqs -responsefile /data/soft/Disk1/response/patchset.rsp UNIX_GROUP_NAME=oinstall ORACLE_HOME=/u01/oracle/ora10g ORACLE_HOME_NAME=OraDbHome1 DECLINE_SECURITY_UPDATES=true
4、安装完成,用root用户,执行这个脚本。
5、编辑配置
[oracle@oracle Disk1]$ cd $ORACLE_HOME/network/admin/[oracle@oracle admin]$ vim listener.ora (此文件不存在,创建就好,添加以下内容)LISTENER = (ADDRESS_LIST= (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.52)(PORT=1521)) (ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER1521)))SID_LIST_LISTENER= (SID_LIST= (SID_DESC= (program=extproc) (SID_NAME=PLSExtProc) (ORACLE_HOME=/u01/oracle/ora10g) ) (SID_DESC= (GLOBAL_DBNAME=ora10g) (SID_NAME=ora10g) (ORACLE_HOME=/u01/oracle/ora10g) ) )
6、启动监听
[oracle@oracle admin]$ lsnrctl start
7、创建数据库。
没有创建数据库的小伙伴用下面这条命令创建数据库,然后就可以看到进程了,已经创建的小伙伴,把数据库启动起来也是一样。
[oracle@oracle admin]$dbca -silent -createdatabase -templatename /u01/oracle/ora10g/assistants/dbca/templates/General_Purpose.dbc -gdbname ora10g -sid ora10g -syspassword oracleSys1 -systempassword oracleSys1 -emconfiguration LOCAL -dbsnmppassword oracleSys1 -sysmanpassword oracleSys1 -characterset al32utf8
[oracle@oracle admin]$ sqlplus / as sysdbaSQL*Plus: Release 10.2.0.5.0 - Production on Sun Aug 28 21:10:23 2016Copyright (c) 1982, 2010, Oracle. All Rights Reserved.Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> select open_mode from v$database;OPEN_MODE----------READ WRITE
1 0
- Redhat6.5下Oracle10g静默安装
- Centos6/7下静默安装oracle10g
- redhat6.2静默安装oracle11gr2
- Redhat6.4静默安装Oracle11g
- Linux CentOs6.5_x64静默安装Oracle10g
- oracle10g静默安装
- Linux oracle10g 静默安装
- 在redhat6企业版安装oracle10g
- ubuntu oracle10g 静默模式安装
- redhat6.5下配置安装yum源
- RedHat6.5下Mysql_5.6.31安装教程
- Redhat 5 下 Oracle10g 安装
- Redhat 5 下 Oracle10g 安装
- 【安装nodejs】Redhat6.5下安装卸载nodejs
- redhat6.3上安装oracle10g遇到的问题
- 在redhat6.4中安装oracle10g数据库遇到的问题
- WINDOWS 下静默安装 与 静默卸载
- REDHAT6下编译安装InfoBright
- nim博弈(两种比较裸的题对比)
- Hadoop全分布集群搭建(1)——设置主机名与域名解析
- Vulkan学习小结——框架搭建
- Android Developer导航
- Makefile常用万能模板(包括静态链接库、动态链接库、可执行文件)
- Redhat6.5下Oracle10g静默安装
- 【docker】-- Ubuntu14.04 安装
- CentOS Linux使用crontab运行定时任务详解
- 欢迎使用CSDN-markdown编辑器
- HttpClient
- Linux常用命令——用户管理命令
- 【ESP8266】基于ESP8266的MicroPython连接MQTT服务器
- sql随笔1
- 鼠标经过放大图片