Linux平台下安装Oracle 10G曲折经历
在Linux系统下安装oracle是一件令人头疼的事情,其复杂程度远远超过安装Linux操作系统本身。如果能够进行成功的安装oracle,那么同
在Linux系统下安装Oracle是一件令人头疼的事情,其复杂程度远远超过安装Linux操作系统本身。如果能够进行成功的安装oracle,那么同时也就顺便掌握了Linux一些技术。本文介绍在RedHat Linux下安装oracle 10g 的方法。在这里说明一下,Oracle 10g的g是grid 的缩写,意为网格,目前较为前沿的网络计算技术。
Oracle 10g 对软硬件的要求都非常的高,所以要玩转的话的花不少银子。首先来看看它对硬件的要求:内存512兆(建议1G),cpu 主频2.0G以上,硬盘转速7200转以上(建议使用scsi硬盘),依此条件,我看买台服务器才行。其次是软件要求:在oracle 官方的文档里,对于x86系列支持的操作系统只有3种(radhat ES/AS 2.1(x86),redhat ES/AS 3(x86),unitedlinux1.0(x86) ),如果只有redhat 9也是可以安装的,不过要麻烦一点点。当然oracle 10g需要更多的软件模块才能进行安装,这些软件模块我将在后面逐一说明。在本例中,使用RedHat ES 3(x86)作为操作平台,并且安装了xwindow。
接下来,我们检查是否符合oracle 10g 的安装要求,以表格的形式列出。首先是硬件情况。以root登录系统,并且启动x-window.如果用下表命令输出的值大于或等于建议值,请
检查项目 命令/方法 建议值
内存 #grep MemTotal /proc/meminfo 512MB
交换分区 #grep SwapTotal /proc/meminfo 1GB
/tmp目录空闲区 #df –k /tmp 400MB
硬盘空闲空间 #df -k 4GB
继续往下,,检查软件需求。对redhat ES 3(x86),需要如下的软件包:
· Gnu gcc package, gcc-3.2.3-2 or 更高
下面的包也必须被安装:· make-3.79· binutils-2.11· openmotif-2.2.2-16· setarch-1.3-1 · compat-db-4.0.14.5· compat-gcc-7.3-2.96.122· compat-gcc-c -7.3-2.96.122· compat-libstdc -7.3-2.96.122· compat-libstdc -devel-7.3-2.96.122
为了保证系统满足需求,执行下面的步骤检查安装的linux版本和安装的套件。
检查项目 命令/方法 建议值
Linux 版本 #cat /etc/issue ES 3
已安装的包 #rpm -q package_name 安装所需包(上表所列)
到这里我们已经全面的检查了安装oracle 10g所要求的软硬件环境,接着我们就要为安装创建组和用户。
下面的组和用户必须存在
The oinstall group (the oracle inventory group)
The dba group (the OSDBA group)
The oracle user (the oracle owner)
如果上面的组和用户不存在,用下面的步骤创建它们。(1)先查看这些组和用户是否存在:
#grep oinstall /etc/group
#grep dba /etc/group
(2)创建安装oracle 所需的组和用户
#groupadd osintall
#groupadd dba
#useradd –g oinstall –G dba oracle 检查一下oracle 是否属于组 oinstall 和 dba (#id oracle) 再给oracle 设置一个用户口令 #passwd oracle 输入两次密码。
创建安装所需的目录 /u01/app/oracle (the oracle base directory), /u02/oradata (an optional default directory ),用下表的命令形式创建它.然后改变它的目录权限。
创建目录 更改权限
#mkdir –p /u01/app/oracle #chown –R oracle:Oinstall /u01/app/oracle /u02/oradata
#mkdir –p /u02/oradata #chmod –R 755 /u01/app/oracle /u02/oradata
配置内核参数,下表是oracle 推荐的内核参数值,请参考。
Parameter Value File
semmslsemmnssemopmsemmni 25032000100128 /proc/sys/kernel/sem
shmall 2097152 /proc/sys/kernel/shmall
shmmax Half the size of physical memory /proc/sys/kernel/shmmax
shmmni 4096 /proc/sys/kernel/shmmni
file-max 65536 /proc/sys/fs/file-max
ip_local_port_range 1024 65000 /proc/sys/net/ipv4/ip_local_port_range
确保当前的参数值大于或等于上表所列。那么怎样查看这些参数值呢?用命令 #/sbin/sysctl –a | grep
,例如查看semmsl,用 #/sbin/sysctl -a | grep sem,余下的与此类似。逐个察看这些参数值,如果参数值不满足要求,就需要修改它们。请完成下面这些步骤
a.用文本编辑器,创建或者编辑/etc/sysctl.conf文件,添加或修改如下的行
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
b.改变当前内核参数的值,用命令 #/sbin/sysctl –p 来实现。
为了提高在linux系统上运行软件的性能,必须对oracle用户设置下列shell 限定。
Shell Limit Item in limits.conf Hard Limit
Maximum number of open file descriptors nofile 65536
Maximum number of processes available to a single user nproc 16384
现在创建这些限定:
1. 加入下面的行到文件/etc/security/limits.conf
* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536
2. 加入下面的行到文件/etc/pam.d/login ,假如它不存在的话
session required /lib/security/pam_limits.so
3.根据oracle 用户的默认shell,对默认 shell start-up文件作如下改变,如果是Bourne, Bash, or Korn shell,修改环境变量/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
如果是c shell,则环境变量文件 /etc/csh.login的修改值如下:
if ( $USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
endif

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Full table scanning may be faster in MySQL than using indexes. Specific cases include: 1) the data volume is small; 2) when the query returns a large amount of data; 3) when the index column is not highly selective; 4) when the complex query. By analyzing query plans, optimizing indexes, avoiding over-index and regularly maintaining tables, you can make the best choices in practical applications.

InnoDB's full-text search capabilities are very powerful, which can significantly improve database query efficiency and ability to process large amounts of text data. 1) InnoDB implements full-text search through inverted indexing, supporting basic and advanced search queries. 2) Use MATCH and AGAINST keywords to search, support Boolean mode and phrase search. 3) Optimization methods include using word segmentation technology, periodic rebuilding of indexes and adjusting cache size to improve performance and accuracy.

Yes, MySQL can be installed on Windows 7, and although Microsoft has stopped supporting Windows 7, MySQL is still compatible with it. However, the following points should be noted during the installation process: Download the MySQL installer for Windows. Select the appropriate version of MySQL (community or enterprise). Select the appropriate installation directory and character set during the installation process. Set the root user password and keep it properly. Connect to the database for testing. Note the compatibility and security issues on Windows 7, and it is recommended to upgrade to a supported operating system.

The difference between clustered index and non-clustered index is: 1. Clustered index stores data rows in the index structure, which is suitable for querying by primary key and range. 2. The non-clustered index stores index key values and pointers to data rows, and is suitable for non-primary key column queries.

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

MySQL is an open source relational database management system. 1) Create database and tables: Use the CREATEDATABASE and CREATETABLE commands. 2) Basic operations: INSERT, UPDATE, DELETE and SELECT. 3) Advanced operations: JOIN, subquery and transaction processing. 4) Debugging skills: Check syntax, data type and permissions. 5) Optimization suggestions: Use indexes, avoid SELECT* and use transactions.

In MySQL database, the relationship between the user and the database is defined by permissions and tables. The user has a username and password to access the database. Permissions are granted through the GRANT command, while the table is created by the CREATE TABLE command. To establish a relationship between a user and a database, you need to create a database, create a user, and then grant permissions.
