- 浏览: 25986 次
- 性别:
- 来自: 广州
最新评论
-
jeff2008:
10g 的已经没有去测试它了, 这个是找到后收集起来的,现在用 ...
Linux主机下配置Oracle 10G自动启动过程 -
justin18:
aaaaaa
Linux主机下配置Oracle 10G自动启动过程 -
justin18:
aaaaaa
Linux主机下配置Oracle 10G自动启动过程 -
jeff2008:
这个也是在网上找的, 不过自己测试过,可行
Linux主机下配置Oracle 10G自动启动过程 -
haochong:
建议作者看看oracle10g自带的文档里面有详细步骤。Ora ...
Linux主机下配置Oracle 10G自动启动过程
***Oracle 11.1 在RedHat Linux 5.1 x86-64上的安装:
3.检查硬件设备:
3.1内存:
*至少4G内存,grep MemTotal /proc/meminfo 命令可以看内存配置;
*交换区的大小
Available RAM Swap Space Required
Between 4 GB and 8 GB 2 times the size of RAM
Between 8 GB and 32 GB 1.5 times the size of RAM
More than 32 GB 32 GB
grep SwapTotal /proc/meminfo
*查看内存大小:
free
*检查共享内存总量:
df -h /dev/shm/
3.2系统架构:
*检查系统能否安装软件:
uname -m
3.3 磁盘大小
*至少1G的/tmp 目录大小
df -h /tmp
*磁盘空间要求
Installation Type Requirement for Software Files (GB)
Enterprise Edition 4.35
Standard Edition 3.73
Installation Type Requirement for Data Files (GB)
Enterprise Edition 1.68
Standard Edition 1.48
4. 检查软件需求:
4.1 OS需求
■ Red Hat Enterprise Linux 4
■ Red Hat Enterprise Linux 5
检查OS命令:cat /proc/version
4.2内核要求:
Red Hat Enterprise Linux 4: 2.6.9 or later
Red Hat Enterprise Linux 5: 2.6.18 or later
查看内核命令:uname -r
4.3包要求:
■ Asianux 2, Oracle Enterprise Linux4, and Red Hat Enterprise Linux 4 的要求:
binutils-2.15.92.0.2
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3 (32 bit)
elfutils-libelf-0.97
elfutils-libelf-devel-0.97
gcc-3.4.5
gcc-c++-3.4.5
glibc-2.3.4-2.19
glibc-2.3.4-2.19 (32 bit)
glibc-common-2.3.4
glibc-devel-2.3.4
glibc-devel-2.3.4 (32-bit)
libaio-0.3.105
libaio-0.3.105 (32 bit)
libaio-devel-0.3.105
libgcc-3.4.5
libgcc-3.4.5 (32-bit)
libstdc++-3.4.5
libstdc++-3.4.5 (32 bit)
libstdc++-devel-3.4.5
make-3.80
numactl-0.6.4.x86_64
sysstat-5.0.5
■ Asianux 3, Oracle Enterprise Linux5, and Red Hat Enterprise Linux 5 的要求:
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3 (32 bit)
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
gcc-4.1.1
gcc-c++-4.1.1
glibc-2.5-12
glibc-2.5-12 (32 bit)
glibc-common-2.5
glibc-devel-2.5
glibc-devel-2.5-12 (32 bit)
libaio-0.3.106
libaio-0.3.106 (32 bit)
libaio-devel-0.3.106
libgcc-4.1.1
libgcc-4.1.1 (32 bit)
libstdc++-4.1.1
libstdc++-4.1.1 (32 bit)
libstdc++-devel-4.1.1
make-3.81
numactl-devel-0.9.8.x86_64
sysstat-7.0.0
*查看包安装情况的命令:
rpm -q 包名
*安装缺失的包:
rpm -ivh 包名
4.4编译环境:
Intel C++ Compiler 9.1 -- gcc 4.1
4.5其他软件环境:
■ 在 Asianux 2, Oracle Enterprise Linux 4, and Red Hat Enterprise Linux 4 上装:
unixODBC-2.2.11 (32 bit) or later
unixODBC-devel-2.2.11 (64 bit) or later
■ 在 Asianux 3, Oracle Enterprise Linux 5, and Red Hat Enterprise Linux 5 上装:
unixODBC-2.2.11 (32 bit) or later
unixODBC-devel-2.2.11 (64 bit) or later
unixODBC-2.2.11 (64 bit) or later
5.创建oracle的用户和组:
*需要创建的用户组有:
■ The Oracle Inventory group (typically, oinstall)
■ The OSDBA group (dba)
■ The Oracle software owner (typically, oracle)
*判断这些用户是否存在:
判断oinstall用户是否存在:more /etc/oraInst.loc
如果该用户存在,会显示:
inventory_loc=/u01/app/oraInventory
inst_group=oinstall
判断dba:grep dba /etc/group
判断oracle用户:id oracle
如果存在,则应显示:
uid=440(oracle) gid=200(oinstall) groups=201(dba),202(oper)
*如果可以,输入以下命令创建用户组:
/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
如果用户oracle不属于所期望的组,则输入命令:
/usr/sbin/usermod -g oinstall -G dba oracle
如果用户oracle不存在:则输入命令:
/usr/sbin/useradd -g oinstall -G dba oracle
输入命令以修改用户oracle密码:
passwd oracle
6.配置核心参数:
*修改 /etc/sysctl.conf
fs.file-max = 65536
kernel.shmall = 2097152
kernel.shmmax = 2147483648
shmmax Minimum of the following
values:
■ Half the size of the physical memory
■ 4GB - 1 byte
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65500
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
如果当前参数比这些参数还高,就没必要修改
*运行命令以更新修改:/sbin/sysctl -p
*运行以下命令检查参数:
/sbin/sysctl -a | grep sem
/sbin/sysctl -a | grep shm
/sbin/sysctl -a | grep file-max
/sbin/sysctl -a | grep ip_local_port_range
/sbin/sysctl -a | grep rmem_default
/sbin/sysctl -a | grep rmem_max
/sbin/sysctl -a | grep wmem_default
/sbin/sysctl -a | grep wmem_max
*为oracle用户设置shell极限参数:
编辑/etc/security/limits.conf,添加如下行:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
*添加如下行到/etc/pam.d/login,如果它不存在:
session required /lib/security/pam_limits.so //对64位系统这条不需要
session required pam_limits.so
*在/etc/profile文件中添加:
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
7.创建需要的目录:
# mkdir -p /u01/app/
# chown -R oracle:oinstall /u01/app/
# chmod -R 775 /u01/app/
8.配置oracle环境:
*在/etc/profile文件中添加:
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=orcl
export DISPLAY=你的IP:0.0(如果是在本地安装,不要加IP,直接DISPLAY=:0.0就可以了)
*如果tmp文件夹空间太小:
检查/tmp 空间命令:df -k /tmp
$ sudo mkdir /mount_point/tmp
$ sudo chmod a+wr /mount_point/tmp
#exit
在/etc/profile 中添加:
$ TMP=/mount_point/tmp
$ TMPDIR=/mount_point/tmp
$ export TMP TMPDIR
*xhost +
10.安装Oracle:
*解压:
unzip linux_11gR1_database_1013.zip
*切换到oracle用户,进入“linux_11gR1_database_1013/database/”目录,执行
./runInstaller
以下制10.结尾,供Oracle新手安装参考,如果稍微了解oracle,可以选择高级安装,因为高级安装可以选择字符集,选择存储路径(/u01,/u02)等
————————————————————————————————————————————————————————————————————————————————————————————————————
Screen Recommended Action
————————————————————————————————————————————————————————————————————————————————————————————————————
Select a Product to Install This screen enables you to install any one for the following products:
■ Oracle Database 11g
■ Oracle Client
■ Oracle Clusterware
Click Next.
————————————————————————————————————————————————————————————————————————————————————————————————————
Select Installation Method The Basic Installation option is selected by default.
Specify the directory path of the Oracle home. Ensure that the
oinstall group is selected. If you want to create a starter database,
then specify a name and password for it. Then, click Next.
选择oinstall组,填写sys等的密码:XXX
————————————————————————————————————————————————————————————————————————————————————————————————————
Specify Inventory Directory
and Credentials
This screen is displayed only during the first installation of Oracle
products on a system.
Specify the full path of the Oracle Inventory directory. Ensure that
the operating system group selected is oinstall. Then, click
Next.
————————————————————————————————————————————————————————————————————————————————————————————————————
Product-Specific Prerequisite
Checks
Verify that all of the prerequisite checks succeed, and then click
Next.
Oracle Universal Installer checks the system to verify that it is configured
correctly to run Oracle software. If you have completed all
of the preinstallation steps in this guide, all of the checks should
pass.
If a check fails, then review the cause of the failure listed for that
check on the screen. If possible, rectify the problem and rerun the
check. Alternatively, if you are satisfied that your system meets the
requirements, then you can select the check
————————————————————————————————————————————————————————————————————————————————————————————————————
Oracle Configuration Manager
Enter the Customer Identification Number, Metalink User Name,
Country code, and Click Next. The new screen prompts you to
accept the license agreement. Click Accept license Agreement to
accept the agreement.
If you decline this agreement, then Oracle Configuration Manager
is installed but not configured.
跳过
————————————————————————————————————————————————————————————————————————————————————————————————————
Summary Review the information displayed on this screen, and then click
Install.
————————————————————————————————————————————————————————————————————————————————————————————————————
Install This screen displays status information while the product is
installed.
————————————————————————————————————————————————————————————————————————————————————————————————————
Configuration Assistants This screen displays status information for the configuration assistants
that configure the software and create a database. When the
message is displayed at the end of this process, click OK to continue.
————————————————————————————————————————————————————————————————————————————————————————————————————
Execute Configuration
Scripts
When prompted, read the instructions and then run the scripts
mentioned on this screen. Click OK to continue.
默认参数, 回车
————————————————————————————————————————————————————————————————————————————————————————————————————
End of Installation The configuration assistants configure several Web-based applications,
including Oracle Enterprise Manager Database Control. This
screen displays the URLs configured for these applications. Make a
note of the URLs used. The port numbers used in these URLs are
also recorded in the following file:
oracle_home/install/portlist.ini
To exit from Oracle Universal Installer, click Exit and then click Yes.
————————————————————————————————————————————————————————————————————————————————————————————————————
11.安装后需要配置
*修改/home/oracle/.bash_profile配置
ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
export ORACLE_HOME
PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export PATH
*防火墙,放行端口1521
#path: /etc/sysconfig/iptables
#help: iptables --help | more
#execute command below:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 1521 -j ACCEPT
/etc/rc.d/init.d/iptables save
12.监听配置文件:
/u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
/u01/app/oracle/product/11.1.0/db_1/network/admin/tnsnames.ora
listener.ora 在文件夹 Oracle_home/network/admin 下
内容:
————————————————————————————————————————————————————————————————————————————————————————————————————
LISTENER
监听名字
————————————————————————————————————————————————————————————————————————————————————————————————————
监听协议和地址:
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=my-server) (PORT=1521)))
————————————————————————————————————————————————————————————————————————————————————————————————————
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl11)
(ORACLE_HOME = /u01/app/oracle/product/11.1.0/db_1)
(SID_NAME = orcl)
)
)
静态监听,必须放在LISTEN之前
————————————————————————————————————————————————————————————————————————————————————————————————————
示例:
# listener.ora Network Configuration File: /u01/app/oracle/product/11.1.0/db_1/network/admin/listen
er.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME = /u01/app/oracle/product/11.1.0/db_1)
(SID_NAME = orcl)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.30.8.125)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = ORCL)
)
)
)
————————————————————————————————————————————————————————————————————————————————————————————————————
示例:
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.1.0/db_1/network/admin/tnsnam
es.ora
# Generated by Oracle configuration tools.
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.30.8.125)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
————————————————————————————————————————————————————————————————————————————————————————————————————
***ORACLE 修改服务器端和客户端字符集:
**服务器端:
*检查字符集:
select * from v$nls_parameters
NLS_CHARACTERSET 表示数据库字符集;
NLS_NCHAR_CHARACTERSET是国家字符集
*修改字符集:
SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
ALTER SYSTEM ENABLE RESTRICTED SESSION;
ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
ALTER SYSTEM SET AQ_TM_PROCESSES=0;
ALTER DATABASE OPEN;
ALTER DATABASE CHARACTER SET INTERNAL_USE AL32UTF8//跳过字符集父集检查
ALTER DATABASE national CHARACTER SET INTERNAL AL32UTF8
这一行不起作用,执行后出错ORA-00933: SQL 命令未正确结束,不过执行上一行命令已经生效,其他文章里未提到本行。
SHUTDOWN IMMEDIATE;
STARTUP
修改dmp文件字符集
上文说过,dmp文件的第2第3字节记录了字符集信息,因此直接修改dmp文件的第2第3字节的内容就可以‘骗’过oracle的检查。这样做理论上也仅是从子集到超集可以修改,但很多情况下在没有子集和超集关系的情况下也可以修改,我们常用的一些字符集,如 US7ASCII,WE8ISO8859P1,ZHS16CGB231280,ZHS16GBK基本都可以改。因为改的只是dmp文件,所以影响不大。
具体的修改方法比较多,最简单的就是直接用UltraEdit修改dmp文件的第2和第3个字节。比如想将dmp文件的字符集改为ZHS16GBK,可以用以下SQL查出该种字符集对应的16进制代码:
SQL> select to_char(nls_charset_id('ZHS16GBK'), 'xxxx') from dual;
0354
然后将dmp文件的2、3字节修改为0354即可。
如果dmp文件很大,用ue无法打开,就需要用程序的方法了。网上有人用java存储过程写了转换的程序(用java存储过程的好处是通用性教好,缺点是比较麻烦)。我在windows下测试通过。但要求oracle数据库一定要安装JVM选项。有兴趣的朋友可以研究一下程序代码
**客户端修改字符集:
设定环境变量。在My Computer->Properties->Advanced->Environment Variables->System Variables 新增环境变量设置,
如:Variable name=NLS_LANG,Variable Value= SIMPLIFIED CHINESE_CHINA.AL32UTF8。
这样NLS_LANG字符集为UTF8,这个NLS_LANG优先序高于注册表中的NLS。注意:环境变量设在系统变量中(System Vairables),而不是用户变量(User Vairables)。
发表评论
-
ORACLE的管理:
2011-01-21 11:55 781*创建用户:CREATE USER username IDEN ... -
RedHat Enterprise Linux 5 安装 Oracle 11gR2 所遇问题解决
2010-05-30 11:36 25951. 遇见xclock 检测不能通过: 正确的 ... -
DB2 索引优化准则收集
2010-05-27 15:38 1795一、DB2 索引优化准则 1. 对于不需要修改数据的查询(S ... -
ORACLE的SQLPLUS常用命令
2010-03-22 16:48 825一、ORACLE的启动和关闭 1、在单机环境下 要 ... -
Linux主机下配置Oracle 10G自动启动过程
2010-01-26 21:49 1940文件: $ gedit /etc/oratab orcl: ...
相关推荐
Oracle11gR2 Linux版本linux_x86_64_oracle11.2.0.4 文件分割成7个压缩包,必须集齐7个文件后才能一起解压一起使用: p13390677_112040_Linux-x86-64_7of7.zip下载地址: ... p13390677_112040_Linux-x86-64_6of7.zip...
redhat7系统必装的补丁,否则安装集群软件会失败。安装oracle 11g RAC 的 p18370031 补丁包 , RHEL 7 下安装oracle 11g RAC 的 p18370031 补丁包
19.3 - 企业版(也包括标准版 2) 适用于Linux x86-64系统。oracle-database-ee-19c文件分割成 三个 压缩包,必须集齐 三个 文件后才能一起解压一起使用: Oracle Database 19c (oracle-database-ee-19c.x86_64....
1.复制到服务器解压:tar -xzvf Apache_OpenOffice_4.1.2_Linux_x86-64_install-rpm_zh-CN.tar.gz。2.cd /basin/apps/openOffice/zh-CN。3. cd /basin/apps/openOffice/zh-CN/RPMS。4.rpm -ivh *.rpm。5.cd /basin/...
linux环境下ftp上传下载工具,支持批量上传下载,支持文件夹同步,逆同步等,功能比普通ftp强大
这个版本是针对64位(x86-64)Linux系统的,这意味着它可以运行在基于AMD64或Intel x86-64架构的Linux发行版上,如Ubuntu、Fedora、Debian等。 4. **RPM安装包**: RPM(Red Hat Package Manager)是Linux系统中...
rhel-server-5.1-x86_64-dvd.iso rhel-server-5.2-x86_64-dvd.iso rhel-server-5.3-x86_64-dvd.iso rhel-server-5.4-x86_64-dvd.iso rhel-server-5.5-x86_64-dvd.iso rhel-server-5.6-x86_64-dvd.iso rhel-server-...
在Red Hat Enterprise Linux (RHEL) 5 x86-64系统上通过命令行安装Oracle 10g是一项技术性很强的任务,涉及到多个步骤和系统配置。以下是一些关键的知识点: 1. **权限管理**: - 安装过程中,你需要切换到root...
文档标题提及的是在Redhat 6.2 X86-64环境下安装配置Rose HA的步骤,这是一款用于实现高可用性集群的软件。Rose HA主要用于确保关键业务系统的连续运行,通过心跳检测、故障切换等功能确保在主服务器出现问题时,...
GBase8a-MPP-Cluster-NoLicense-8.6.2-build43-R11-redhat7.3-x86-64
### RedHat Enterprise Linux 5 (RHEL5) 安装 Oracle 11.1.0.6 (11gR1) 知识点 #### 一、系统环境准备 在进行 Oracle 数据库的安装之前,确保 RHEL5 的系统环境符合安装要求是至关重要的。以下是一些必要的步骤: ...
EPEL 9 for x86_64 RPM resource inotify-tools(x86-64) Inotify,它是在内核 2.6.13 版本中引入的一个新功能,它为用户态监视文件系统的变化提供了强大的支持,允许监控程序打开一个独立文件描述符,并针对事件集...
在Linux环境下离线安装Oracle数据库19c是一个涉及多个步骤的过程,需要准备相应的安装文件,并且对系统进行预安装配置。以下是对整个流程的详细解释: 1. **文件准备** - `compat-libstdc++-33-3.2.3-72.el7.x86_...
RedHat 6.1 X64位操作系统 安装Oracle11G时所必须的rpm包批量下载,压缩包内包括: binutils-2.20.51.0.2-5.11.el6 (x86_64) compat-libcap1-1.10-1 (x86_64) compat-libstdc++-33-3.2.3-69.el6 (x86_64) compat-...
### Red Hat Enterprise Linux 7.0 x86_64 下安装 Oracle 12c R1 #### 一、安装准备 ##### 1. Linux系统环境需求 在开始安装 Oracle 12c R1 之前,需要确保拥有合适的 Linux 系统环境。以下是必要的准备工作: -...
redhat enterprise linux 7,百度网盘资源。
在安装步骤中,文章详细介绍了每个步骤的详细过程,包括启动安装程序、CD 媒体检测、欢迎界面、语言选择、键盘配置、安装号码、磁盘分区设置和分区设置等步骤。每个步骤都配有相应的图示,以帮助读者更好地理解安装...
这个资源找了很久,在Linux系统上都安装成功了,现在分享出来。 资源说明(按需下载): p13390677_112040_Linux-x86-64_1of7.zip database安装介质 p13390677_112040_Linux-x86-64_2of7.zip database安装介质 p...
在安装过程中,遵循最佳实践,如设置合适的权限和配置选项,以最大化安全效果。 此外,OpenSSH 9.6还可能包含性能优化和用户体验改进。例如,更快的密钥交换算法、更高效的资源管理以及更友好的错误提示,都能提升...
Redhat-server-6.8-x86_64-dvd iso镜像,附件为百度云链接