CLONE数据库软件+手动安装数据库

本文详细介绍了从环境配置、源安装、克隆到数据库创建的全过程,旨在提供一种高效部署Oracle数据库的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. 在目标端准备环境。
1.1 配置SYSCTL.CONF

kernel.shmall = 4294967296
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586

sysctl -p


1.2 配置LOGIN文件:

vi /etc/pam.d/login
session required /lib/security/pam_limits.so


1.3 配置LIMITS文件:

vi /etc/security/limits.conf 
Oracle soft memlock 5242880
Oracle hard memlock 524280
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 65536
oracle hard nofile 65536


1.4 创建组与账户

[root@localhost ~]# groupadd oinstall
[root@localhost ~]# groupadd dba
[root@localhost ~]# useradd -g oinstall -G dba oracle


1.5 安装包:

本地配置YUM源方法:
mount /dev/cdrom /mnt
mkdir /yum
cp -r /mnt/* /yum/
vi /etc/yum.repos.d/local.repo
[base]
name=linux 5
baseurl=file:///yum
gpgcheck=0
enable=1

vi /usr/lib/python2.4/site-packages/yum/yumRepo.py
remote = url + '/yum' + relative

createrepo /yum

即可执行安装:
yum -y install pdksh libXp binutils compat-libstdc++ elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel gcc gcc-c++ libaio-devel libaio libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel compat-libstdc++-33





 

2. 在源安装环境生成TAR包:

 cd /u01/app/oracle
 tar -zcvf oracle_home.tar.gz oracle_home
 scp oracle_home.tar.gz 10.19.131.128:/u01/app/oracle/


3. 在目标环境里解压软件:

[root@localhost ~]# cd /u01/app/oracle
[root@localhost oracle]# ls
oracle_home.tar.gz
[root@localhost oracle]# tar -xzvf oracle_home.tar.gz 


4. 在目标环境里进行CLONE:

[root@localhost ~]# chown -R oracle:oinstall /u01
[root@localhost ~]# chmod -R 775 /u01
[root@localhost ~]# su - oracle
[oracle@localhost ~]$ cd /u01/app/oracle/oracle_home/clone/bin/
[oracle@localhost bin]$ perl clone.pl ORACLE_BASE=/u01/app/oracle ORACLE_HOME=/u01/app/oracle/oracle_home ORACLE_HOME_NAME=ORA11G_HOME
./runInstaller -clone -waitForCompletion  "ORACLE_BASE=/u01/app/oracle" "ORACLE_HOME=/u01/app/oracle/oracle_home" "ORACLE_HOME_NAME=ORA11G_HOME" -silent -noConfig -nowait 
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 8189 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-04-15_10-27-24PM. Please wait ...Oracle Universal Installer, Version 11.2.0.3.0 Production
Copyright (C) 1999, 2011, Oracle. All rights reserved.

You can find the log of this install session at:
 /u01/app/oraInventory/logs/cloneActions2014-04-15_10-27-24PM.log
.................................................................................................... 100% Done.

 

Installation in progress (Tuesday, April 15, 2014 10:27:35 PM EDT)
...............................................................................                                                 79% Done.
Install successful

Linking in progress (Tuesday, April 15, 2014 10:27:43 PM EDT)
Link successful

Setup in progress (Tuesday, April 15, 2014 10:28:28 PM EDT)
Setup successful

End of install phases.(Tuesday, April 15, 2014 10:28:53 PM EDT)
WARNING:A new inventory has been created in this session. However, it has not yet been registered as the central inventory of this system.
To register the new inventory please run the script '/u01/app/oraInventory/orainstRoot.sh' with root privileges. 
If you do not register the inventory, you may not be able to update or patch the products you installed.
The following configuration scripts need to be executed as the "root" user.
/u01/app/oraInventory/orainstRoot.sh
/u01/app/oracle/oracle_home/root.sh
To execute the configuration scripts:
    1. Open a terminal window
    2. Log in as "root"
    3. Run the scripts
    
The cloning of ORA11G_HOME was successful.
Please check '/u01/app/oraInventory/logs/cloneActions2014-04-15_10-27-24PM.log' for more details.


5. 用ROOT去执行脚本:

[root@localhost yum]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@localhost yum]# /u01/app/oracle/oracle_home/root.sh
Check /u01/app/oracle/oracle_home/install/root_localhost.localdomain_2014-04-15_22-30-15.log for the output of root script


查看/u01/app/oraInventory/ContentsXML/inventory.xml  中的ORACLEHOME路径不和现在的环境不一致,请修改下就可以了。


6. 手动创建数据库:
6.1 修改ORACLE用户的环境变量:

export ORACLE_SID=ora
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/oracle_home
export PATH=$ORACLE_HOME/bin:$PATH


6.2 创建参数文件。

*.audit_file_dest='/u01/app/oracle/admin/ora/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/u01/app/oracle/oradata/ora/control01.ctl','/u01/app/oracle/flash_recovery_area/ora/controlfile/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='ora'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=8589934592
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=newtestXDB)'
*.open_cursors=300
*.pga_aggregate_target=2810183680
*.processes=1500
*.remote_login_passwordfile='exclusive'
*.sga_target=536870912
*.undo_tablespace='UNDOTBS1'


6.3 创建参数文件中所需要的路径:

[oracle@localhost dbs]$ mkdir -p /u01/app/oracle/admin/ora/adump
[oracle@localhost dbs]$ mkdir -p /u01/app/oracle/oradata/ora
[oracle@localhost dbs]$ mkdir -p /u01/app/oracle/flash_recovery_area/ora/controlfile
[oracle@localhost dbs]$ mkdir -p /u01/app/oracle/flash_recovery_area


6.4 启动到NOMOUNT

[oracle@localhost dbs]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Tue Apr 15 22:45:00 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> create spfile from pfile; 

File created.

SQL> startup nomount;
ORACLE instance started.

Total System Global Area  534462464 bytes
Fixed Size                  2230072 bytes
Variable Size             163580104 bytes
Database Buffers          360710144 bytes
Redo Buffers                7942144 bytes


6.5 执行建库语句:

CREATE DATABASE ora
   USER SYS IDENTIFIED BY sys_password
   USER SYSTEM IDENTIFIED BY system_password
   LOGFILE GROUP 1 ('/u01/app/oracle/oradata/ora/redo01a.log','/u01/app/oracle/oradata/ora/redo01b.log') SIZE 100M BLOCKSIZE 512,
           GROUP 2 ('/u01/app/oracle/oradata/ora/redo02a.log','/u01/app/oracle/oradata/ora/redo02b.log') SIZE 100M BLOCKSIZE 512,
           GROUP 3 ('/u01/app/oracle/oradata/ora/redo03a.log','/u01/app/oracle/oradata/ora/redo03b.log') SIZE 100M BLOCKSIZE 512
   MAXLOGFILES 5
   MAXLOGMEMBERS 5
   MAXLOGHISTORY 1
   MAXDATAFILES 100
   CHARACTER SET US7ASCII
   NATIONAL CHARACTER SET AL16UTF16
   EXTENT MANAGEMENT LOCAL
   DATAFILE '/u01/app/oracle/oradata/ora/system01.dbf' SIZE 325M REUSE
   SYSAUX DATAFILE '/u01/app/oracle/oradata/ora/sysaux01.dbf' SIZE 325M REUSE
   DEFAULT TABLESPACE users
      DATAFILE '/u01/app/oracle/oradata/ora/users01.dbf'
      SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
   DEFAULT TEMPORARY TABLESPACE tempts1
      TEMPFILE '/u01/app/oracle/oradata/ora/temp01.dbf'
      SIZE 20M REUSE
   UNDO TABLESPACE undotbs1
      DATAFILE '/u01/app/oracle/oradata/ora/undotbs01.dbf'
      SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED; 


 6.6 执行脚本

@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
@?/sqlplus/admin/pupbld.sql


重启数据库即可。

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area  534462464 bytes
Fixed Size                  2230072 bytes
Variable Size             188745928 bytes
Database Buffers          335544320 bytes
Redo Buffers                7942144 bytes
Database mounted.
Database opened.
SQL> select open_mode from v$database;

OPEN_MODE
--------------------
READ WRITE


 

资源下载链接为: https://pan.quark.cn/s/9648a1f24758 这个HTML文件是一个专门设计的网页,适合在告白或纪念日这样的特殊时刻送给女朋友,给她带来惊喜。它通过HTML技术,将普通文字转化为富有情感和创意的表达方式,让数字媒体也能传递深情。HTML(HyperText Markup Language)是构建网页的基础语言,通过标签描述网页结构和内容,让浏览器正确展示页面。在这个特效网页中,开发者可能使用了HTML5的新特性,比如音频、视频、Canvas画布或WebGL图形,来提升视觉效果和交互体验。 原本这个文件可能是基于ASP.NET技术构建的,其扩展名是“.aspx”。ASP.NET是微软开发的一个服务器端Web应用程序框架,支持多种编程语言(如C#或VB.NET)来编写动态网页。但为了在本地直接运行,不依赖服务器,开发者将其转换为纯静态的HTML格式,只需浏览器即可打开查看。 在使用这个HTML特效页时,建议使用Internet Explorer(IE)浏览器,因为一些老的或特定的网页特效可能只在IE上表现正常,尤其是那些依赖ActiveX控件或IE特有功能的页面。不过,由于IE逐渐被淘汰,现代网页可能不再对其进行优化,因此在其他现代浏览器上运行可能会出现问题。 压缩包内的文件“yangyisen0713-7561403-biaobai(html版本)_1598430618”是经过压缩的HTML文件,可能包含图片、CSS样式表和JavaScript脚本等资源。用户需要先解压,然后在浏览器中打开HTML文件,就能看到预设的告白或纪念日特效。 这个项目展示了HTML作为动态和互动内容载体的强大能力,也提醒我们,尽管技术在进步,但有时复古的方式(如使用IE浏览器)仍能唤起怀旧之情。在准备类似的个性化礼物时,掌握基本的HTML和网页制作技巧非常
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值