Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Centos6.6 installs oracle11g R2

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Suddenly want to build an oracle environment under linux. I found some materials on the Internet and drew lessons from the materials shared by several friends. I will record the installation steps and share them here for your reference.

The NAT mode set by the virtual machine. The specific setting method can be found on the network. I use workstation 11.

Probably in the virtual machine interface, select Edit, and then select the virtual network editor, in fact, VMnet8 is in NAT mode. Select and click to change settings. If you select the VMnet8 NAT mode, you can set the sub-IP, that is, the network segment and mask, according to your needs. Then modify the IP address of the host's VMware Network Adapter. To be the same as the VMnet8 network, do not conflict with the address of the virtual machine.

Create a virtual machine.

Create a virtual machine in vm

Step 1: select Custom (Advanced)

Step 2: default

Step: install the operating system later

Step 4: Linux (L) version CentOS 64

Step 5: take the name of the virtual machine at will, specify the storage location of the virtual machine, and have enough disk space.

Step 6: according to the actual configuration of the physical computer, mine is a notebook, a CPU 2 core

Step 7: memory configuration, minimum 1G, my physical memory is 8G, 3072m is allocated here.

Step 8: use the NAT address translation mode network

Step 9: default for Icano type

Step 10: default SCSI for virtual disk type

Step 11: create a new virtual disk

Step 12: save the virtual disk as a single file with a maximum disk size of 50g

Step 10: default

Step 14: view the summary complete

Step 15: configure the virtual machine settings, select the operating system installation media, select the right side of CD/DVD (IDE) to use the ISO image file, and find the ISO of CentOS6.6.

Operating system installation

Turn on this virtual machine

Install or upgrade on existing system

Ask if to test the installation media Skip

Next

Language selection, here select Chinese (Simplified) (Chinese (simplified))

The keyboard chooses American English style

Optional storage device basic storage device

Yes, ignore all data

Set your own host name, which I set to snail here.

Choose the time zone, Shanghai, do not choose the system clock and use the UTC time because the virtual machine is not connected to the network and cannot update the time. Set the time yourself after installing the system.

Set operating system superuser (root) password

Ask how to create a disk partition to create a custom layout

Create Partition

Partition Settings:

/ boot setting 200m

Swap partition is the same as memory size

The rest of the space is given to / zoning.

Default

Choose the type of server installed, Basic Server

Installation complete, reboot

Root user login

Setup sets the IP address.

Modify

The ONBOOT option in / etc/sysconfig/network-scripts/ifcfg-eth0 is yes

Service network restart restarts the network service so that the set IP address takes effect.

Log in to the linux system with Xshell. The IP address is the set IP address.

Use ssh in xmaanger xshell to connect to Centos and fill in the user name and password

Mkdir / software build the file path and upload the files needed to install oracle.

The uploaded file is the Centos installation ISO1 file.

Oracle installation files.

Zysong.ttf # file character set file

Rlwrap-0.42.tar.gz # file

Pdksh-5.2.14-37.el5_8.1.x86_64.rpm

Vnc-server-4.1.2-14.el5_6.6.i386.rpm

Libtermcap-devel-2.0.8-39.x86_64.rpm

Readline-devel-4.3-13.x86_64.rpm

To facilitate the installation of the software, you need to configure the yum source. The packages required for Oracle are basically found in the ISO file of the installation CD, so you only need to configure

Local yum, so you have to upload the installation image of CentOS

# mkdir / cdrom

# mount-t iso9660-o loop / software/CentOS-6.6-x86_64-bin-DVD1.iso / cdrom

# echo'/ software/CentOS-6.6-x86_64-bin-DVD1.iso / cdrom/ iso9660 loop 0'> > / etc/fstab

# cd / etc/yum.repos.d/

# mkdir rpm

# mv CentOS-* rpm

# add vim cdrom.repo

[cdrom]

Name=cdrom

Baseurl= file:///cdrom

Enabled=1

Gkgcheck=1

Gpgkey= file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

# yum clean all

# yum makecache all

Install some basic development packages for linux

# yum grouplist

The export command is used to set the current session locale to English, because the next command yum grouplist lists the package group as Chinese would be too ugly

# yum groupinstall-y "Desktop Platform Development"Development tools"Compatibility libraries"

We also have to install gdm and xdpyinfo in order for the Oracle installation interface to appear on our local desktop.

Yum-y install gdm

Yum-y install xdpyinfo

# yum-y install elfutils-libelf-devel unixODBC unixODBC-devel libaio-devel

# yum-y install libtermcap-devel-2.0.8-39.x86_64.rpm

# yum-y install readline-6.0-4.el6.x86_64

# yum-y install readline-devel

# cd / software/

# tar-zxvf rlwrap-0.42.tar.gz

# cd rlwrap-0.42

#. / configure

# make

# make install

# yum localinstall pdksh-5.2.14-37.el5_8.1.x86_64.rpm

# yum localinstall vnc-server-4.1.2-14.el5_6.6.i386.rpm

# yum-y install xdpyinfo

# / cdrom/Packages

# rpm-ivh libaio-devel-0.3.107-10.el6.x86_64.rpm

Preparation for Oracle installation

Oracle official document location:

Http://docs.oracle.com/cd/E11882_01/install.112/e24326/toc.htm

# groupadd oinstall

# groupadd dba

# useradd-g oinstall-G dba oracle

# id oracle

Uid=500 (oracle) gid=500 (oinstall) groups=500 (oinstall), 501 (dba)

# mkdir-p / u01/app/oracle

# chown-R oracle.oinstall / U01

# chmod-R 775 / U01

Configure kernel parameters and resource limits

# vim / etc/sysctl.conf

Fs.aio-max-nr = 1048576

# set the maximum file descriptor, algorithm: 4m memory is required for 256fd.

# example: 8 gigabytes of memory, 8 gigabytes of memory, 8 gigabytes of memory, 4 gigabytes of memory, 4 gigabytes of memory.

Fs.file-max = 196608

Kernel.shmall = 2097152

# set the size of shared memory segment

Kernel.shmmax = 1610612736

Kernel.shmmni = 4096

Kernel.sem = 250 32000 100 128

Net.ipv4.ip_local_port_range = 9000 65500

Net.core.rmem_default = 262144

Net.core.rmem_max = 4194304

Net.core.wmem_default = 262144

Net.core.wmem_max = 1048576

The most important thing to pay attention to is the parameter shmmax. The minimum is 500m, and the maximum is one byte less than the memory. It is recommended to be a little larger than half of the memory.

Minimum: 536870912

Maximum: A value that is 1 byte less than the physical memory

Recommended: More than half the physical memory

See My Oracle Support Note 567506.1 for additional information about configuring shmmax.

Also pay special attention to the shmmax and shmall in sysctl.conf, which should be commented out.

After the modification, make it effective.

Sysctl-p

# sysctl-p

Sysctl-P error reporting solution

Problem symptom

Modify linux kernel file

# execute sysctl-P error report after vi / etc/sysctl.conf

Error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key

Error: "net.bridge.bridge-nf-call-iptables" is an unknown key

Error: "net.bridge.bridge-nf-call-arptables" is an unknown key

The solution is as follows:

Modprobe bridge

Change shell limit

# vim / etc/security/limits.conf

Oracle soft nproc 16384

Oracle hard nproc 16384

Oracle soft nofile 2048

Oracle hard nofile 65536

Add the following to vim / etc/pam.d/login

# vim / etc/pam.d/login

Session required / lib64/security/pam_limits.so

Firewall and security settings (it is not recommended to turn off) specific settings can be checked online.

# vim / etc/selinux/config

SELINUX=disabled

# chkconfig iptables off

# chkconfig ip6tables off

Extract the oracle installation file.

# mkdir / oracle

# unzip linux.x64_11gR2_database_1of2.zip-d / oracle/

# unzip linux.x64_11gR2_database_2of2.zip-d / oracle

# chown-R oracle.oinstall / oracle/database/

Solution of garbled code in oracle installation interface

Mkdir-p / usr/share/fonts/zh_CN/TrueType

[root@Oracle ~] # cp / software/zysong.ttf / usr/share/fonts/zh_CN/TrueType/

Add the correspondence between hostname and ip address to the / etc/hosts file, otherwise errors will occur during installation

# echo '10.10.10.10 snail' > > / etc/hosts

Modify oracle user environment variables

Vim ~ oracle/.bash_profile

# set temporary file path

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

# set ORACLE server name

ORACLE_HOSTNAME=snail; export ORACLE_HOSTNAME

# configure ORACLE Enterprise Manager

ORACLE_UNQNAME=ORADB; export ORACLE_UNQNAME

# configure oracle company product root directory

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

# configure oracle database directory

ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME

# configure ORACLE instance name

ORACLE_SID=VMVBMALM; export ORACLE_SID

# configure oracle environment variables

PATH=/usr/sbin:$PATH; export PATH

PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib; export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib; export CLASSPATH

Now that the setup is complete, the next step is to start the installation of Oracle. Before the next step, you must restart the machine.

Set up VNC

# vim / etc/sysconfig/vncservers

VNCSERVERS= "1:root"

VNCSERVERARGS [1] = "- geometry 1024x768"

# vncserver

Enter password: 123456

Confirm password: 123456

Set remote login password

# vncpasswd

Start the vnp service.

# service vncserver stop

# service vncserver start

Installation of Oracle

# xhost +

Description-my virtual machine address is 10-segment, while the host NVnet8 is 10.10.10.1

# export DISPLAY=10.10.10.1:0.0

Access control disabled, clients can connect from any host

# su-oracle

[oracle@snail database] $w

19:18:25 up 12 min, 1 user, load average: 0.11, 0.06, 0.01

USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT

Oracle pts/0 10.10.10.1 19:16 0.00s 11.52s 0.04s w

$cd / oracle/database/

$. / runInstaller

Starting Oracle Universal Installer...

Check temporary space: must be greater than 120 MB. Actually passed for 32957 MB.

Check swap space: must be greater than 150 MB. Actually passed for 3071 MB.

Check the monitor: the monitor configuration must display at least 256 colors. The actual pass is 16777216.

Prepare to launch Oracle Universal Installer / tmp/OraInstall2016-04-30 07-17-08PM from the following address. Just a moment, please.

The Chinese interface for oracle installation will come out.

Uncheck the box that I want to receive security updates through my oracle support and choose the next step is

Choose to install only the database software.

Select single instance database installation

The default language is simplified Chinese and English. If not, select it and click next.

Enterprise Edition, next step

Specify installation location, default, next step

Write permission is specified. Default is next.

Privileged operating system group, default to next step

Perform a prerequisite check to see if a later version of the missing package has been installed. Check with your life today:

Under root users:

Rpm-qa | grep package name (without version number)

By checking, the package has been installed with 64-bit version or later. So choose to ignore it all and go on.

Finish at one o'clock. Wait for the installation to complete.

To execute two scripts as the root user, log in to the root user and execute the two scripts given in the path.

Create a monitoring service

(act as an oracle server and let other oracle clients connect to this oracle server)

Under the oracle user, entering the command netca pops up the interface.

You can default next all the way.

The creation of database

With oracle user, enter dbca

After the interface starts, click next.

Create a database

Customize the database next step

Database ID, that is, SID, enter the SID to be built, and mine is VMVBMALM

Uncheck the configuration enterprise manager. Next step.

Set the user password. Select all accounts to be managed with the same password. Set the password. Next.

The location of the database file defaults to the database location in the template

Restore configuration by default, next step

Database content defaults to the next step

Initialize parameter character set Select ZHS16GBK-GBK 1 next step

Database storage default, next step

Create options click finish by default

Click OK on the pop-up page and wait for the database to be created.

Finally, set the user, password.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report