Centos6.5 Oracle11gR2 Installation Process

Source: Internet
Author: User
Tags ssh secure file transfer ssh secure shell

1 Preparation
CentOS-6.5-x86_64-bin-DVD1
Linux_11gR2_database_1of2
Linux_11gr2_database204 F2
VMware Workstation 10.0.2
SSH Secure Shell Client
Instantclient_11_2
Plsqldev1005
2. Install virtual machines and CentOS
(1) install VMware Workstation
(2) install CentOS and name the host oracledb
(3) The disk must be larger than 30 GB (experience value)
(4) The memory must be greater than 1 GB (officially required)
(5) The swap partition in the operating system is greater than 2 GB (if the physical memory is less than 2 GB, you need to set the value to 1-2 times of the physical memory. If the physical memory is greater than 2 GB, you do not need to set it .)
(6) Virtual Machine network connection mode: Bridging Mode (B) direct connection to the physical network
(7) after the installation is complete, set the Virtual Machine network (ipv4) to a fixed IP address (system-config-network)
(8) If the network test is OK, the operating system environment is ready.
(9) When installing a virtual machine, you must first create a virtual machine and then install the operating system.
(10) In order to install Oracle, select the installation type as: desktop version.
(11) install the SSH Secure Shell Client and connect to the host
Preparations before 3Oracle Installation
"Special Instructions 』:
(1) commands in the following steps are too long and can be directly copied Using SSH Secure Shell Client.
(2) vi Basic command: I -- edit status exit edit and save, Press ESC first, then press match ": wq" or ": x ".
(3) Pay attention to the current user at each step, whether it is root or oracle

Step-1 # modify the Host Name
[Root @ oracledb ~] # Sed-I "s/HOSTNAME = localhost. localdomain/HOSTNAME = oracledb/"/etc/sysconfig/network
[Root @ oracledb ~] # Hostname oracledb

Step 2 # Add a host name and IP Address Record
[Root @ oracledb ~] # Vi/etc/hosts
192.168.1.8 oracledb

Step-3 # disable the firewall Selinux
[Root @ oracledb ~] # Sed-I "s/SELINUX = enforcing/SELINUX = disabled/"/etc/selinux/config
[Root @ oracledb ~] # Setenforce 0

Step 4 # Install the dependency package
[Root @ oracledb ~] #
Yum-y install gcc-c ++ make binutils compat-libstdc ++-33 elfutils-libelf \
Elfutils-libelf-devel glibc-common glibc-devel \
Libaio-devel libgcc libstdc ++-devel \
UnixODBC-devel

"Special Instructions 』:
(1) pdksh-5.2.14-37.el5.x86_64.rpm: This installation package yum source does not exist, but must, can be downloaded in other ways after manual installation;
(2) Although the dependency package is installed, when installing oracle, the system will still verify that the preceding package is not installed. You must pass: rpm-qa gcc (check the package name that fails) check and verify each other.

Step 5 # modify Kernel Parameters

[Root @ oracledb ~] # Vi/etc/sysctl. conf # Add the following at the end

net.ipv4.ip_local_port_range= 9000 65500fs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmall = 10523004kernel.shmmax = 6465333657kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.core.rmem_default=262144net.core.wmem_default=262144net.core.rmem_max=4194304net.core.wmem_max=1048576
[Root @ oracledb ~] # Sysctl-p)

Step-6 # modify system resource limits (number of open processes and number of files)
[Root @ oracledb ~] # Vi/etc/security/limits. conf # Add the following at the end
oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536grid soft nproc 2047grid hard nproc 16384grid soft nofile 1024grid hard nofile 65536
[Root @ oracledb ~] # Vi/etc/pam. d/login
Session required pam_namespace.so # Add a pam_limits.so
Session required/lib64/security/pam_limits.so
Session required/lib/security/pam_limits.so
Session required pam_limits.so

Step-7 # create users and groups
[Root @ oracledb ~] # Groupadd oinstall
[Root @ oracledb ~] # Groupadd dba
[Root @ oracledb ~] # Groupadd rule
[Root @ oracledb ~] # Useradd-u600-g oinstall oracle
[Root @ oracledb ~] # Usermod-G dba, role oracle
[Root @ oracledb ~] # Id oracle
[Root @ oracledb ~] # Passwd oracle

Step 8 # create an installation directory and grant permissions
[Root @ oracledb ~] # Mkdir/u01
[Root @ oracledb ~] # Mkdir/u02
[Root @ oracledb ~] # Chown-R oracle: oinstall/u01
[Root @ oracledb ~] # Chown-R oracle: oinstall/u02
[Root @ oracledb ~] # Su oracle
[Root @ oracledb ~] # Mkdir-p/u01/app/oracle/product/11.2.0/db_1
[Root @ oracledb ~] # Mkdir-p/u02/oradata
[Root @ oracledb ~] # Mkdir-p/u02/oradata/oracledb # oracledb name of your database instance

Step-9 # Set oracle environment variables (use the oracle account to log on to the desktop, enable the terminal window file, and finally add the setting line of the following environment variables)
[Oracle @ oracledb ~] # Vi/home/oracle/. bash_profile
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASEORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOMELD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATHORACLE_SID=oracledb; export ORACLE_SIDORA_NLS33=$ORACLE_HOME/nls/admin/data; export ORA_NLS33NLS_LANG=american_america.zhs16gbk;export NLS_LANGPATH=$ORACLE_HOME/bin:$PATH; export PATH
[Oracle @ oracledb ~] # Source/home/oracle/. bash_profile (make the configuration take effect immediately)
[Oracle @ oracledb ~] # Env (check whether the environment variable settings are OK)

Step-10 # upload the Installation File
(1) log on with an oracle account: SSH Secure File Transfer Client
(2) Upload the installation package to the/home/oracle/Downloads directory.

Step-11 # decompress the oracle Installation File (go to the/home/oracle/Downloads directory)
[Oracle @ oracledb ~] # Unzip-o-d/home/oracle/Downloadslinuxamd64_12c_database_1of2.zip
[Oracle @ oracledb ~] # Unzip-o-d/home/oracle/downloadslinuxamd64_12c_databasesilicate f2.zip
4. Install Oracle
[Root @ oracledb ~] # Xhost +
[Root @ oracledb ~] # Su oracle
[Oracle @ oracledb ~] Cd/home/oracle/Downloads/database
[Oracle @ oracledb ~] #./RunInstaller

Note: The installation page will pop up and be installed based on the illustrated online documents.

5. Change
The following error occurs during installation of linuxamd64_12c. Therefore, linux. x64_11gR2 is used to uninstall Oracle.

6. Questions and answers
(1) An error is returned when you modify the linux Kernel File sysctl-P.
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:
[Root @ oracledb ~] # Modprobe bridge
[Root @ oracledb ~] # Lsmod | grep bridge

(2) swap partition creation is too small during system installation and dynamic adjustment is made. Therefore, when installing the operating system, set the swap partition and allocate the size.

Method: Use a file as the Swap partition. The operation is as follows:
1. Create a file to be used as a swap partition: Add 1 GB swap partition, the command is written as follows, where count is equal to the number of desired blocks (bs * count = file size ).
# Dd if =/dev/zero of =/root/swapfile bs = 1 M count = 1024

2. format it as a swap partition file:
# Mkswap/root/swapfile # create a swap File System

3. Enable swap partition file:
# Swapon/root/swapfile # enable swap files

4. Enable auto when the system is started. Add a line in the file/etc/fstab:
/Root/swapfile swap defaults 0 0

(3) A package cannot be found in the yum installation source, and cannot be found even if the yum source is changed.
There are two methods to modify the yum source. Many friends like to modify the yum. repos. d file. deepvps feels that this method is not very good. The following method is much more convenient.
In CentOS, components can be directly installed through yum. However, the default yum source speed of the system is often unsatisfactory and all components are connected overseas. In order to achieve quick installation in China, you must modify the yum source.
Http://mirrors.163.com/http://mirrors.sohu.com these two domestic sources.
Run the following command.
Cd/etc/yum. repos. d
Mv CentOS-Base.repo CentOS-Base.repo.bak
Wget http://mirrors.163.com/.help/centos-base-163.repoor wget http://mirrors.sohu.com/help/CentOS-Base-sohu.repo

Run yum makecache to generate Cache

4. Garbled text on some buttons on the console page (for example, the logon button on the logon page)

Solution:

The em garbled characters are caused by java, and the em button is a graph generated by java. The oracle 11g uses jdk1.5, and jdk1.5 has a simple method to solve this problem.

The Oracle user must perform operations on the Oracle server. The procedure is as follows:
1. Retrieve the font file simsun. ttc from windows
2. Create the fallback folder in the $ ORACLE_HOME/jdk/jre/lib/fonts directory.
Command: mkdir fallback
3. Copy the font file simsun. ttc to the created fallback directory and rename it simsun. ttf (because windows fonts are copyrighted, they cannot be used for commercial use)

Command:
Mv simsun. ttc simsun. ttf
Chmod 755 simsun. ttf
4. Clear the em cache.
Command: rm $ ORACLE_HOME/Solaris/j2ee/oc4j_applications/applications/em/cabo/images/cache/zhs/*. gif
5. Stop and restart dbconsole
Command:
Emctl stop dbconsole
Emctl start dbconsole
Refresh em in the browser and find that the button is no longer garbled.

1158 because the two ports are not enabled, other machines cannot access the web console and cannot connect to oracle
Reference: http://blog.csdn.net/jemlee2002/article/details/7042991

6: kdump startup failed
In a desktop environment, kdump is disabled directly.

7. Common operation methods and commands (for linux beginners)

(1) On the graphic interface, you can switch between multiple interfaces: on the X-window Graphic operation interface, press "Alt + Ctrl + function key Fn n = 1 ~ 6 "to enter the Console character operation interface.
Press Alt + Ctrl + F7 to return to the X-window.
(2)
Rm-f delete an object
Rm-rf Delete folder
(3)
Cp/u01/app/oracle/product/11.2.0/db_1/jdk/jre/lib/fonts/a.txt/home/oracle/(where to copy the file)

8 Oracle Operation Management


(1) Start the database
[Oracle @ oracledb ~] Sqlplus/nolog
SQL> connect system/system as sysdba
SQL> startup

(2) Start the listener
[Oracle @ oracledb ~] Lsnrctl start

(3) Start the Management Platform
[Oracle @ oracledb ~] Emctl start dbconsole

[Special Note]
(1) it is best to manually stop oracle When shutting down the server
(2) In order to make the server resource usage small, the server is directly switched to the command line after oracle is started. If the operating system runs stably, you can directly modify the operating system to start to the command line by default.

(1) Stop the database
[Oracle @ oracledb ~] Sqlplus/nolog
SQL> connect system/system as sysdba
SQL> shutdown

(2) Stop listening
[Oracle @ oracledb ~] Lsnrctl stop

(3) Stop the Management Platform
[Oracle @ oracledb ~] Emctl stop dbconsole

9. install and configure PLSQL (see this article for details)

1. Download the Instant Client from the Oracle Website: http://www.oracle.com/groovy/global/cn/software/tech/oci/instantclient/index.html#your operating system.
Download a compressed file from different Instant Client versions. The decompressed folder is D:/instantclient_11_2. Put it in your favorite directory. For example, D:/instantclient_11_2.
My download path (http://download.oracle.com/otn/nt/instantclient/112030/instantclient-basic-nt-11.2.0.3.0.zip)

2. Create a New Directory network under the D:/instantclient_11_2 directory, create the admin directory under the network directory, and create the file tnsnames. ora under the admin directory. Use the text editor to open and write the following content:

MWDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.0.58) (PORT = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = MWDB)
)
)

The first MWDB: Specifies the local host name of the remote server.
Second MWDB: Remote database instance name

3. Add an environment variable named TNS_ADMIN. The value is the path of the tnsnames. ora file. For example, my local machine is D:/instantclient_11_2/network/admin.

4. Set the ORACLE language and add the environment variable NLS_LANG. The value is SIMPLIFIED CHINESE_CHINA.ZHS16GBK.

If you do not know the ORACLE language of the remote database, you can ssh or telnet to the remote machine, enter the command interface, and use the command line to connect to the database.
Select * from nls_instance_parameters;
View the value of NLS_LANGUAGE
NLS_LANGUAGE
NLS_TERRITORY
5. download and install the PL. SQL. Developer configuration application
Configure tools> preferences> connection
Oracle Home D:/instantclient_11_2
OCI library D:/instantclient_11_2/oci. dll

6. Disable PL/SQL Developer and restart Developer.

The host name appears in the PL/SQL Developer list. Enter the user name and password to log on to the remote oracle 11g database.

<End>

Related Article

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.