Centos6.6_x64 installation oracle10g

Source: Internet
Author: User

The centos6.6 system used in this experiment, the database is Oracle 10g.

CentOS version: Centos-6.6_x64-bin-dvd1.iso

Oracledatabase version: 10201_database_linux_x86_64.cpio.gz

To install the Oracle database, Linux must have Destoop installed. Otherwise, the Oracle database cannot be installed.

1. Install the installation package required by Oracle

Yum-y install binutilscompat-libstdc++-33 compat-libstdc++-33.i686 elfutils-libelfelfutils-libelf-devel gcc gcc-c++ glibc glibc.i686 glibc-common glibc-develglibc-devel.i686 glibc-headers ksh Libaio libaio.i686 libaio-devellibaio-devel.i686 libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-develmake sysstat

Finally need to install LIBXP This library, this must be installed, otherwise install Oracle will appear Java Exception.

Yum Install Libxp libxt.i686 libxtst.i686

Some bags are 64 and some of them are 32, they need to be installed.

2. Modify the configuration files required by the Linux system

Installation of the Oracle database is not recommended for Superuser root, it is recommended to add another user Oracle on the Linux system. But before we increase the user, we also need to set some system kernel parameters for the user.

Use the VI Editor to add the following parameter at the end of the/etc/sysctl.conf file:

-----------------------------------------------------------

Kernel.shmall= 2097152 #表示系统一次可以使用的共享内存总量 (in pages).

kernel.shmmax= 2147483648 #定义了共享内存段的最大尺寸 (in bytes). The default is 32M, which is too low for Oracle, usually set to 2G.

kernel.shmmni= 4096 #用于设置系统范围内共享内存段的最大数量. The default value for this parameter is 4096

kernel.sem=-32000 #表示设置的信号量

net.ipv4.ip_local_port_range= 1024x768 65000 #本地端口数量上限

net.core.rmem_default=4194304 #默认的接收窗口大小

net.core.rmem_max=4194304 #接收窗口的最大大小

net.core.wmem_default=262144 #默认的发送窗口大小

net.core.wmem_max=262144 #发送窗口的最大大小

----------------------------------------------------------

[Email protected]~]#/sbin/sysctl-p #执行生效


Edit the/etc/security/limits.conf file to set system resource limits. If the Oracle database is to be installed by the Oracle user in the future, the system administrator will need to add the following parameters to limits.conf.

# vi/etc/security/limits.conf

Add the following four lines:

Oracle Soft Nproc 2047

Oracle Hard Nproc 16384

Oracle Soft Nofile 1024

Oracle Hard Nofile 65536


Then, in the edit/etc/pam.d/login file, add the following parameters:

# Vi/etc/pam.d/login

Session required/lib/security/pam_limits.so

Session Required Pam_limits.so

Note:

The ETC directory includes the PAM.D directory and a login subdirectory under the PAM.D directory. ETC refers to the system configuration file directory, PAM.D refers to the authentication login configuration, login is the login configuration file. In short, it is the Linux operating system login configuration file.

3. Create the appropriate user name and user group

Only the single-host environment is discussed here, regardless of the configuration of the RAC environment. Execute the following instructions to add the users and groups required for Oracle installation.

3.1 Creating a group Oinstall

# Groupadd Oinstall

3.2 Creating a group DBA

# Groupadd DBA

3.3 Build User Oracle will join Oinstall and DBA groups and test

# USERADD-G OINSTALL-G dba Oracle

3.4 Create a new password for Oracle

# passwd 123456

4.Modify/etc/profile, modify the user'sShell limits

Add the following code to the profile file:

if [$USER = "Oracle"]; Then

if [$SHELL = "/bin/ksh"]; Then

ulimit-p16384

ulimit-n65536

Else

Ulimit-u16384-n 65536

Fi

Fi

5. Modify Linux distribution Information

Due to the release of oracle10g, CentOS6.6 did not release, so oracle10g did not confirm support for CentOS6.6, need to modify the relevant files to oracle10g support CentOS 6.

We need to manually modify the Linux release notes so that Oracle 10g supports CentOS6.5.

Edit/etc/redhat-release File

# Vim/etc/redhat-release

Change the content of CentOS release 6.5 (Final) to Redhat 4


6. Create an Oracle installation folder and data storage directory

Mkdir–p/u01/app/oracle

6.1 Modify the user and group that the/u01/app/oracle directory belongs to, and modify it to Oracle and Oinstall groups.

View the current Oracle directory Users and Groups: Ls–la |grep Oracle

To modify Oracle Directory Users and Groups:

Chown-r oracle:oinstall/u01/app/oracle

6.2 Modify the/u01/app/oracle directory permissions so that the Oinstall group also has read and write execution permissions to the/u01/app/oracle directory.

Use the following command:

Chmod-r 775/u01/app/oracle

7. Configure environment variables for Oracle users

Open cd/home/oracle, use VI to edit. Bash_profile. Such as:

Modify and add the following content:

Export tmp=/tmp;

Export tmpdir= $TMP;

Export oracle_base=/u01/app/oracle;

Export Oracle_home= $ORACLE _base/product/10.2.0/db_1;

Export ORACLE_SID=ORCL;

Export oracle_term=xterm;

Export Path=/usr/sbin: $PATH;

Export path= $ORACLE _home/bin: $PATH;

Export ld_library_path= $ORACLE _home/lib:/lib:/usr/lib;

Export classpath= $ORACLE _home/jre: $ORACLE _home/jlib: $ORACLE _home/rdbms/jlib;

After saving, use the following command to make the settings effective:

Source/home/oracle/.bash_profile

8.installationOracle, and make the relevant settings

8.1 Extracting the installation files

Place the downloaded compressed package under the folder/uo1/app/oracle that will be installed with Oracle:

Unzip the file and use the following command:

#gunzip 10201_database_linux_x86_64.cpio.gz

#cpio-IDMV < 10201_database_linux_x86_64.cpio

Unzip complete folder where database is visible in the same folder

The current database folder owner and user group are root. Now we want to make it more:

#chown-R Oracle:oinstall/u01/app/oracle/database

8.2 Installing the Oracle Database

After extracting the Oracle installation package, we will log off the root user, log in with the Oracle user, and use the user for Oracle installation.

Under Terminal, enter the/u01/app/oracle/database directory:

Prepare to perform the database installation, if your CentOS is a Chinese environment, the installation will appear in Chinese garbled, please follow the instructions below. To make the system temporarily in English state:

Export Lc_all=en_us. UTF-8

Then execute the following command to install:

./runinstaller


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/85/74/wKioL1ej_G_iqeZUAAOpZ-0f_WE180.png "title=" 1.png " alt= "Wkiol1ej_g_iqezuaaopz-0f_we180.png"/>

This interface pops up and our installation is smooth.

If we do not have any other requirements, we can follow the software's instructions to install step-by-step.

But if you use all of a sudden someday you'll find out. You will cry when you import the database (with Chinese characters) from the original other server into this Oracle database and display garbled characters.

Because the Oracle database character set installed following this prompt is an English character set rather than a Chinese character set.

Also some people will say, I can install the Oracle database and then modify the Chinese character set AH. Oh, I will laugh. Because in the end you will find that even if you modify the character set of the database through the SQL statement, then the Chinese characters in the database are garbled!

But you will also find it possible to use SQL statements to modify the character set if it is under Windows system Oh!

So in the Linux system, we only need to select Advanced installation, such as:


650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/85/74/wKioL1ej_Y3iWlDKAAOH5Zk0dns643.png "title=" 2.png " alt= "Wkiol1ej_y3iwldkaaoh5zk0dns643.png"/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/85/74/wKiom1ej_aayllZVAAOVYghvecU495.png "title=" 3.png " alt= "Wkiom1ej_aayllzvaaovyghvecu495.png"/>

Note: Modify the storage directory.

is the directory where the specified certificate is stored.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/85/74/wKioL1ej_wnzL4-SAALMZyPwpLo861.png "title=" 4.png " alt= "Wkiol1ej_wnzl4-saalmzypwplo861.png"/>

Select the type of database you are installing and the languages supported by Oracle, select the Enterprise version here, select English and Simplified Chinese.

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/85/74/wKioL1ej_ziQbHOpAAOL7nOXuao696.png "title=" 5.png " alt= "Wkiol1ej_ziqbhopaaol7noxuao696.png"/>

Specify the Oracle environment variable, and the installation path. Because we have declared in the. Bash_profile, it is automatically populated here.

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/85/74/wKiom1ej_3-zgmxPAALPl4-5I5w125.png "title=" 6.png " alt= "Wkiom1ej_3-zgmxpaalpl4-5i5w125.png"/>

Oracle begins the pre-installation check.

Check found 1 warning and one requirement, view log discovery

----Warning

Expectedresult:2214mb

actualresult:0mb

Checkcomplete. The overall result of this check is:failed <<<<

Problem:the system does not has the required swap space.

Recommendation:make more swap space available to perform the install.


Based on the current disk size, it is found that there is sufficient disk space under the root directory (24G).

#在根目录下创建交换分区文件夹, to open up an exchange zone.

[[Email protected]]# CD/

[Email protected]/]# mkdir swapimage

[[Email protected]/]# cd/swapimage

#使用dd命令, add a 2G file to the/swapimage file

[[Email protected]]# dd If=/dev/zero Of=/swapimage/swap bs=1024 count=2500000

2500000+0records in

2500000+0records out

2560000000bytes (2.6 GB) copied, 77.0965 s, 33.2 MB/s

#查看磁盘空间, you can find 2.6G less in the root directory

[[Email protected]]# DF-HL

Filesystem Size used Avail use% mounted on

/dev/sda3 30G 7.0G 22G 25%/

Tmpfs 740M 80K 740M 1%/DEV/SHM

/DEV/SDA1 194M 25M 160M 14%/boot

/dev/sda2 20G 1.5G 17G 8%/u01

#使用mkswap将/swapimage/swap file format to virtual memory file format

[[Email protected]]# Mkswap/swapimage/swap

Mkswap:/swapimage/swap:warning:don ' t erase bootbits sectors

On whole disk. Use-f to force.

Setting upswapspace version 1, size = 2499996 KiB

No label, uuid=ec52720f-bc50-4e56-9dbf-05cbcd56c583

#vi/etc/fstab--Add the following line and automatically load after system startup

Add to:

/swapimage/swap swap swap defaults 0 0

[[Email protected]]# free-m

Total used free shared buffers Cached

mem:1478 1443 34 0 13 820

-/+buffers/cache:609 868

swap:0 0 0

#开启swap添加

[[Email protected]]# Swapon/swapimage/swap

[[Email protected]]# free-m

Total used free shared buffers Cached

mem:1478 1445 32 0 13 820

-/+buffers/cache:611 866

swap:2441 0 2441


----Requirement

Checkingnetwork Configuration Requirements ...

Checkcomplete. The overall result of this check is:not executed <<<<

Recommendation:oracle supports installations on systems with dhcp-assigned public IP addresses. However, the primary network interface on Thesystem should being configured with a static IP address in order for the OracleS  Oftware to function properly. See Theinstallation Guide

Workaround:

[[Email protected]]# cat/etc/sysconfig/network-scripts/ifcfg-eth0

Device=eth0

Onboot=yes

Bootproto=dhcp

#IPADDR =192.168.18.8

#NETMASK =255.255.255.0

#GATEWAY =192.168.18.1

Modify/etc/sysconfig/network-scripts/ifcfg-eth0

[[Email protected]]# vi/etc/sysconfig/network-scripts/ifcfg-eth0

Device=eth0

Onboot=yes

Bootproto=static

ipaddr=192.168.150.128

netmask=255.255.255.0

gateway=192.168.150.1

~

"/etc/sysconfig/network-scripts/ifcfg-eth0" 7L, 108C written

Make the network card settings effective immediately:

[Email protected]]#/etc/init.d/network Restart

Shuttingdown interface Eth0:device State:3 (disconnected)

[OK]

Shuttingdown Loopback interface: [OK]

Bringing Uploopback interface: [OK]

Bringing Upinterface eth0:active connection state:activated

ActiveConnection Path:/ORG/FREEDESKTOP/NETWORKMANAGER/ACTIVECONNECTION/2

[OK]

[[Email protected]~]# vi/etc/hosts

#127.0.0.1 localhost centos6.5-32 localhost4localhost4.localdomain4 Note: This should be commented out

192.168.150.128centos6.5-32

OK after the configuration is complete, point "Retry"!

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/85/74/wKiom1ekAAahefZBAAKgETUgy54442.png "title=" 7.png " alt= "Wkiom1ekaaahefzbaakgetugy54442.png"/>

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/85/74/wKioL1ekACGw1idqAAOI-KEWcig393.png "title=" 8.png " alt= "Wkiol1ekacgw1idqaaoi-kewcig393.png"/>

Select the configuration option, where there are three choices: Create a database, configure automatic storage management, install only data software.

We select the first item here to create the database. Once the database is created, we no longer have to do "DBCA" to create the database.

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/85/74/wKiom1ekAEexzfJQAANkvzv8fFU875.png "title=" 9.png " alt= "Wkiom1ekaeexzfjqaankvzv8ffu875.png"/>

Select the database schema you created and we'll choose the first general purpose here. Because there are many SGA behind "advanced", the file system can be set on its own.

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/85/74/wKioL1ekAF_BV9buAANeKDuvNiU172.png "title=" 10.png "alt=" Wkiol1ekaf_bv9buaanekduvniu172.png "/>

Specifies the default SID for the Oracle database. Specifies that the character set is the character set used by the library, and Chinese is simplified CHINESEZHS16GBK. If the character set is not correct, it may result in garbled data. The bottom does not have to tick create Databasewithsample schemas (existing schema build library).

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/85/74/wKiom1ekAIyDVGMsAAMnlrxt6w4497.png "title=" 11.png "alt=" Wkiom1ekaiydvgmsaamnlrxt6w4497.png "/>

Configure Select database management options


650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/85/74/wKioL1ekAKvwphjbAANLkeD_d_Q438.png "title=" 12.png "alt=" Wkiol1ekakvwphjbaanlked_d_q438.png "/>

Location of the configuration database's data file Store

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/85/74/wKioL1ekAxPgGngaAANAIRAbWY4447.png "title=" 13.png "alt=" Wkiol1ekaxpggngaaanairabwy4447.png "/>

Options for configuring Database backup Recovery

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/85/74/wKiom1ekAy-Du8UEAAKinhAieig243.png "title=" 14.png "alt=" Wkiom1ekay-du8ueaakinhaieig243.png "/>

Configure database-related user passwords

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/85/74/wKioL1ekA1nTe2drAAGsoOP7xpo948.png "title=" 15.png "alt=" Wkiol1eka1nte2draagsoop7xpo948.png "/>

Display the installation summary and confirm that the configuration is correct.

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/85/74/wKiom1ekA3qhsVp2AAM3dhhpad8920.png "title=" 16.png "alt=" Wkiom1eka3qhsvp2aam3dhhpad8920.png "/>


650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/85/74/wKiom1ekBgTRnc5AAACdeRDLdVA632.png "title=" 17.png "alt=" Wkiom1ekbgtrnc5aaacderdldva632.png "/>

Start the installation of the database

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/85/74/wKioL1ekBiCBvMKXAABRqgb2s54178.png "title=" 18.png "alt=" Wkiol1ekbicbvmkxaabrqgb2s54178.png "/>

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/85/74/wKiom1ekBiyABtTDAABL6cuhG9c759.png "title=" 19.png "alt=" Wkiom1ekbiyabttdaabl6cuhg9c759.png "/>

Open a new terminal, Su to root. The two-paragraph script that is required to execute is executed sequentially.

/u01/app/oracle/orainventory/orainstroot.sh

/u01/app/oracle/product/10.2.0/db_1/root.sh

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/85/74/wKiom1ekBj-AOY52AACbQ_9PeE8282.png "title=" 20.png "alt=" Wkiom1ekbj-aoy52aacbq_9pee8282.png "/>

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/85/74/wKioL1ekBkvyxT_tAAGmE8CbGok816.png "title=" 21.png "alt=" Wkiol1ekbkvyxt_taagme8cbgok816.png "/>

To this Oracle database installation is complete.

To view the status of a database:

sql> Select Instance_name,status fromv$instance;

instance_name STATUS

---------------- ------------

ORCL OPEN



Centos6.6_x64 installation oracle10g

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.