CentOS 5.4 64位安装Oracle 10G
#grep SwapTotal /proc/meminfo2 g
一、检查硬件
查看内存和交换空间以及磁盘大小命令:#grep MemTotal /proc/meminfo"
#grep SwapTotal /proc/meminfo2 g' ]. Q8 O( A# E
#df -h8 l! b% k s' D; c6 R
#df -k /tmp
8 A; k5 f. k j( q% q8 T要求:所需最小内存为256MB,而所需最小交换空间为512M。对于内存小于或等于2GB 的系统,,交换空间应为内存的两倍;对于内存大于2GB 的系统,交换空间应为内存的一到两倍。安装Oracle 10g软件需要2.5GB 的可用磁盘空间,而数据库则另需1.2GB的可用磁盘空间。/tmp 目录至少需要 400MB的可用空间。
二、验证Linux安装 t# n6 ~* i- r
1. 检查内核版本:#uname -r8 t/ m: {% ~1 h$ \% E( j
所需版本:2.6.9-5.EL(为官方RHEL 4.0的要求)5 ^# g" X# C' a5 ~
2. 检查所需软件包:#rpm -q package-name
所需包及其版本:
binutis-2.15.92.0.2-13.EL4
Ecompat-db-4.1.25-9' L, ]' p) K$ J* x
compat-libstdc++-296-2.96-132.7.2
control-center-2.8.0-12
gcc-3.4.3-22.1.EL4
gcc-c++-3.4.3-22.1.EL44. l- K1 \1 Q$ u) {5 Z
glibc-2.3.4-2.9
glibc-common-2.3.4-2.9
gnome-libs-1.4.1.2.90-44.1
libstdc++-3.4.3-22.1
libstdc++-devel-3.4.3-22.1
make-3.80-5
pdksh-5.2.14-30
sysstat-5.0.5-19 P% |- U, I, K! m! z
xscreensaver-4.18-5.rhel4.2" C5 s' W( V7 @+ c$ c; ?; n
setarch-1.6-1
如果有软件包未安装,插入Linux系统安装光盘,使用以下方法安装
rpm -ivh package-name-major-version*
例如:#rpm -Uvh compat-db-4*
创建 Oracle 组和用户帐户
groupadd dba
useradd -g dba oracle
# id oracle
uid=501(oracle) gid=502(oinstall) groups=502(oinstall),503(dba)
设置 oracle 帐户的口令:
passwd oracle创建目录以 root 用户身份执行以下命令: mkdir -p /oraclechown -R oracle:dba /oracle
chmod -R 775 /oracle配置 Linux 内核参数 给出的值都为最小值,因此如果您的系统使用一个更大的值,则不要进行更改。Linux 允许在系统启动并运行时修改大多数内核参数,所以无需在修改内核参数后重启系统。 kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=4194304
net.core.wmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_max=262144
注意,OEL 5 已经为 kernel.shmall 和 kernel.shmmax 定义了值。如果默认值等于或大于要求值,则使用默认值。使参数生效/sbin/sysctl -p
设置环境变量export PATH
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0.1/db_1; export ORACLE_HOME
ORACLE_SID=db1; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
安装oracleunzip linux.x64_11gR1_database.zip# sh ./runInstaller -ignoreSysPrereqs
错误:Exception :java.lang.UnsatisfiedLinkError这个错误是也是由于缺少系统安装包造成的,只需安装XFree86-libs包即可,这个安装包可以在系统光盘中找到。: y+ P: |) n9 z1 s: u' z% `
在上面两个错误如果出现在RedHat as5版本中,解决如下:
在RHEL5中上面的包被libXp所取代了,因此rpm -ivh libXp-1.0.0-8.i386.rpm将包打上后问题即可解决。cat >> /home/oracle/raw.conf system=/opt/oracle/oradata/system01.dbf
sysaux=/opt/oracle/oradata/sysaux01.dbf
undotbs1=/opt/oracle/oradata/undotbs01.dbf
redo1_1=/opt/oracle/oradata/redo01.dbf
redo1_2=/opt/oracle/oradata/redo02.dbf
control1=/opt/oracle/oradata/control01.ctl
control2=/opt/oracle/oradata/control02.ctl
temp=/opt/oracle/oradata/temp01.dbf
users=/opt/oracle/oradata/users01.dbf
spfile=/opt/oracle/oradata/spfileora10.ora
orapwd=/opt/oracle/oradata/orapwdora10
EOFln -s /dev/raw/raw1 /oradata/system01.dbf
ln -s /dev/raw/raw2 /oradata/sysaux01.dbf
ln -s /dev/raw/raw3 /oradata/undotbs01.dbf
ln -s /dev/raw/raw4 /oradata/redo01.dbf
ln -s /dev/raw/raw5 /oradata/redo02.dbf
ln -s /dev/raw/raw6 /oradata/control01.ctl
ln -s /dev/raw/raw7 /oradata/control02.ctl
ln -s /dev/raw/raw8 /oradata/temp01.dbf
ln -s /dev/raw/raw9 /oradata/spfileora10.ora
ln -s /dev/raw/raw10 /oradata/orapwdora10
ln -s /dev/raw/raw11 /oradata/users01.dbf

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.

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.

MySQL and MariaDB can coexist, but need to be configured with caution. The key is to allocate different port numbers and data directories to each database, and adjust parameters such as memory allocation and cache size. Connection pooling, application configuration, and version differences also need to be considered and need to be carefully tested and planned to avoid pitfalls. Running two databases simultaneously can cause performance problems in situations where resources are limited.

MySQL supports four index types: B-Tree, Hash, Full-text, and Spatial. 1.B-Tree index is suitable for equal value search, range query and sorting. 2. Hash index is suitable for equal value searches, but does not support range query and sorting. 3. Full-text index is used for full-text search and is suitable for processing large amounts of text data. 4. Spatial index is used for geospatial data query and is suitable for GIS applications.
