Install Oracle 10g in CentOS 4.8

Source: Internet
Author: User

Check memory and swap partition size
# Grep MemTotal/proc/meminfo
# Grep SwapTotal/proc/meminfo

Check disk space size
# Df-h

Check the libaio package. CentOS 4.8 is not installed by default.
Note: The error "ORA-12547: TNS: lost contact" is reported when the database creation is not installed"
# Rpm-qa | grep libaio
# Rpm-ivh libaio-0.3.105-2.i386.rpm
# Rpm-ivh libaio-devel-0.3.105-2.i386.rpm

Modify Kernel Parameters
# Cat>/etc/sysctl. conf <EOF
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
Net. core. rmem_default = 262144
Net. core. rmem_max = 262144
Net. core. wmem_default = 262144
Net. core. wmem_max = 262144
EOF

Configuration takes effect
# Sysctl-p

Create groups, users, and installation Directories
# Groupadd dba
# Groupadd oinstall
# Useradd-g oinstall-G dba Oracle
# Mkdir-p/opt/oracle
# Chown-R oracle: oinstall/opt/oracle
# Id nobody
# Passwd oracle

Set oracle user environment variables
# Su-oracle
# Vi. bash_profile
ORACLE_BASE =/opt/oracle
Export ORACLE_BASE
ORACLE_HOME = $ ORACLE_BASE/product/10.2.0.1
Export ORACLE_HOME
ORACLE_SID = orcl
Export ORACLE_SID
PATH = $ PATH: $ ORACLE_HOME/bin
Export PATH

Set the environment to take effect
# .. Bash_profile
# Env | grep oracle
# Echo $ ORACLE_SID

Start installation. If runInstaller reports a font conversion error, execute export LANG = en

Generally, for performance considerations, the following settings are also required to improve nofile (maximum number of file descriptors that can be opened) for Oracle users) and nproc (maximum number of processes available for a single user)
# Vi/etc/security/limits. conf
Oracle soft nproc 2047
Hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536

# Vi/etc/pam. d/login
Session required/lib/security/pam_limits.so
Session required pam_limits.so

# Under the vi/etc/profile file:
If [$ USER = "oracle"]; then
If [$ SHELL = "/bin/ksh"]; then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Fi

Install and configure ASM
To the oracle official website asm installation package: http://www.oracle.com/technetwork/topics/linux/downloads/rhel4-092650.html
Select different download packages based on the CPU model. After the download is complete, you can directly install it through the rpm command.

Before using ASMLib, you must run the configuration script to prepare the driver. Run the following command as the root user and respond to the prompts shown in the following example.
#/Etc/init. d/oracleasm configure

Enable the ASMLib driver as follows.
#/Etc/init. d/oracleasm enable

Confirm that ASMLib has been automatically loaded
# Dmesg | grep oracleasm
ASM: oracleasmfs mounted with options: <defaults>

Configure disks for ASM
Next, tell the ASM driver the disk you want to use. Note that these disks are empty disks that do not contain any content (or even partitions. You can use disk partitions for ASM, but it is not recommended to do so.
Run the following command as the root user to mark the disk used by ASMLib:
#/Etc/init. d/oracleasm createdisk DISK_NAME device_name

(Note: DISK_NAME should consist of uppercase letters. The current version has an error, that is, if lowercase letters are used, the ASM instance cannot recognize the disk .)

For example:
#/Etc/init. d/oracleasm createdisk VOL1/dev/sdb1
Marking disk "/dev/sdb" as an ASM disk [OK]
#/Etc/init. d/oracleasm createdisk VOL2/dev/sdc1
Marking disk "/dev/sdc" as an ASM disk [OK]
#/Etc/init. d/oracleasm createdisk VOL3/dev/sdd1
Marking disk "/dev/sdd" as an ASM disk [OK]

The following example shows how to list all disks marked as used by ASMLib.

#/Etc/init. d/oracleasm listdisks
VOL1
VOL2
VOL3

Now that you have installed ASMLib and marked the disk as available, you can create an ASM instance and create a database that uses ASM for disk storage. The easiest way to do this is to use the database configuration Assistant (DBCA.
Note: When you create an ASM instance, the error "ORA-12547: TNS: lost contact" is reported, and the libaio-0.3.105-2.i386.rpm needs to be installed.


Run the commands of common tools:
# Dbca
# Lsnrctl
# Netmgr
# Emctl start dbconsole

Access oracle10g em (Enterprise Manager) in IE in windows, and garbled characters appear on the buttons on the webpage interface. Other parts of the webpage are displayed normally.
There are multiple character set font configuration files in the $ ORACLE_HOME/jdk/jre/lib and $ ORACLE_HOME/jre/1.4.2/lib/directories.
Use font. properties. zh_CN.RedHat to replace the default font definition file.
# Cp font. properties. zh_CN.Redhat font. properties

Delete the gif files in $ ORACLE_HOME/Solaris/j2ee/oc4j_applications/applications/em/cabo/images/cache/zhs;
Restart dbconsole
If the problem persists, set the preferred language for IE browser to English.


Increase disk space:
# Fdisk/dev/sdb
P
N
W

Create a partition Mount directory
# Mkdir/u03

Add the new file system to/etc/fstab
/Dev/sdb1/ext3 defaults 1 1

Mount a new partition
# Mount/u03

View the space of the new partition
# Df-h/u03

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.