oracle11g 最终版本11.2.0.4安装详细过程

--安装背景

oracle 11.02.0.4 安装介质

linux:https://pan.baidu.com/s/13M8vnrYbS_R5GQFGjp2hRw 提取码:1111  

windows:链接:https://pan.baidu.com/s/1uVTG42GJZMC59_7y7zw0aA 
提取码:1111

1,修改内核

1.1 修改sysctl.conf文件

[root@orcltest Downloads]# vim/etc/sysctl.conf

# add by tim.man

kernel.shmmax = 277495689510912

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048586

fs.file-max = 6815744

# Controls the maximum number of shared memory segments, in pages                                                                                                                      

kernel.shmall = 4294967296

net.ipv4.tcp_max_tw_buckets = 6000

net.ipv4.ip_local_port_range = 9000 65500

net.ipv4.tcp_tw_recycle = 0

net.ipv4.tcp_tw_reuse = 1

net.core.somaxconn = 262144

net.core.netdev_max_backlog = 262144

net.ipv4.tcp_max_orphans = 262144

net.ipv4.tcp_max_syn_backlog = 262144

net.ipv4.tcp_synack_retries = 2

net.ipv4.tcp_syn_retries = 1

net.ipv4.tcp_fin_timeout = 1

net.ipv4.tcp_keepalive_time = 30

net.ipv4.tcp_keepalive_probes = 6

net.ipv4.tcp_keepalive_intvl = 5

net.ipv4.tcp_timestamps = 0

fs.aio-max-nr = 1048576

1.2 使参数生效

[root@orcltest Downloads]# sysctl –p

2,增加用户和组

[root@orcltestDownloads]# groupadd oinstall

[root@orcltestDownloads]# groupadd dba

[root@orcltestDownloads]# groupadd oper

[root@orcltestDownloads]# useradd -g oinstall -G dba,oper oracle

[root@orcltestDownloads]# passwd oracle

3,修改limits.conf限制

[root@orcltestDownloads]# vim /etc/security/limits.conf

oracle soft nproc 2047 

oracle hard nproc 16384                                                                                              

oracle soft nofile 1024

oracle hard nofile 65536

4,修改/etc/pam.d/login

[root@orcltestDownloads]# vim /etc/pam.d/login

session required/lib64/security/pam_limits.so

5,修改bash_profile文件

(1)修改profile:

 [root@orcltest Downloads]# vim /etc/profile                                                          

# add by tim.man

if [ $USER = "oracle" ]; then

if [ $SHELL = "/bin/ksh" ]; then

   ulimit -p 16384

   ulimit -n 65536

else

   ulimit -u 16384 -n 65536

fi

fi

(2)修改bash_profile:

[oracle@orcltest ~]$ vim .bash_profile

export EDITOR=vi

export ORACLE_SID=doea5db

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1

export INVENTORY_LOCATION=/oraInventory

export LD_LIBRARY_PATH=$ORACLE_HOME/lib

export NLS_LANG="American_america.zhs16gbk"

export NLS_DATE_FORMAT='yyyy-mm-dd hh24:mi:ss'

export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin:$PATH:$HOME/bin

umask 022

使bash_profile生效:

[oracle@orcltest ~]$ source .bash_profile

6,创建目录

[root@orcltest~]# mkdir /data/oracle

[root@orcltest~]# chown oracle:oinstall /data

[root@azure_earth_dbm1_3_112 app]# mkdir /data/oracle

[root@azure_earth_dbm1_3_112 app]# mkdir /data/oraInventory

[root@azure_earth_dbm1_3_112 app]# cd /oracle/app

[root@azure_earth_dbm1_3_112 app]# ln -s  /data/oracle oracle

[root@azure_earth_dbm1_3_112 app]# ln -s /data/oraInventory oraInventory                                                           

[root@azure_earth_dbm1_3_112 app]# chown -R oracle.oinstall /data

[root@azure_earth_dbm1_3_112 app]# chown -R oracle.oinstall /oracle

[root@azure_earth_dbm1_3_112 app]#

[root@ azure_earth_dbm1_3_112 oracle]# mkdir -p /oracle/app/oracle

[root@ azure_earth_dbm1_3_112 oracle]# chown -R oracle:oinstall /oracle/app/oracle

[root@ azure_earth_dbm1_3_112 oracle]# chmod -R 775 /oracle/app/oracle

[root@ azure_earth_dbm1_3_112 oracle]#

7,安装rpms

Rpms基础包下载地址:oracle组件包_oracle11204下载,oracle11204安装包-Oracle工具类资源-CSDN下载

Rpm包安装:rpm -ivh *--force –nodeps

Rpms安装有时候不一定保证有效,可以再用yum安装:

# 采用yum安装,如下:
yum install -y binutils*

yum install -y compat-libstdc*

yum install -y elfutils-libelf*

yum install -y gcc*

yum install -y glibc*

yum install -y ksh*

yum install -y libaio*

yum install -y libgcc*

yum install -y libstdc*

yum install -y make*

yum install -y sysstat*

yum install libXp* -y

yum install -y glibc-kernheaders

# 检查下lib是否安装齐全:

[root@powerlong4 ~]# rpm -q --queryformat %-{name}-%{version}-%{release}-%{arch}"\n" \ compat-libstdc++-33 glibc-kernheaders glibc-headers libaio libgcc glibc-devel xorg-x11-deprecated-libs

如果缺少,就继续安装缺失的组件包。

8,安装vnc

vnc安装参考:http://blog.csdn.net/mchdba/article/details/51100582

9,解压缩

Oracle官网一般下载不到,需要用户名密码登录,大家如果需要这款Oracle软件下载,欢迎在下面留言区留下你的email地址,我看到了会及时发给你的。

 安装单点的,就1和2一起解压,解压完叫database目录;

安装集群的,就先搞3,装完grid包后,再搞1和2;
 

这里只是准备部署dataguard,所以只需要安装1of7和2of7这2个zip包即可。

unzipp13390677_112040_Linux-x86-64_1of7.zip

unzip p13390677_112040_Linux-x86-64_2of7.zip

解压缩完,会看到一个database目录。

1和2是数据库软件;

3是rac软件;

4是client客户端;

5是gateways;

6是example示例;

7是删除介质;

10vnc viewer远程安装

[root@azure_earth_dbm1_3_112 ~]# exportDISPLAY=10.254.3.112:1.0

[root@azure_earth_dbm1_3_112 ~]# xhost +

access control disabled, clients canconnect from any host

[root@azure_earth_dbm1_3_112 ~]#

[oracle@azure_earth_dbm1_3_111 database]$./runInstaller

"You are attempting to install 64-bitOracle on a 32-bit operating system. This is not supported and will not work."

[oracle@azure_earth_dbm1_3_111 database]$vim runInstaller

# 注释掉exit 126即可

if [ `$UNAME` = "Linux" ]; then

 if  [  -e $GETCONF ]; then

 value=`$GETCONF LONG_BIT`

   if  [ $value != 64 ]; then

        echo "\"You are attempting to install 64-bit Oracle on a32-bit operating system.  This is notsupported and will not work.\"";

        #exit 126; #corresponding to the exit code of oui

   fi

  fi

fi

然后再执行./runInstaller,会有如下界面,正式开始界面安装oracle数据库,选择忽略软件更新的提示,点击next下一步,如下图01.png:

 

之后选择单实例数据库安装,如02.png所示:

从左面的可用语言里面选择UK、SC、TC,如下03.png所示:

 

之后选择企业版本4.7GB,如下04.png所示:

下面的oraclebase根目录以及软件目录,都默认不需要设置(当然如果你要改路径也是可以的),默认后直接next下一步,如05.png:

 

接下来在oraInventorygroup name的时候选择oinstall,如08.png所示next下一步:

 

在databaseadministrator group上选择dba,在databaseoperator group上面选择oper,然后net下一步,如009.png所示:

然后,执行checksoracle基础组件,如果有libaio、compat的提示,直接IgnoreAll即可,next下一步如010.png所示:

 

然后选择install安装,开始安装oracle软件,如011.png所示:

之后进入安装界面,会有进度条%显示,如012.png所示:

 

如果安装完成,会弹出ExecuteConfiguration scripts所示,选择OK完成oracle软件安装,如013.png所示:

 

之后,看到oracle安装到最好一步Finish,选择close结束,如014.png所示:

 

11,执行dbca初始化脚本:

以root身份执行orainstRoot.sh和root.sh脚本(注:执行完脚本以后,在点击“ok”):

# 查找文件路径

[oracle@azure_earth_dbm1_3_111 database]$ find /data/ -name orainstRoot.sh

/data/oraInventory/orainstRoot.sh

[oracle@azure_earth_dbm1_3_111 database]$ find /data/ -name root.sh

/data/oracle/product/11.2.0/dbhome_1/inventory/Templates/root.sh

/data/oracle/product/11.2.0/dbhome_1/root.sh

[oracle@azure_earth_dbm1_3_111 database]$

# 开始执行脚本

[root@azure_earth_dbm1_3_111 soft]# sh /data/oraInventory/orainstRoot.sh

Changing permissions of /oracle/app/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

Changing groupname of /oracle/app/oraInventory to oinstall.

The execution of the script is complete.

[root@azure_earth_dbm1_3_111 soft]#

[root@azure_earth_dbm1_3_111 soft]# sh /data/oracle/product/11.2.0/dbhome_1/root.sh

Performing root user operation for Oracle 11g

The following environment variables are set as:

    ORACLE_OWNER= oracle

    ORACLE_HOME=  /oracle/app/oracle/product/11.2.0/dbhome_1

Enter the full pathname of the local bin directory: [/usr/local/bin]: 

   Copying dbhome to /usr/local/bin ...

   Copying oraenv to /usr/local/bin ...

   Copying coraenv to /usr/local/bin ...

Creating /etc/oratab file...

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

Finished product-specific root actions.

[root@azure_earth_dbm1_3_111 soft]#

12netca创建oracle监听

在shell命令行sudo – oracle,然后执行netca命令,出现如下界面,选择默认的listener configure配置,如下015.png:

然后选择Add,添加新的监听,如016.png:

 

默认监听名字为LISTENER,然后next下一步如017.png所示

 

然后继续next下一步,如018.png所示:

端口选择默认的1521,然后next下一步如019.png所示:

 

Ok,listener添加完毕,点击cancel退出,如020.png所示:

 

13vnc远程dbca安装oracle数据库实例

[root@azure_earth_dbm1_3_112 ~]# exportDISPLAY=192.168.3.112:1.0

[root@azure_earth_dbm1_3_112 ~]# xhost +

access control disabled, clients canconnect from any host

[root@azure_earth_dbm1_3_112 ~]#

[oracle@azure_earth_dbm1_3_111 database]$ dbca

dbca后出现oracle实例安装界面,如下所示,选择第一个,然后next如021.png所示:

选择创建数据库,然后next下一步如022.jpg所示:

 

填写全局实例名和SID,这里默认是一样的powerdes,然后next如024.jpg所示:

之后下一步默认,如025.jpg所示:

 

设置统一的sys密码,如026.jpg、027.png所示所示:

选择用本地的数据文件模版地址:如028.jpg所示:

之后配置闪存区和归档,如029.jpg所示:

选择模版schemas,如030.jpg所示:

 

配置sga、pga,默认是40%,这里因为是专用的db服务器,可以调整到70%,如031.png所示:

然后选择连接数,默认是150,基本不够用,这里可以设置为5000,如032.png所示:

然后选择字符集,设定16GBK,如033.png所示:

 

然后出现Data Store,看到一些文件以及存储参数,如034.jpg所示:

然后选择CreateDatabase和GenerateDatabase Creation Scripts,开始create,如035.jpg所示:

之后,跳出确认信息界面,点击ok确认,如036.jpg所示:

之后看到配置界面,提示scripts创建成功了,点击ok,如037.jpg所示:

再之后出现的是创建db的界面,创建数据文件,如038.jpg所示:

然后开始创建数据文件,这个时间比较漫长,主要看磁盘写入速度,如果是ssd磁盘,几分钟就结束了,如果是普通磁盘估计要至少一个小时左右吧,之后创建数据文件结束后,oracle数据库实例就创建完成了,如039.jpg所示:

 

14,修改启动参数打开归档和闪回

# 修改spfile参数

SQL> alter system set log_archive_dest_1='location=/doea5/arch';

SQL> alter system set log_archive_format='arch_%t_%s_%r.log' scope=spfile;

SQL> alter system set db_recovery_file_dest_size=20G scope=spfile;

SQL> alter system set db_recovery_file_dest='/oracle/app/oracle/flash_recovery';                                                                                                                              

SQL> alter system set db_flashback_retention_target=10080 scope=spfile;

SQL> alter system set undo_retention=10800;

# 打开归档和闪回

SQL> shutdown immediate

SQL> startup mount

SQL> alter database archivelog ;

SQL> alter database flashback on;

SQL> alter database open;

PS:oracle设置随机开机服务自启动:http://blog.csdn.net/mchdba/article/details/51176911

OK,至此,oracle11g2.0.4顺利圆满安装完成了。

如果一直报“xhost:  unable to open display”,而且没有其它办法解决,可以尝试下面的途径:

[root@pddbnew ~]# export DISPLAY=10.251.3.31:1.0
[root@pddbnew ~]# xhost +
xhost:  unable to open display "10.251.3.31:1.0"
[root@pddbnew ~]# 
[root@pddbnew ~]# 
[root@pddbnew ~]# export DISPLAY=pddbnew:1.0
[root@pddbnew ~]# xhost +
xhost:  unable to open display "pddbnew:1.0"
[root@pddbnew ~]#

解决方式:

执行命令: export DISPLAY=:1.0
执行命令:xdpyinfo
(ps:xdpyinfo命令会出来一堆信息)
执行命令:xhost +
要下载Oracle 11g 11.2.0.4版本Linux,以下是相关步骤: 1. 首先,我们需要访问Oracle官方网站。在网站的下载页面中,找到适用于LinuxOracle 11g 11.2.0.4版本的下载链接。 2. 单击下载链接后,将会提示您登录Oracle帐号。如果您尚未注册,请按照指示注册一个Oracle帐号。 3. 登录成功后,您将被重定向到下载页面。在这个页面,您可以选择下载的文件类型和操作系统版本。确保选择适用于您的Linux操作系统的安装包。 4. 一旦您选择了正确的安装包,单击“下载”按钮,下载过程将开始。 5. 下载完成后,您将获得一个压缩文件(通常是一个.tar.gz文件)。您可以使用命令行或GUI工具(如7-Zip、WinRAR等)将其解压缩。 6. 解压缩完成后,您将获得一个安装文件夹。在其中,您可以找到一个安装向导或安装脚本。 7. 运行安装向导或脚本并按照提示进行安装。在安装过程中,您需要提供一些必要的信息,例如数据库实例名称、管理员密码等。 8. 安装完成后,您就可以开始使用Oracle 11g 11.2.0.4版本Linux了。通过命令行或者图形界面工具(如SQL Developer),您可以访问和管理数据库。 请注意,安装Oracle数据库需要详细的系统配置和一定的专业知识。在下载和安装之前,最好阅读官方文档并遵循安装要求。在安装过程中,如果遇到任何问题,建议参考Oracle社区论坛或官方支持。
评论 19
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值