Linux installation oracle11g R2 whole process finishing ____ Small program

Source: Internet
Author: User

Cpu:intel (R) Xeon (r) CPU E5620 @ 2.40GHz

Hard drive: 900G

Memory: 12G

Operating system: CentOS release 6.4 (X86_64bit)


1 Check basic requirements (for a cool server, this is definitely a requirement, you can skip)

Memory size

grep memtotal/proc/meminfo

Swap partition size

grep swaptotal/proc/meminfo

Increase the Swap partition

Create a/home/swap such a partition file. The size of the file is 5.12 million blocks, typically 1 blocks to 1 K, so the space here is 5G.

DD If=/dev/zero Of=/home/swap bs=1024count=5120000

Then turn this partition into a swap partition.

Mkswap/home/swap

and add it to the fstab.

echo "/home/swap swap defaults" >>/etc/fstab

2 Check software requirements, no yum install installation

Rpm-q binutils compat-libstdc++-33elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel gcc-gcc-c++ Libaio-devel Libaio libgcc libstdc++ libstdc++-devel make Sysstatunixodbc unixodbc-devel pdksh

Build local Yum

Step1: Mount the system's optical drive to a directory to find the name of the optical drive through the command (ls-l/dev | grep cdrom)

Step2: Mount CD Mount/dev/cdrom1/home/usb (/HOME/USB directory is required, CDROM1 is the name that was found on the previous command)

Step3: Run Cd/etc/yum. REPOS.D, the directory has four repo files, all renamed to other files (such as: MV Centos-base.repocentos-base.repo.bak)

STEP4: Creates a new repo file. Edit command: VI local.repo (repo suffix) reads as follows

[dvd]--(library name)

Name=this is local yum-(name description)

Baseurl=file:////home/usb--(Yum source directory, the source address of your CD-ROM mount)

Enabled=1--(whether the Yum source is enabled, 0 is disabled)

Gpgcheck=0--(check gpg-key,0 for no check, 1 for inspection)

--ey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-6 (no configuration required when gpgcheck=0)

Save exit (the actual Chinese all removed).

Step5:yum Clean All--clear cache

Step6:yum List--download Yum all packages

Step7:yum installgcc-c++*--Install all RPM packages at the beginning of gcc-c++, * is a wildcard character that detects what is missing and what to install

PS: The Yum list may not find the rep .... Error This is not found Yum index, is generally your disc is wrong (there will be two CD-ROM) to the corresponding directory of other discs look for 3 to configure the kernel

Edit/etc/sysctl.conf. (The following parameter size is configured according to its own server configuration)

Add the following content to a file

# Kernel paramaters required by ORACLE11GR1

Fs.file-max = 6815744

FS.AIO-MAX-NR = 1048576

Kernel.shmall = 2097152

Kernel.shmmax = 2147483648

Kernel.shmmni = 4096

Kernel.sem = 250 32000 100 128

Net.ipv4.ip_local_port_range = 9000 65500

Net.core.rmem_default = 4194304

Net.core.rmem_max = 4194304

Net.core.wmem_default = 262144

Net.core.wmem_max = 1048576 4 to make the/etc/sysctl.conf change take effect immediately, execute the following command.

# sysctl–p

5) Edit/etc/security/limits.conf.

Add the following line:

Oracle Soft Nproc 2047

Oracle Hard Nproc 16384

Oracle Soft Nofile 1024

Oracle Hard nofile 65536 6) Edit/etc/pam.d/login.

Add the following line:

Session required/lib/security/pam_limits.so

Session Required Pam_limits.so

"NOTE: If it is a X64 system, then use/lib64/security/pam_limits.so, or the system may not be able to log on to the server." " 7" edit/etc/profile.

Add the following line:

if [$USER = "Oracle"]; Then

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

Ulimit-p 16384

Ulimit-n 65536

Else

Ulimit-u 16384-n 65536

Fi

fi 8 Create the operating system user as the owner of the software installation and Support group.

Groupadd Oinstall

Groupadd dba

USERADD-G oinstall-g dba Oracle

passwd Oracle 9 Create the Software installation directory.

mkdir–p/home/oracle_11/app/

Chown-r oracle.oinstall/home/oracle_11/

chmod-r 755/home/oracle_11/ 10) Edit/home/oracle/.bash_profile.

Add the following line:

Umask 022

Export Oracle_base=/home/oracle_11/app--Catalog customization

Export Oracle_home= $ORACLE _base/oracle/product/11.2.0/db_1

Export Oracle_sid=xxpas--instance name, modify as needed

Exportpath= $PATH: $HOME/bin: $ORACLE _home/bin

Exportld_library_path= $ORACLE _home/lib:/usr/lib

Export Lang=c--set this parameter to avoid garbled setup

Export oracle_base oracle_home oracle_sidpath ld_library_path LANG

Run the following command again to make the configuration take effect immediately

Source/home/oracle/.bash_profile

11 Extract the downloaded Oracle installation files to Linux to install the database software

(Oracle official website download will have two zip packets, the direct decompression will be extracted in the database folder inside I was the file transferred to the/home/pasinstall/directory, through the SECURECRT transmission, transmission shortcut keys alt+p specific commands Baidu), Then install the database

# su-oracle--Switching users

# cd/home/pasinstall/database/--Switch to the Extract database directory

$./runinstaller--Run

--direct operation will be an error, 11.1 is to deal with the wrong way, after running to the server to see the graphical interface

11.1 Open another terminal window under the graphical interface (in native operation or through VNC remote operation) as root

This step is critical, not performing this step will not start the graphical installation interface when running $./runinstaller with Oracle users.

--The graphical installation will appear can not Procol specified exception ... error

This is the reason for not opening the graphical interface (the solution is as follows)

Execute under Root user

# Export display=:0

# Xhost +

Then proceed to 11 steps.

12) The Graphical Setup wizard will appear next

Follow the wizard step-by-step and, like the wizard that installs Oracle under Windows, there is not much difference until the final installation is complete. Reference URL http://www.jb51.net/article/53769.htm 13) After installing the database software is to create the database

Then the database is created using the DBCA command under Oracle Users

PS: The installation may be an error ora-00119 this is due to your/etc directory under the Hosts file

--xxpas change for your host name

# vi/etc/hosts changes inside the hostname to IP add the last item can be, IP custom

127.0.0.1 Xxpas Localhost4 Localhost4.localdomain4

:: 1 localhost6localhost6.localdomain6

11.237.35.61 Xxpas

Reference http://blog.csdn.net/ceclar123/article/details/20130769

17) Configuration monitoring

Execute the NETCA command under the Oracle user to configure, with a problem refer to the following document

Http://blog.chinaunix.net/uid-25892360-id-3291001.html

Http://blog.chinaunix.net/uid-25892360-id-3236793.html

After general configuration, you can directly test whether the database can be connected

sql> Conn/as SYSDBA--DBA Connection

Sql> Conn pas/pas@127.0.0.1:1521/xxpas--Test if it can be connected with a PAS user


After that is configured Plsql connection le general error is ora-12514 a mistake basically is to listen to not configure good cause


Also attached is the steps for Oracle to reboot under Linux

Edit Oratab

[oracle@oracle11g ~]$ Vi/etc/oratab

Found: Xxpas:/home/oracle_11/app/oracle/product/11.2.0/dbhome_1:n

Modified as: Xxpas:/home/oracle_11/app/oracle/product/11.2.0/dbhome_1:y

--the catalogue itself according to the actual situation set, the database installs.

[oracle@oracle11g ~]$ vi/etc/rc.d/rc.local

Add to:

Su oracle-lc "/home/oracle_11/app/oracle/product/11.2.0/dbhome_1/bin/lsnrctlstart"

Su oracle-lc "/home/oracle_11/app/oracle/product/11.2.0/dbhome_1/bin/dbstart"

--the catalogue itself according to the actual situation set, the database installs.
Rk-l2e6-7mjw-ndrp

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.